-
Notifications
You must be signed in to change notification settings - Fork 406
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
mauron85 / cordova-plugin-background-geolocation Error in Ionic 6 Android #766
Comments
@josuelmm thank you it works but it doesnt give data when app is in background |
@mauron85 @josuelmm i used this plugin but when we allow the permission and after 2,3 second app is crashing in android. do you have any idea? and it doesn't work in background in android after 5 or 6 minutes too |
I have this configuration
Working excelent in background with the application minimized... |
@josuelmm thanks. but for me in ios app is getting crashing while allowing the permissio VIDEO-2022-03-27-19-39-45.mp4n |
Request permission of ACTIVITY_RECOGNITION before permission location |
thank you so much @josuelmm i will try this. |
|
@josuelmm does it works for you in ios too? for me it works for a 5 minutes in ios and android almost 1 hour. after that this plugin also goes sleep.can i see the way you integrated? |
You must request permission to run in the background, and notify the client that they must remove the battery saving app. You do the battery permission with powerOptimization
`async RequestOptimizations(){ async IsIgnoringDataSaver(show = false){ async IsIgnoringBatteryOptimizations(show = false){
} async HaveProtectedAppsCheck(){ |
@josuelmm thank you so much for your help this all helped me a lot. Thanks for your updates. |
@josuelmm is there any directly to the location permission instead of opening the all permissions like in this pic? |
@josuelmm but that plugin not working in Samsung can you show me an example how you are asking permission and all |
So, is this plugin "@mauron85/cordova-plugin-background-geolocation" to be ignored now and this one to be used instead "https://github.com/HaylLtd/cordova-background-geolocation-plugin/" ? I'm asking because Ionic page points to this plugin. |
Si correcto @steven-fernandez |
Gracias :) |
hi, I try to compile for andorid with that plugin but I get an error too, any tips? I already try to removed/add android platform.
|
This plugin gives error in ionic 6 android due to android permission
ionic info
Ionic:
Ionic CLI : 6.19.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.0.12
@angular-devkit/build-angular : 13.2.6
@angular-devkit/schematics : 13.2.6
@angular/cli : 13.2.6
@ionic/angular-toolkit : 6.1.0
Cordova:
Cordova CLI : 11.0.0
Cordova Platforms : android 10.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 3 other plugins)
Utility:
cordova-res : 0.15.4
native-run : 1.5.0
System:
ios-deploy : 1.11.4
NodeJS : v16.14.0 (/usr/local/bin/node)
npm : 8.1.0
OS : macOS Monterey
Xcode : Xcode 13.3 Build version 13E113
cordova -v
): 11.0.0cordova platform ls
):Context
In Ios its working fine but in android while creating build it shows error of android permission.
Expected Behavior
Its should not have any issue while android build
Actual Behavior
FAILURE: Build failed with an exception.
Execution failed for task ':app:mergeDebugResources'.
Possible Fix
Steps to Reproduce
1.create an ionic 6 app
2. installed this plugin
3.create android build
Context
Debug logs
The text was updated successfully, but these errors were encountered: