Android Native supports following 3d - party plugins
- Playmaker - Artists and Designers: Realize your creative vision without coding! Unlock the power of Unity.
- Simple IAP System - Takes the complexity out of in-app purchases (IAPs) and the billing process as a whole by providing a one-stop solution for managing IAPs.
- Parce Push Notifications - Creating, scheduling, and segmenting push notifications just got a whole lot easier.
- Anti-Cheat Toolkit - There are always some people around who want to cheat, hack or crack something in your game. Anti-Cheat Toolkit (ACTk) is designed to let you add some extra pain to these nasty persons!
- Soomla Grow - With SOOMLA Grow, traditional analytics fade away. Instead of knowing your users based only on data you collect, you can now study their behavior across thousands of games.
in order to transfer data from Native Android code to Unity C#, plugin uses serialization, and "|" symbol as the separator. Which mean if you will use same symbol in your data which has to be transferred from Native Android code to Unity C# it may break de-serialization process.
Compatibility with another Unity Android Plugins (version 6.0+):
Starting from Android Native v6.0, Android Native plugin does not require to override main app activity, which mean, there will be no conflicts with other 3-rd party plugins.
If you found conflict with another Android Unity plugin check these three steps:
- make sure you only have 1 .jar of each type in your project
- make sure they are in the right directory locations since different plugins have different post-processing scripts
- clean up the android manifest by comparing to a new project with fresh installs of all your latest plugins
If you found conflict with another Android Unity plugin, please, let us know via support e-mail.
After updated to version 6.0+ from version 5.3 or lower, please check manually your manifest, after the plugin installation.
Your app manifest is located at: Assets -> Plugins -> Android -> AndroidManifest.xml and make sure:
- Activity with name com.androidnative.AndroidNativeBridge does not exists in your manifest anymore. If you steel see this activity, feel free to remove it.
- You do not have duplicates of com.unity3d.player.UnityPlayerNativeActivity Activity. If you see 2 or more UnityPlayerNativeActivity's feel free to leave only one UnityPlayerNativeActivity which is marked as launcher.
Note: Launcher Activity - this is activity which have intent-filter as on code snipped bellow:
<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" ...... > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
Compatibility with another Unity Android Plugins (before version 6.0):
There is the process no problems if another Android plugin doesn't use main activity. But if it does, then, we have to solve the conflict and merge plugins to use on activity.
Not all Android Native API is requiring main activity and will work on enabling more features to work without main activity. Current list of APIs with is not required main activity overriding:
- Google Mobile Ad
- Native Popups and Preloaders
- Immersive Mode
- App Licensing
- Package Detail Retrieval
The reason why Android Native needs Main activity. APIs implemented in the plugin requires access to native Android callbacks:
void onActivityResult(int requestCode, int resultCode, Intent data)
- Camera API
- Billing API
- Play Service API
void onNewIntent(Intent intent)
- Twitter OAuth API
- Billing API
Warning: Following margin guide can be useful only if you have two plugins with requirements to override main activity class. There will be no merging issues if another plugin is not overriding main activity. But probably you will need to merge Manifest.
Here is base instruction how you can merge two Android plugins. I can not give straight forward step by step guide on how to integrate my plugin with any other.
Here is reasons why:
- I can not keep track of other plugins changes
- My plugins may also have changes and I do not know how it would affect other plugins
- Not all plugins have open source
What can I do
- Provide open source Eclipse project with clean coding
- Give general instruction how to combine two plugins (can be found below)
When you build Unity app for Android without any plugins, main application activity class is UnityPlayerActivity.
When you using Android Native Plugin it replaces UnityPlayerActivity class by AndroidNativeBridge class which is extended from UnityPlayerActivity.
Android App → UnityPlayerActivity
Android App → AndroidNativeBridge → UnityPlayerActivity
which means if you want to use 2 plugins in your project you have to extend one plugin from another. To have a picture like:
Android App → AndroidNativeBridge → OtherPlugin → UnityPlayerActivity
Android App → OtherPlugin → AndroidNativeBridge → UnityPlayerActivity
To be able to do this you should have at least one plugin with full open source and source Eclipse project. Android Native Plugin comes with full open source and eclipse source project.
For example, you have another plugin you want to use with Android Native Plugin.
- Open Android Native Eclipse project.
- Add Other Plugin jar file to the project
- Extend AndroidNativeBridge from other plugin Activity class.
- Rebuild androidnative.jar and replace it in your project
After this step, both plugin should work correctly.
If you not able to merge Plugins by yourself, or simply want to save some time, you can use our premium support Setup package.