You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In androidU,if the app target is 34 , when we registerReceiver,we must use the RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED flag , but the class InstrumentationConnection did not do this when it int.
so my app is crash on androidU devices
the error code in InstrumentationConnection is on line 173
targetContext.registerReceiver(messengerReceiver, new IntentFilter(BROADCAST_FILTER));
Expected Results
I want the class InstrumentationConnection on line 173 like this:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
targetContext.registerReceiver(messengerReceiver, new IntentFilter(BROADCAST_FILTER),Context.RECEIVER_EXPORTED);
} else {
targetContext.registerReceiver(messengerReceiver, new IntentFilter(BROADCAST_FILTER));
}
Link to a public git repo demonstrating the problem:
Can you provide more details? What versions of the libraries are you using, ideally a complete sample project. We have many passing tests that target and run on android U
Description
In androidU,if the app target is 34 , when we registerReceiver,we must use the RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED flag , but the class InstrumentationConnection did not do this when it int.
so my app is crash on androidU devices
the error code in InstrumentationConnection is on line 173
targetContext.registerReceiver(messengerReceiver, new IntentFilter(BROADCAST_FILTER));
Expected Results
I want the class InstrumentationConnection on line 173 like this:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
targetContext.registerReceiver(messengerReceiver, new IntentFilter(BROADCAST_FILTER),Context.RECEIVER_EXPORTED);
} else {
targetContext.registerReceiver(messengerReceiver, new IntentFilter(BROADCAST_FILTER));
}
Link to a public git repo demonstrating the problem:
https://developer.android.google.cn/guide/components/broadcasts#context-registered-receivers
The text was updated successfully, but these errors were encountered: