Status Update
Comments
ev...@google.com <ev...@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
ab...@google.com <ab...@google.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.
we...@gmail.com <we...@gmail.com> #4
Thanks.
ch...@flex.one <ch...@flex.one> #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.
wi...@gmail.com <wi...@gmail.com> #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.
ve...@gmail.com <ve...@gmail.com> #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) }) {}
}
[Deleted User] <[Deleted User]> #8
kh...@gmail.com <kh...@gmail.com> #9
[Deleted User] <[Deleted User]> #10
We’ll be closing this issue due to not having enough actionable information. If you continue to have this issue, please open a new issue and add the relevant information along with a reference link to the earlier issue.
mo...@resonanzgroup.com <mo...@resonanzgroup.com> #11
ri...@bitsol.tech <ri...@bitsol.tech> #12
om...@gmail.com <om...@gmail.com> #13
I have registered the receiver with a custom action.
Sending like this:
Intent intent = new Intent("com.gt-broadcast-refresh");
requireActivity().sendBroadcast(intent);
Receiving like this:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
requireActivity().registerReceiver(refreshUIReceiver, new IntentFilter("com.gt-broadcast-refresh"), Context.RECEIVER_NOT_EXPORTED);
} else {
requireActivity().registerReceiver(refreshUIReceiver, new IntentFilter("com.gt-broadcast-refresh"));
}
It will work in the emulator with an Android 14 device, but it will not work on a real device, such as the Google Pixel 8 Pro, because it will not listen to the action. I have configured the registration based on the Google documentation for Android 14.
should I need to add any extra flag or permission while sending the custom action?
de...@gmail.com <de...@gmail.com> #14
All, I found the solution for all requireActivity().registerReceiver()
calls. They will only listen for the action if the action is sent with the package name of the application. So whenever we send a broadcast, we should also set the package with the intent using intent.setPackage(getPackageName())
. Then, the registered receiver will be able to listen for the action.
Reference link:
vm...@n-ix.com <vm...@n-ix.com> #15
Unbelievable, 9 months later this is still not in the docs.
Description
Problem you have encountered:
CircleCI allows building an iOS app with macOS container (specifically the latest Xcode 11.3.1 (Build 11C505)), whereas in Cloud Build this is not possible because it uses Dockerfile, which is based on Linux.
What you expected to happen:
It would be convenient to be able to automate builds of iOS applications using macOS container Xcode 11.3.1 (Build 11C505)
Steps to reproduce:
Other information (workarounds you have tried, documentation consulted, etc):