...
- MUST enroll a Google Play Developer account at https://console.developers.google.com
- Required Softwares:
- Android Studio: https://developer.android.com/studio
- Nodejs: https://nodejs.org/
Install Android Studio
- Visit https://developer.android.com/studio, download and install the latest version of Android Studio.
Install Nodejs & Dependencies
- Firstly, download and install the latest Nodejs version from https://nodejs.org/
...
# support eslint
npm install -g @babel/core@^7 @babel/cli@^7 eslint eslint-plugin-jest babel-eslint eslint-config-airbnb eslint-config-google eslint-plugin-flow-vars \
eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-node eslint-plugin-promise eslint-plugin-react \
eslint-plugin-standard eslint-plugin-mocha eslint-plugin-jasmine babel-plugin-react-intl babel-plugin-transform-remove-console \
yarn react-native-cli create-react-native-app
Setup Mobile Code
- Go to Client Area and download the Premium Mobile Code (in Zip format).
- Extract Zip file to MobileProject folder (We just use the folder name MobileProject for example. You can use another folder name but should update all following commands and paths accordingly)
- Run following command to install necessary dependencies on the project
...
- Download google-services.json
- Overwrite the default file at MobileProject/android/app/google-services.json
Update configuration.json under folder MobileProject/android/app/
Default file configuration.json will be as below:
{
"appName": "YourAppName",
"bundleId": "com.yourcompany.phpfoxmobile",
"serverUrl": "https://yourphpfoxwebsite.com",
"clientId": "CLIENT_ID",
"clientSecret": "CLIENT_SECRET",
"facebookAppId": "FACEBOOK_APP_ID",
"googlePlacesClientId": "GOOGLE_PLACES_CLIENT_ID",
"googleAdMobAppId": "GOOGLE_ADMOB_APP_ID",
"firebaseEnabledAnalytic": true,
"versionName": "1.x.x",
"versionBuildNumber": 2,
"theme": {
"primaryColor": "#COLOR",
"splashScreenBackgroundColor": "#COLOR",
"grayBaseColor": "#111"
},
"privateInfo": {
"storeFile": "phpfox-keyyourcompany.keystore",
"storePassword":"123456789xxxxxxx",
"keyAlias": "phpfox-key-aliasyourcompany",
"keyPassword": "123456789xxxxxxxx"
}
}
Here is our detailed explanation for items in this file
...
This color code is used for generating appropriate text color.
privateInfostoreFile
, storePassword, keyAlias, keyPassword is used to Android build tool, do not change its if you don't have experience with Android developmentThese items will be used when distributing Android app to Google Play. They can be generated within Android Studio.
Run your Android app
- Open Terminal, go to MobileProject folder
- Run the following command to start
node ./server.js
- Start Android Studio and open Android project at MobileProject/android folder.
Info |
---|
When opening, you may receive some notice messages about missing libraries of Android Studio with instructions to install them. You can follow instructions to install missing libraries. |
- Run the project in Now you can start running your Android app in simulator in Android Studio