Setup (version 1.4.3 or later)
This chapter explains how to set up the Mobage Native SDK (Android version).
Import the Mobage Native SDK libraries from Eclipse
|Procedure on importing Mobage Native SDK to your project has changed from version 1.4.3 or later. You can still be able to proceed the import procedures as older version than 1.4.3|
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.|
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.
|Mobage Native SDK 1.4.4 or later, minimumSdkVersion has been changed to 8.|
|The screenOrientation of MobageDashboardActivity can be set to landscape from Mobage Native SDK 1.4.5 .|
Please replace the following items with your settings.
- Replace with FQCN (Fully Qualified Class Name) of the Activity.
- Replace with your Mobage applications 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 dont change the following resource file names, because the Mobage Native SDK reserves them.
[3. Configuration file limitation]
The file will be automatically created when you upload your apk file in the Developer Site.
[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.
Introduction for using ProGuard
ProGuard is an obfuscation tool for Java programs. You can apply ProGuard into your Android application developed by Mobage Native/Unity SDK.
When you use ProGuard, note the following points.
- You can't apply ProGuard into MobageNativeSdk.jar. In addition, the jar file has been already obfuscated by using ProGuard.
Add the following descriptions into your proguard.cfg for excluding the Mobage Native SDK classes from the obfuscation.
- Added How to Import Google Play service SDK.
- Change adjustPan to adjustResize
- Change to minimumSdkVersion.
- Initial Release.