Android Side

Last updated: February 25th, 2022

Import in Android Studio

Extract .zip you download from Codecanyon, you will see some file and folder. The project location inside Android_Side folder. When your Android Studio ready you can open it and you will see display like this:

screenshot
  1. Select Open an existing Android Studio Project
  2. Browse location Project and press OK button
  3. Wait for few minutes until all process import has finished

Firebase Configuration

Before you do step change the package name, you must do this step for firebase project configuration. Please note: this step is mandatory to generate google-services.json file, "Server key", "Legacy Server key" and "Sender ID".

How to generate google-services.json file? Click Here!

After you generate and download the google-services.json, please added it, in the directory app in the Android project.

screenshot

Write "Server key", "Legacy Server key" and "Sender ID" on a paper. We need these keys for OneSignal configuration.

OneSignal Configuration

Required For Setup:

  1. OneSignal Account, if you do not already have one.
  2. Your OneSignal App ID, available in Keys & IDs.
  3. Google/Firebase Server API Key. ("Server key", "Legacy Server key" and "Sender ID").
  4. A device or emulator that has Google Play services installed and updated on it (Device will not subscribe or receive push notifications with out this).

Config.java Setup:

Update ONESIGNAL_APP_ID value from app > java > PackageName > Config.java with your OneSignal app id.


Keys & IDs Setup:

  1. Login to your OneSignal Account and select your app
  2. Select SETTINGS > Keys & IDs to get your OneSignal APP ID and REST API KEY
  3. screenshot
  4. Login to your Admin Panel, replace OneSignal APP ID and OneSignal REST API KEY with yours. Open: Settings → General Settings → Push Notification
  5. screenshot

Change Package Name

  1. Open Gradle Scripts → build.gradle (Module: app)
  2. Change the application ID with your own id name
  3. Standard naming procedure: com.yourdomainname.yourappname
  4. Click Sync Now
  5. Change the id as unique as possible, because application id is very important used if you want to publish the application to the google play

Important

Your applicationId or package name must same with your package name that you've create on Firebase console when you generate google-services.json

screenshot

  1. Click once on your package and then click setting icon on Android Studio
  2. Close / Unselect Compact Empty Middle Packages
  3. Right click your package and rename it
screenshot

YouTube Configuration

How to Get API Key for YouTube? Click Here!

  1. Open Admin Dashboard → www.YourDomain.com/dashboard
  2. Open: Settings → General Settings
  3. Select YouTube tab
  4. Write your YouTube API Key that you get before and click on the Update button

Google Map Configuration

How to Get API Key for Google Map? Click Here!

Open app > res > values > string.xml and find Google_Map_API_KEY, change the value to your Google Map API Key.

Server Connection

When your server side already configured properly, you can connect it to your android app.
To change BASE_URL: please open app > java > PackageName > Config.java and change it to your admin dashboard installation URL. Be carful about the latest "/".

API Key Configuration

  1. Open Admin Dashboard → www.YourDomain.com/dashboard
  2. Open: Settings → API Key
  3. Write a random key (Number and Letter) in the API Key field and click on Save Key
  4. Open Android Studio Open → app > java > PackageName > Config.java and put your API key which obtained from admin dashboard:
  5. public static final String API_KEY = "xxxxxxxxxxxxx";

Customize The Application

Change Color

  1. Open Android Studio → app → res → values → colors.xml
  2. Enter your color code inside each of strings tag

Change Name & Text

Change Application Name and Text Inside the Application:

  1. Open Android Studio → app → res → values → strings.xml
  2. Change value name in each strings tag according your needs

Change Font

If you want to change default font, first prepare a TTF format font that you like and then:

  1. Open Android Studio → app → assets → fonts
  2. Copy and overwrite your custom.ttf font

Change Images

  1. Open app → res → drawable and replace with your image or icon, all image are placed on there
  2. You also can change every image in app like via Explorer, open Explore and go to your project directory, select app\src\main\res\drawable
  3. Replace every image which you need to custom the application and highly recommended you using same resolution for each image

RTL Mode

  1. Open Android Studio → app → java → YourPackageName → Config.java
  2. Change the value of "ENABLE_RTL_MODE" from false to true
  3. Change the value of "Direction" from ltr to rtl

Generated Signed APK

To sign your app in release mode in Android Studio, follow these steps:

  1. On the menu bar, click Build → Generate Signed APK
  2. If you already have a keystore, go to step 4
  3. On the Generate Signed APK Wizard window, click Create new to create a new keystore
  4. On the New Key Store window, provide the required information, your key should be valid for at least 25 years, so you can sign app updates with the same key through the lifespan of your app
  5. On the Generate Signed APK Wizard window, select a keystore, a private key, and enter the passwords for both. Then click Next
  6. On the next window, select a destination for the signed APK and Signature Versions
  7. Select Signature Version : V1 (Jar Signature)
  8. Click Finish and the signed apk will generated

AdMob Configuration

Change Your AdMob app_id and unit_id

  1. Login to your AdMob Account, create an app and generate your ad unit id
  2. Open Admin Panel and go to: Settings → AdMob Configuration and write your ad app id and unit id
  3. Open app > res > values > string.xml from Android Studio and find AdMob_APPLICATION_ID, then write your AdMob app ID there.

Enable and Disable Ads

Open Admin Panel and go to: Settings → AdMob Configuration


Hide Ads For Specific User

  1. Open Admin Panel and go to: Users Management → Users List
  2. Open specific user profile and open Hide Ads tab


AdMob ads are not displayed on the phone?

If you were not able to see the ads after changing the app ID and unit ID to yours, make sure you entered AdMob API keys correctly from AndroidManifest.xml and Admin Dashboard. The ad request was successful, but no ad was returned due to lack of ad inventory. It’s because of your AdMob settings that there are no ads for your preferred language or location. Email to Google and ask about errorCode 3 to advise you to make changes to your AdMob settings.

Reward Coin Configuration

To Configure and Manage Reward Coin:
Open Admin Panel and go to: Settings → Reward Configuration

Support Multi Languages

Apps include resources that can be specific to a particular culture. For example, an app can include culture-specific strings that are translated to the language of the current locale. It's a good practice to keep culture-specific resources separated from the rest of your app. Android resolves language- and culture-specific resources based on the system locale setting. You can provide support for different locales by using the resources directory in your Android project.

For more information, Click Here!

FAQ

If there are any problems, please visit our FAQ page. Click Here!