Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add android:exported="true" to com.marianhello.bgloc.sync.AuthenticatorService to match android 12 #774

Open
coachaac opened this issue Sep 16, 2022 · 2 comments

Comments

@coachaac
Copy link

need to match requirement for SDK31

Your Environment

  • Plugin version:
  • Platform: iOS or Android
  • OS version:
  • Device manufacturer and model:
  • Running in Simulator:
  • Cordova version (cordova -v):
  • Cordova platform version (cordova platform ls):
  • Plugin configuration options:
  • Link to your project:

Context

Expected Behavior

Actual Behavior

Possible Fix

Steps to Reproduce

Context

Debug logs

@KhaledOmara
Copy link

in the file cordova-plugin-background-geolocation/plugin.xml
Amend <service android:name="com.marianhello.bgloc.sync.AuthenticatorService"
add: android:exported="true"

@bstmedia
Copy link

I was able to fix this issue for myself and like to share the steps that I took:

AndroidManifest.xml
I have added to the permission.

I'm also using the the solution from here:
#719 (comment)

To request the ACTIVITY_RECOGNITION permission during run time.

plugin.xml

I have added android:exported="true" to AuthenticatorService LocationContentProvider and LocationServiceImpl

Those changes fixed the crash on startup but did not allow to run the service in background.

The fix for this was within the common background-geolocation-android repositorie. I had to update all PendingIntent in

ActivityRecognitionLocationProvider.java
NotificationHelper.java

to FLAG_MUTABLE

It seems to work fine for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants