Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

API_34 and above requires to use either RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED flags#151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
sevbanBayir wants to merge1 commit intoandroid:main
base:main
Choose a base branch
Loading
fromsevbanBayir:fix/api_34_register_receiver_flag_needed

Conversation

@sevbanBayir
Copy link

@sevbanBayirsevbanBayir commentedMar 15, 2024
edited
Loading

Location - Create and monitor Geofence sample crashes on API level 34 and above devices.

As per theregisterReceiver documentation says:

For apps targeting Build.VERSION_CODES.UPSIDE_DOWN_CAKE, either RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED must be specified if the receiver is not being registered for system broadcasts or a SecurityException will be thrown. See registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter, int) to register a receiver with flags.

It is necessary to use one of these flags when targeting API_34 and above.

Evidence:

Ekran.Kaydi.2024-03-15.23.05.13.mov

Exception:

java.lang.SecurityException: com.example.platform.app: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
at android.os.Parcel.createExceptionOrNull(Parcel.java:3057)
at android.os.Parcel.createException(Parcel.java:3041)
at android.os.Parcel.readException(Parcel.java:3024)
at android.os.Parcel.readException(Parcel.java:2966)
at

There is an additional error when registering a geofence which is again related to API levels when passing a PendingIntent flag togetBroadcast() function located in the same screen above exception thrown. I can create another PR for that.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@sevbanBayir

[8]ページ先頭

©2009-2025 Movatter.jp