Build - Android
This documents contains instructions for configuring and building the Android code with minimal effort.
Last updated
This documents contains instructions for configuring and building the Android code with minimal effort.
Last updated
There's also a quick and easy video on on link that you can follow.
Throughout these steps, I will use com.yourapp.android as a placeholder for your app's package name that you must replace with yours.
Open the android folder inside downloaded archive in Android Studio using Open Existing Project option on the launch screen.
The very first thing is to rename the package from ltd.starthub.muly
to yours e.g., com.yourapp.android
everywhere. To do so, please follow below steps:
In the Project view on the left, click the Gear icon and make sure Compact Middle Packages is unchecked (turned off).
In the Project view, now expand app > java
until you see ltd
package.
Right-click on ltd
, choose Refactor > Rename
option and enter the replacement for ltd
part i.e., com
in our example case. Repeat this process to rename starthub
to yourapp
and muly
to android
.
From the Project view, open the file build.gradle
from Muly.app module and replace ltd.starthub.muly
with your package name e.g., com.yourapp.android
.
Copy the google-services.json
file you downloaded above from from Firebase and paste it inside app
folder.
Edit the app/src/main/res/values/config.xml
file and update important values as mentioned below.
facebook_app_id
= This must be set to app ID of your Facebook app configured earlier in this guide.
facebook_protocol_scheme
= This should be the value of facebook_app_id
set above with fb
prefix e.g., fb01234567890123456789
.
facebook_client_token
= This should be as copied from Facebook for Developers console.
google_client_id
= This is the (type 3
) client ID extracted from google-services.json
file downloaded earlier.
link_privacy_policy
= This is the URL to applicable privacy policy you may have created.
link_terms_of_use
= This is the URL to applicable terms of use you may have created.
server_api_key
= Set this to the API key shown by server at install time. If you missed to note it down, you can also find this anytime in the .env file on server as value of API_KEY
variable.
server_url
= This must be URL to your installation and /api/
suffix e.g., https://yourapp.com/api/
.
sharing_links_domain
= This is the domain (URL prefix) you may have created in Firebase earlier in guide e.g., yourapp.page.link
.
support_*
= You can set these values to show links in Support section of Settings page. If you would like to hide any of those, just set them to empty values.
location_api_key
= Set this to Android key we generated in Google Cloud Console for our Maps project.
adcolony_app_id
= If you want to show ads from AdColony in your app, please set this value corresponding to the app you created in AdColony client area.
admob_app_id
= If you want to show ads from AdMob in your app, please set the value to corresponding to the app in your AdMob account.
Once configured as desired, you can build the project by using the Build > Generate Signed Bundle / APK
option in Android Studio. Upon asked, please choose the keystore you created at the beginning of the guide and select release
build type.