Status Update
Comments
ya...@google.com <ya...@google.com> #2
Thank you for reporting this issue. For us to further investigate this issue, please provide the following additional information:
Please mention the steps to be followed for reproducing the issue with the given sample apk.
Android full bug report capturing
After reproducing the issue, press the volume up, volume down, and power button simultaneously. This will capture a bug report on your device in the “bug reports” directory.
Alternate method
Navigate to “Developer options”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Screen record of the issue, for clarity
Please capture screen record or video of the issue using the following steps:
adb shell screenrecord /sdcard/video.mp4
Subsequently use following command to pull the recorded file:
adb pull /sdcard/video.mp4\
Note: Please upload the files to google drive and share the folder to
ky...@gmail.com <ky...@gmail.com> #3
Error: The intent action com.example.action (used to send a broadcast) matches the intent filter of a non-exported receiver, registered via a call to Context.registerReceiver, or similar. If you are trying to invoke this specific receiver via the action then you should use Intent.setPackage(<APPLICATION_ID>). [UnsafeImplicitIntentLaunch]
Button(onClick = { context.sendBroadcast(Intent("com.example.action")) }) {}
I wasn't aware that the explicit intent requirements from API 34 applied to broadcasts as well. I do think it would be beneficial to display this error when building the app for development, not just during the build task to produce an APK. Either way, the issue isn't an issue after all.
ya...@google.com <ya...@google.com> #4
Thanks.
it...@google.com <it...@google.com> #5
* Dynamically registered receiver with RECEIVER_EXPORTED flag: Can get broadcast with custom action sent from the same app using `Context#sendBroadcast()` API.
* Dynamically registered receiver with RECEIVER_NOT_EXPORTED flag: Cannot get broadcast with custom action sent from the same app using `Context#sendBroadcast()` API.
iv...@tenderly.co <iv...@tenderly.co> #6
Thank you for reporting this issue. We have shared this with our product and engineering team and will update this issue with more information as it becomes available.
md...@e-dialog.group <md...@e-dialog.group> #7
Our engineering team responded :
It is indeed related to the changes applied for Safer Implicit Intents, this is the intended behaviour.
To fix this issue, the developer will need to make the intent explicit (either explicit by package or explicit by component), the following change will fix it:
@Composable
fun Greeting(name: String, modifier: Modifier = Modifier, context: Context) {
Button(onClick = { context.sendBroadcast(Intent("com.example.action")) }) {}
}
should become something like:
@Composable
fun Greeting(name: String, modifier: Modifier = Modifier, context: Context) {
val intent = Intent("com.example.action")
intent.setPackage(context.getPackageName())
Button(onClick = { context.sendBroadcast(intent) }) {}
}
Description
Please describe your requested enhancement. Good feature requests will solve common problems or enable new use cases.
What you would like to accomplish:
Easily alert a team when an error occurs.
How this might work:
Either Cloud PubSub topic for stackdriver errors or direct slack notifications. Either allowing org level setup and not tied to a personal account.
If applicable, reasons why alternative solutions are not sufficient:
Having to forward emails from a personal gsuite account is not repeatable or acceptable for a team.