OneSignal / OneSignal-Flutter-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your flutter app with OneSignal
https://www.onesignal.com
Other
625 stars 214 forks source link

[question]: OneSignal 5.0.0 did not collect location #747

Closed Suzven closed 11 months ago

Suzven commented 1 year ago

How can we help?

Hi! I updated the SDK version in my flutter application and get problem that the user's geolocation not collected. Prompt location request did not show

I tried: 1) checked for isSharedLocation() - in response I received "true": 2) Add to manifest permissions ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION, ACCESS_BACKGROUND_LOCATION; 3) add to build.gradle implementation of gms:play-services-location:21.0.1; 4) rebuild project; 5) tested it on 3 real devices and 4 emulators; 6) downgrade to previous version 3.5.1 of flutter sdk - all works fine; 7) added/removed the await modifier.

My code on screenshot:

Знімок екрана 2023-09-19 о 21 08 33

Screenshot from OneSignal Dashbord with examples of test installs:

Знімок екрана 2023-09-19 о 21 14 57

Code of Conduct

nan-li commented 1 year ago

Hi @Suzven, thank you for reaching out with your question.

Did you try setting location shared to true before asking for permission?

You likely need to call OneSignal.Location.setShared(true) before calling OneSignal.Location.requestPermission().

nan-li commented 11 months ago

closing due to no response