This article will guide you to build Android app with Premium Mobile Code. Note: the Premium Mobile Code is ONLY available on phpFox ULTIMATE license. In case you are holding other license types, please upgrade to phpFox ULTIMATE license first.
Now, let's start!
Note |
---|
In this article, we assume that you already got the following knowledge:
|
Now, let's start!
Prerequisite
- 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/
Set up Tools and Environment
Install Android Studio
- Visit https://developer.android.com/studio, download and install the latest version of Android Studio.
...
- Then, install necessary dependencies, you can open the Terminal and run the following command:
Code Block |
---|
# 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
Code Block |
---|
#install dependencies |
...
cd MobileProject/ yarn install |
Configure your Android app
...
Default file configuration.json will be as below:
Code Block |
---|
{ |
...
"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": |
...
"yourcompany.keystore", |
...
"storePassword":"xxxxxxx", |
...
"keyAlias": |
...
"yourcompany", |
...
"keyPassword": |
...
"xxxxxxxx" |
...
} } |
Here is our detailed explanation for items in this file
...
- Open Terminal, go to MobileProject folder
- Run the following command to start
...
Code Block |
---|
node ./server.js |
- Start Android Studio and open Android project at MobileProject/android folder.
...