Can I use this plugin with other Android Plugins?

Yes, you can.  And there is abolytly no problems if another Android plugin doesn't use main activity.

But if it does, that we have to solve the conflict and merge plugins to use on activity.


However, I can not give straightforward instruction on how to integrate my plugin with any other.

Here is reasons why:

  1. I can not keep track of other plugins changes
  2. My plugins may also have changes and I do not know how it would affect other plugins
  3. Not all plugins have open source


What can I do

  1. Provide open source Eclipse project with clean coding
  2. 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.


Without plugin:

Android App → UnityPlayerActivity


With plugin

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 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.  

Here is few useful articles:

How to merge manifest with another android plugin

How to compile androidnative.jar from eclipse project