I’m new in the android development and I got some problems with the AndroidManifest.
I’m using 2 plug-ins: prime31 and WRPAndroidVideoPlayer. Each plug-in require their activity to be the MAIN.
Of course if the has been set for one activity the other one is not working and vice-versa.
During my research online I’ve found different solution applicable only to “your-own” plug-in, in other word, only if you are the one that is developing the plug-in because you have to modify the java files.
(Getting Started | Vuforia Library)
Does anyone have an idea or a solution to this problem?
The best solution is to contact the asset developers.
A lot of Android plugins use the ‘main activity’ approach as this is what is used in the example in the documentation.
But for most functionalities they could also implement their class as a separate activity.
If they absolutely MUST override the Unity main activity, they should also provide the main activity code so you can use a code merge tool to merge the main classes of multiple plugins.
They could still obfuscate their code by moving all logic to another class.
You could unzip the contents of the plugins, decompile the java files and check if it would be easy to merge them.
The other approach would be to indeed create your own class that relays the proper signals to those activities when needed.
Hopefully at least one of the developers will be able to refactor their code away from the ‘Main activity’ methods.