How can I access a separate process from MainActivity?
I have embedded a Unity project into a separate Android app, the two are communicating with a java plugin. In order to avoid closure of my entire Android app I am starting my UnityPlayerActivity as a new separate process:
AndroidManifest.xml
<activity
android:name="com.mypackage.example.UnityPlayerActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:parentActivityName="com.mypackage.example.MainActivity"
android:process=":unity_app">
</activity>
Unfortunately this stops communication between Unity and Android.
Logcat shows the java plugin still receives responses from the unity_app, but I am unable to access this information:
07/07.../com.mypackage.example:unity_app I/In MyPlugin.receiveResult: Result: Score: 45
Any ideas? Possibly because MainActivity loses context of UnityPlayerActivity?
Thanks!