Can I use this plugin with other Android Plugins?

Yes, you can. And there are absolutely 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.


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

Here are reasons why:

  1. I cannot keep track of other plugins changes.
  2. My plugins may also have changes and I do not know how it would affect on other plugins.
  3. Not all plugins have an 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, the main application activity class is UnityPlayerActivity.

When you are 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 plugins should work correctly.  

Here are a few useful articles:

How to merge manifest with another android plugin

How to compile androidnative.jar from eclipse project