I am trying to start AppB from AppA. On activity of AppB I issue:
Intent i = new Intent();
i.setAction("START_APPB");
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.sendBroadcast(i)
Inside AppB I have a broadcast receiver that is listening on START_APPB intent filter.
as follows:
Intent i = new Intent();
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
i.setAction("SHOW_APPBPAGE");
context.startActivity(i);
Note in each case context is the activities context of the respective app.
This causes a crash error from activity manager:
IllegalArgumentException: Can't use FLAG_RECEIVER_BOOT_UPGRADE here
I have never seen this error before. When i have sent same message from first activity of App it runs without error, but somehow not on 3rd page , using context of third page.
Do not use any FLAG_ACTIVITY_
constant with sendBroadcast()
.
When populating your Intent, do:
intent.setFlags(0);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With