Important Points When Creating APK Files for Production
Please confirm the following important points when creating apk for actual release. If apk files are not properly created, uploading to the Developer's Site may fail or the apk file may not run properly.
 | Details regarding the following important points are written in the programming guide included with SDK. |
 | Please make sure that you delete all librarys and resources from the previous SDK, before upgrading Mobage Native SDK. Especially when you are upgrading from previous Mobage Native SDK 1.4.4 or before to SDK 1.4.5 or later, confirm that the libmobage.so is deleted or you will have issue around Bank API's. |
|
|
Edit AndroidManifest
- Do not change the application tag; android:icon="@drawable/icon”. If the apk file is uploaded to the Developer’s Site, the icon file is replaced with one belonging to the target application.However, the replacement is not performed properly if icon.png is not used because the name will be replaced with an icon.png format.
- The package name must be jp.mbga.aXXXXXXXXX. Please apply an AppId to XXXXXXXXX. If the package name is changed, it will be necessary to change the part of package name which imports R.java to “import com.mobage.sample.R;” and to perform a clean build. It is not necessary to change package name of src folders.
- Because screen orientation changes are not supported, screen orientation for Activity is fixed.
- Do not specify a relative path such as “.TestActivity” for “android:name” for the activity. Specify a absolute path such as “com.mobage.sample.TestActivity”.
- Besides the main Activity, the following Activity is also needed.
- Add the following code outside the <application> tag and inside the <manifest> tag.
When using Mobage Native SDK versions older than 1.4
- The Launch Activity is required to be launched in singleTask mode.
- It is necessary to add the following intent-filter to the main Activity. At that time, it is necessary to set <data android:scheme/>. In the XXXXXXXX part below, enter your AppId.
Example of AndroidManifest.xml
Below is an example of AndroidManifest.xml for Mobage Native SDK versions older than 1.4 which has been running in the production environment.
When using Mobage Native SDK versions from 1.4 to 1.4.6
- Delete android:launchMode="singleTask" written inside the Main Activity of AndroidManifest.xml, and do not use singleTask. Only standard or singleTop launchMode can be used for the Main Activity.
- Delete Intent Filter written inside the Main Activity of AndroidManifest.xml.
- Add the following Activity.
- Existing mobage-jp-${YourApplicationId} cannot be used. Should you need to start Intent for ad services, etc., set a scheme with another name the Main Activity.
Example of AndroidManifest.xml
Below is an example of AndroidManifest.xml for Mobage Native SDK versions from 1.4 to 1.4.6 .
When using Mobage Native SDK (Android) 1.4.7 or later
- Delete android:launchMode="singleTask" written inside the Main Activity of AndroidManifest.xml, and do not use singleTask. Only standard or singleTop launchMode can be used for the Main Activity.
- Delete Intent Filter written inside the Main Activity of AndroidManifest.xml.
- Add the following Activity.
- Add the following Receiver.
- Existing mobage-jp-${YourApplicationId} cannot be used. Should you need to start Intent for ad services, etc., set a scheme with another name the Main Activity.
Example of AndroidManifest.xml
Below is an example of AndroidManifest.xml for Mobage Native SDK (Android) 1.4.7 or later.
 | 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.
|
Code corrections
- It is necessary to set code to serverMode for actual release in initialize.
- It is necessary to use SDK ConsumerKey/Secret for actual release.
Revision History
- 09/12/2014
- Added reference for Mobage Native SDK 1.4.7
- 05/14/2013
- Added differences between SDK's.
- 04/17/2012
- Added the prohibition of changing icon.png.
- 04/12/2012
- Revised the description method of AndroidManifest.xml. Moved and changed from the <service> tag and <receiver> tag to the inside the <application> tag.
- 01/27/2012