Setup (Older than 1.4)

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) Copy and overwrite the project with libs and res folders in the MobageNativeSDK folder.
(2) Open the project Property setting screen, to set the build paths to the .jar files.
(2-1) Select Java Build Path, and open the Libraries tab, then press the button to add the .jar files.
(2-2) Open the libs folder.
(2-3) Select MobageNativeSdk.jar and add as a reference library into the 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 singleTask mode.
  • Single-Sign-On Activity contained within the SDK is required to be called from outside the SDK.

After adding all these settings, the AndroidManifest.xml looks as follows:

Please replace the following items with your settings.

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

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 don't 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

Revision History

  • 08/08/2012
    • Initial Release.


Old version


Setup (from version 1.4 to 1.4.2)