Setup Eclipse (version 1.4.7 or later)

This chapter explains how to set up the Mobage Native SDK (Android version).

Import the Mobage Native SDK libraries from Eclipse

To be able to develop using the Mobage Native SDK on Eclipse, you need to add the Mobage Native SDK libraries to the Android project on Eclipse. After you download and unpack the Mobage Native SDK package, please follow the steps below:
 
(1) Import MobageNativeAndroid in to Eclipse.
(1-1) Go to File > Import > Existing Projects into Workspace and select MobageNativeAndroid for import.
(2) Link MobageNativeAndroid to your project.
(2-1) Right click your project and select Properties. From Properties go to Android > Library and click Add, then select MobageNativeAndroid .
 
※ If your using Android SDK r16 or older, please follow the following procedure.
(3) Link MobageNativeSdk.jar to you project
(3-1) Right click your project and select Properties. From Properties go to Java Build Path > Libraries and click Add Jars.
(3-2) Select MobageNativeAndroid/libs/MobageNativeSdk.jar and add to your libraries.

You may encounter conflict with android-support-v4.jar since it contains same libraries as Native SDK. In this case please remove android-support-v4.jar from your project.

 

 

Configure AndroidManifest.xml

For the development of your application by using Mobage Native SDK, AndroidManifest.xml is required to contain the following settings to use Android-native functions or restrict them.

  • Internet access permission settings are required.
  • Screen orientation settings in the Activity are required.
  • The Launch Activity is required to be launched in standard mode or singleTop mode.
  • Single-Sign-On Activity contained within the SDK is required to be called from outside the SDK. 
  • Dashboard Activity contained is required.
  • Do not change about android:icon="@drawable/icon" of an application tag. The application icon set is replaced to the files of the developer site.
After adding all these settings, the AndroidManifest.xml looks as follows:
The screenOrientation of MobageDashboardActivity can be set to landscape. Setting to landscape will show the Mobage UI in landscape mode which is recommended for application that run on landscape

Please replace the following items with your settings.

  • ${YourActivityName}:
    • Replace with FQCN (Fully Qualified Class Name) of the Activity.
  • ${YourApplicationId}:
    • Replace with your Mobage applications ID. 
       

      You will need to add com.mobage.android.TrackingReceiver from Mobage Native SDK 1.4.7.
      If you want to forward the Install Referrer to other Receiver, set it as below.

      • Set the "foward." on android:name to a unique name
      • Set the android:value to the Receiver you want to forward in FQCN
        TrackingReceiver can forward Intent from other Receiver. Example, if you want to use CampaingTrackingReceiver for both AppBrain and Google you can follow the below.

About F.O.X for Mobage

You can chose from below on the usage of F.O.X for Mobage from Mobage Native SDK 1.4.7.4 .

  • If you're planning to use F.O.X for Mobage, just follow the standard import procedure of the SDK.
  • If you're planning to remove F.O.X for Mobage and implement F.O.X by yourself, Please import MobageNativeAndroidWithoutFOX.

    Configuration for In-App Billing

    In-App Billing (IAB) is a service of Google Play, which enables Android application developers to sell their contents in their application.

The Mobage Native SDK is using Proguard inside to use IAB. Accordingly, the existing Private APIs are deleted from SDK.
Moreover, when the application is published, in order to be distributed for two or more markets, the application uploaded to the developer site has a package name changed.

To use IAB functions, please perform the following steps.

[1. FQCN limitation]

Please replace the following class names with FQCN.

  • All classes in AndroidManifest.xml
  • R class (all references in *.java codes that refer to the R class)

[2. Resource file name limitation]

Please dont change the following resource file names, because the Mobage Native SDK reserves them.

  • /res/drawable/icon.png
  • /res/drawable-hdpi/icon.png
  • /res/drawable-ldpi/icon.png
  • /res/drawable-mdpi/icon.png

[3. Configuration file limitation]

The file will be automatically created when you upload your apk file in the Developer Site.

  • /assets/billing_config.xml

[4. About Implicit Intent]

When Implicit Intent is required for advertising service etc., please DO NOT USE the Intent Filiter already set in com.mobage.android.activity.MobageProxyActivity.

Unable to render {include} The included page could not be found.


Revision History

  • 09/11/2014
    • Initial Release.

 

 

PREVIOUS

Setup (version 1.4.3 or later)

NEXT

Setup AndroidStudio (version 1.4.7 or later)