Source code for ProjeX Task Manager.
- Install the following dependencies:
- Clone this repository
- Execute
yarn
in a terminal - Create a file named 'config.js' in the project's root directory. This file allows us to avoid hard-coding development-only variables. Make sure it has the following structure:
// Use the ip associated with your simulator's
// virtual machine (execute ifconfig in a terminal and copy
// the result for vboxnetN (N is an integer)
export const BASE_URL='http://192.168.58.1:3000';
export const DEFAULT_EMAIL='[email protected]';
export const DEFAULT_PASSWORD='12345678';
Follow these steps.
Export JAVA_PATH
and JAVA_HOME
environment variables in your ./.profile
file by appending these lines:
export JAVA_PATH=/usr/lib/jvm/java-8-oracle/bin/java
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
In order to execute Javascript code outside web browsers, we need an execution environment such as Node JS. Follow the instructions in the link to install its current LTS version, NodeJS 8.
We will use Android's software development kit in order to build React Native code into a format compatible with Android devices. To install it, follow the following steps:
- Download Android SDK from here
- Extract the compressed files into
~/androidSDK/
. - Create an empty file named
repositories.cfg
at~/.android/
. - Accept licenses by running
~/androidSDK/tools/bin/sdkmanager "platforms;android-28"
. - Install your build and platforms tools:
~/androidSDK/tools/bin/sdkmanager "build-tools;28.0.2"
,~/androidSDK/tools/bin/sdkmanager "platform-tools"
- Define the SDK's location through environment variables by adding the following lines to your
~./.profile
file:
export ANDROID_HOME=~/androidSDK/
export PATH="${ANDROID_HOME}tools:${PATH}"
export PATH="${ANDROID_HOME}platform-tools:${PATH}"
export ANDROID_SDK=~/androidSDK/
Android NDK. For the build process, we will also need Android NDK.
- Download it from here
- Extract the compressed folder into
~/androidSDK/
. - Set the corresponding environment variables by adding the following line to your
~./.profile
file:
export ANDROID_NDK=~/androidNDK/android-ndk-r10e
Genymotion is an Android emulator.
- Download it from here
- Set up a virtual device, preferably a Nexus 5 with Android 5.0.0.
- Go to
Menu > Settings > ADB
, choose 'Use custom Android SDK tools' and select your~/androidSDK/
folder.
Follow the instruction here
- Run
yarn
command to install all JavaScript packages. - Generate android folder using
react-native eject
- Go to your React Native app folder and start metro bundler
react-native start
- Start your virtual device in Genymotion
- Deploy your app to your virtual device
react-native run-android