Am trying to bind one service as an isolated process in my react native Android app
<service
android:name="com.xx.xx.services.IsolatedService"
android:enabled="true"
android:isolatedProcess="false"
android:process=":service" />
But if enabled the service as an isolated process then service is not binding else it's working fine. I have tried in a simple native android app and its binding without any issue.
public class MainActivity extends ReactActivity {
private AIDLInterface serviceBinder;
@Override
protected void onCreate(Bundle savedInstanceState) {
SplashScreen.show(this, R.style.SplashScreenTheme);
super.onCreate(savedInstanceState);
}
@Override
protected void onStart() {
super.onStart();
Intent intent = new Intent(this, IsolatedService.class);
this.getApplicationContext().bindService(intent, mIsolatedConnection, BIND_AUTO_CREATE);
}
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "xcvxcv";
}
private ServiceConnection mIsolatedConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
serviceBinder = AIDLInterface.Stub.asInterface(iBinder);
// Console.log("mIsolatedConnection");
}
@Override
public void onServiceDisconnected(ComponentName componentName) {
// Console.log("onServiceDisconnected");
}
};
}
its not giving onServiceDisconnected /onServiceConnected or any exception.
but the same is binding to the service if I update the isolatedProcess as false