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

after installing this plugin, the app exits automatically (force close) #83

Closed
atmanegara opened this issue Jun 4, 2022 · 8 comments
Closed

Comments

@atmanegara
Copy link

atmanegara commented Jun 4, 2022

Describe the bug
like the title

To Reproduce
Steps to reproduce the behavior:

  1. install plugin
  2. copy paste example from https://haylltd.github.io/cordova-background-geolocation-plugin/example , not modify source
  3. cordova run android

Screenshots
image

Smartphone (please complete the following information):

  • Device: readmi
  • OS: android 11
  • cordova CLI : 11
  • cordova-android : 10.0.1
@HarelM
Copy link
Collaborator

HarelM commented Jun 5, 2022

I'm not aware of crashes caused by this plugin, you'll need to debug using android studio to see where it crashes...

@ivinantony
Copy link

ivinantony commented Jun 6, 2022

This was happened in android for me too. You need to ask activity recognition permission before the location permission. Otherwise the app was getting crashed

@atmanegara
Copy link
Author

This was happened in android for me too. You need to ask activity recognition permission before the location permission. Otherwise the app was getting crashed

how to add it?

  • androidManifest.xml

image

- config.xml

image

@atmanegara
Copy link
Author

I'm not aware of crashes caused by this plugin, you'll need to debug using android studio to see where it crashes...

image

@ivinantony
Copy link

Use the android permission plugin and request for the permission before asking the location permission

@ivinantony
Copy link

this.androidPermissions.requestPermission('android.permission.ACTIVITY_RECOGNITION') .then(result => { if (!result.hasPermission){ this.permissionActivity = false; }else{ this.permissionActivity = true; } }) .catch(err=>{ this.permissionActivity = false; });

@HarelM
Copy link
Collaborator

HarelM commented Jun 6, 2022

Seems like a duplicate of #48.
Feel free to send a PR to update the documentation or the code with the needed information/permission :-)
I'm using raw provider, so it might explain why I don't see this crash...

@atmanegara
Copy link
Author

solved , after install android permission plugin

Use the android permission plugin and request for the permission before asking the location permission

solved , after install android permission plugin, thank's sir

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