fixed up links to contribute authored by Doris Tam's avatar Doris Tam
Already have Mahara mobile enviornment installed? [Start contributing!](#contributing!)
# Getting setup on Linux
Some of the information is duplicated from the [React native developer docs.](https://reactnative.dev/docs/getting-started)
> *Already have Mahara mobile environment installed? **[Contribute!](#contributing) ✨***
- [Getting setup on Linux](#getting-setup-on-linux)
- [Get logins](#get-logins)
- [Installing dependencies](#installing-dependencies)
- [Install Node 8.3 or newer](#install-node-83-or-newer)
- [Install React Native CLI](#install-react-native-cli)
- [Install Java Development Kit](#install-java-development-kit)
- [Android development environment (for a virtual device) - skip next if you are using a physical device](#android-development-environment-for-a-virtual-device---skip-next-if-you-are-using-a-physical-device)
- [Android development environment](#android-development-environment)
- [Clone project into your local directory](#clone-project-into-your-local-directory)
- [Install and start the app](#install-and-start-the-app)
- [Run the app on a device/emulator](#run-the-app-on-a-deviceemulator)
- [Virtual device testing - on Emulator with Android studio](#virtual-device-testing---on-emulator-with-android-studio)
- [Physical device testing](#physical-device-testing)
- [React native](#react-native)
- [Contributing](#contributing)
- [Troubleshooting](#troubleshooting)
Some of the information is duplicated from the [React native developer docs.](https://reactnative.dev/docs/getting-started)
## Get logins
In order to test you will need an account on a Mahara instance. In order to generate an authentication token please see [this documentation](https://manual.mahara.org/en/19.10/account/apps.html?highlight=authentication%20token).
## Installing dependencies
......@@ -73,7 +79,9 @@ java -version
# OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
```
### Android development environment (for a virtual device) - [skip next](#clone-project-into-local-directory) if you are using a physical device
### Android development environment
>(for a virtual device) - [skip next](#clone-project-into-local-directory) if you are using a physical device
Setting up your development environment can be somewhat tedious if you're new to Android development. If you're already familiar with Android development, there are a few things you may need to configure. In either case, please make sure to follow the next few steps carefully.
......@@ -105,17 +113,17 @@ Setting up your development environment can be somewhat tedious if you're new to
The React Native tools require some environment variables to be set up to build apps with native code.
```bash
# Check which bash file you are using with
cat $HOME/.bash_profile
# Check which bash file you are using with
cat $HOME/.bash_profile
# If there is a file with this name open it up with
gedit $HOME/.bash_profile
# If there is a file with this name open it up with
gedit $HOME/.bash_profile
# If it says No such file or directory, check another bash file
cat $HOME/.bashrc
# If it says No such file or directory, check another bash file
cat $HOME/.bashrc
# If there is a file with this name open it up with
gedit $HOME/.bashrc
# If there is a file with this name open it up with
gedit $HOME/.bashrc
```
Add the following lines to your `$HOME/.bash_profile` or `$HOME/.bashrc` config file:
......@@ -154,6 +162,7 @@ gedit $HOME/.bashrc
```
2. Follow through steps in [README](https://gitlab.wgtn.cat-it.co.nz/elearning/mahara-mobile-react-native/blob/master/README.md)
3. Alternatively, the same actions: to start the server running the app.
```bash
......@@ -197,45 +206,45 @@ gedit $HOME/.bashrc
### Physical device testing
1. Open developer mode on your Android device. [Check here for tips](https://www.digitaltrends.com/mobile/how-to-get-developer-options-on-android/)
1. Inside of the developer options: Allow USB debugging.
2. Connect your device to your pc via USB connection.
3. Your device will get a request for permissions:
1. Allow access to files/Transfer files.
2. Allow USB Debugging. OK
4. On your terminal, execute the command:
1. Open developer mode on your Android device. [Check here for tips](https://www.digitaltrends.com/mobile/how-to-get-developer-options-on-android/)
1. Inside of the developer options: Allow USB debugging.
2. Connect your device to your pc via USB connection.
3. Your device will get a request for permissions:
1. Allow access to files/Transfer files.
2. Allow USB Debugging. OK
4. On your terminal, execute the command:
```bash
adb devices
```
```bash
adb devices
```
This will list the devices connected to the pc.
This will list the devices connected to the pc.
```bash
List of devices attached
01234SDGESG567890 device
```bash
List of devices attached
01234SDGESG567890 device
# If you have not allowed USB debugging it will show
# 01234SDGESG567890 unknown
```
# If you have not allowed USB debugging it will show
# 01234SDGESG567890 unknown
```
5. Run the app on the connected device with command:
5. Run the app on the connected device with command:
```bash
# Insert the appropriate number shown in your terminal.
npm run android -d 01234SDGESG567890
```
```bash
# Insert the appropriate number shown in your terminal.
npm run android -d 01234SDGESG567890
```
# React native
## React native
Follow official docs: <https://facebook.github.io/react-native/docs/getting-started.html>.
This is because the installation process changes a lot, and we can't keep these docs up to date.
# Contributing!
# Contributing
Now that we have gotten Mahara mobile installed and ready to run, let's start contributing!
[Here's how 💡](// TODO: create page)
Now that we have gotten Mahara mobile installed and ready to run, let's start contributing!
[Let's contribute!!! 💡](https://gitlab.wgtn.cat-it.co.nz/elearning/mahara-mobile-react-native/-/wikis/Contributing-to-Mahara-mobile)
# Troubleshooting
......
......