Closed akaita closed 2 years ago
hey @akaita! Thank you for the PR.
Can you help me a little bit to understand this change (I'm not an Android dev)?
My question is whether this will have an impact on other users of the sdk.
The docs say that android:exported
practical default is already to false... We do define a intent-filter
there. Do you think other people could be using this?
๐ @Oleur, @obuiron and @YvesDelerm
you guys gave an upvote. Maybe you can help me with my question? ๐
๐ @Oleur, @obuiron and @YvesDelerm
you guys gave an upvote. Maybe you can help me with my question? ๐
Hi @marcelcorso ! Happy to tell you more about that :)
According to the documentation to support Android 12: If your app targets Android 12 and contains activities, services, or broadcast receivers that use intent filters, you must explicitly declare the android:exported attribute for these app components.
The Pusher libraries defines a Service and an Activity that are not yet compliant. Without specifying the exported attributes in the library, we are not able to compile our apps that target Android 12.
Feel free to ping if you need more details about that!
@Oleur thank you. I understand better now.
My question is: If we make explicitly android:exported = false
can it cause problems to users of the library that are upgrading?
No problems should appear as the components are already android:exported = false
but implicitly :)
Solves https://github.com/pusher/push-notifications-android/issues/123
If you target Android 12 when building (
targetSdkVersion 31
), you get this error:You need to set
android:exported
for everything that has an intent in the manifest.note: as a workaround I set this in my apps'
AndroidManifest.xml
, but I should not: