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

BackgroundLocation.getLocationUpdates don't work #145

Closed
qcuong97 opened this issue Feb 11, 2022 · 26 comments
Closed

BackgroundLocation.getLocationUpdates don't work #145

qcuong97 opened this issue Feb 11, 2022 · 26 comments
Labels
duplicate This issue or pull request already exists

Comments

@qcuong97
Copy link

qcuong97 commented Feb 11, 2022

I use 0.8.1 it not work, but it's work with 0.6.0

[√] Flutter (Channel stable, 2.5.0, on Microsoft Windows [Version 10.0.18363.1556], locale vi-VN)
• Flutter version 2.5.0 at C:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4cc385b4b8 (5 months ago), 2021-09-07 23:01:49 -0700
• Engine revision f0826da7ef
• Dart version 2.14.0

@KamilSvoboda
Copy link

KamilSvoboda commented Feb 15, 2022

In my case it doesn't work in combination with Firebase Messaging initialization FirebaseMessaging.onBackgroundMessage
If I remove this code, then the updates are called.

@KarimAbdo
Copy link

@KamilSvoboda this drove me crazy. did you manage to find a work around ?

@KamilSvoboda
Copy link

KamilSvoboda commented Feb 28, 2022

@KamilSvoboda this drove me crazy. did you manage to find a work around ?

Unfortunately not. :( I'm waiting for the response of the plugin author.

@jesussmile
Copy link

Damn! Mine too. Any suggestions for other plugins ?

@KarimAbdo
Copy link

@jesussmile, i have my eye on https://pub.dev/packages/geolocation but haven't tried it yet

@rsbthebest
Copy link

Bumping this up, am facing the same issue on Android. Is it linked to FirebaseMessaging.onBackgroundMessage??

9 similar comments
@rsbthebest
Copy link

Bumping this up, am facing the same issue on Android. Is it linked to FirebaseMessaging.onBackgroundMessage??

@rsbthebest
Copy link

Bumping this up, am facing the same issue on Android. Is it linked to FirebaseMessaging.onBackgroundMessage??

@rsbthebest
Copy link

Bumping this up, am facing the same issue on Android. Is it linked to FirebaseMessaging.onBackgroundMessage??

@rsbthebest
Copy link

Bumping this up, am facing the same issue on Android. Is it linked to FirebaseMessaging.onBackgroundMessage??

@rsbthebest
Copy link

Bumping this up, am facing the same issue on Android. Is it linked to FirebaseMessaging.onBackgroundMessage??

@rsbthebest
Copy link

Bumping this up, am facing the same issue on Android. Is it linked to FirebaseMessaging.onBackgroundMessage??

@rsbthebest
Copy link

Bumping this up, am facing the same issue on Android. Is it linked to FirebaseMessaging.onBackgroundMessage??

@rsbthebest
Copy link

Bumping this up, am facing the same issue on Android. Is it linked to FirebaseMessaging.onBackgroundMessage??

@rsbthebest
Copy link

Bumping this up, am facing the same issue on Android. Is it linked to FirebaseMessaging.onBackgroundMessage??

@qcuong97
Copy link
Author

qcuong97 commented Apr 4, 2022

Bumping this up, am facing the same issue on Android. Is it linked to FirebaseMessaging.onBackgroundMessage??

You should use v0.7.0, it's not be error

@rsbthebest
Copy link

Wow am soo sorry 😔 didnt wanted to spam post it here, might be my internet acting up. I will give 0.7.0 a try thanks.

@jesussmile
Copy link

Bumping this up, am facing the same issue on Android. Is it linked to FirebaseMessaging.onBackgroundMessage??

You should use v0.7.0, it's not be error

following your advice, I downgraded but keep running into this error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':background_location:compileDebugKotlin'.
> Compilation error. See log for more details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

@qcuong97
Copy link
Author

qcuong97 commented Apr 5, 2022

Bumping this up, am facing the same issue on Android. Is it linked to FirebaseMessaging.onBackgroundMessage??

You should use v0.7.0, it's not be error

following your advice, I downgraded but keep running into this error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':background_location:compileDebugKotlin'.
> Compilation error. See log for more details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

You try run android native source for debug error
My infor:
Kotlin version: 1.6.10
Gradle:4.1.0

@rsbthebest
Copy link

Hi Team,

V 0.7.0 won't work on Android 12 because of this error:

Unable to create service com.almoullim.background_location.LocationUpdatesService: java.lang.IllegalArgumentException: uk.co.walkwithyou.walkwithyou: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.

So can't use it.

@rsbthebest
Copy link

Removing "FirebaseMessaging.onBackgroundMessage" fixed it, but we need a real solution which can help us use FirebaseMessaging.onBackgroundMessage with this plugin.

@jesussmile
Copy link

Why don't you use Background locator plugin instead . It works fine.

@rsbthebest
Copy link

Because this is not a blocker for me as of now, so I this plugin is fixed am happy to continue using it.

@MoralCode
Copy link
Collaborator

@qcuong97 were you also trying to use firebase when encountering this originally?

if so lets use #139 as the canonical issue for this problem

@qcuong97
Copy link
Author

Yes, it my problem so i used Geolocator

@MoralCode
Copy link
Collaborator

gotcha, in that case, closing this as a duplicate of #139 to consolidate everything into one issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

6 participants