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

[question]: Problem with geolocation #859

Closed
1 task done
Samuelg0ld opened this issue Mar 20, 2024 · 5 comments
Closed
1 task done

[question]: Problem with geolocation #859

Samuelg0ld opened this issue Mar 20, 2024 · 5 comments

Comments

@Samuelg0ld
Copy link

Samuelg0ld commented Mar 20, 2024

How can we help?

Hi i have problem with OneSignal geolocation. In my app i made request for geolocation and if geolocation is accepted i will set OneSignal.Location.setShared(true);

Everything works fine in emulator, but when i made build apk and then download apk to my real device, on the real device i accepted geolocation and after that nothing happened. In one signal i saw that i have new subsciption but in location point was nothing...

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Samuelg0ld
Copy link
Author

UPDATE - i tried some ways and i found that if i install apk-debug.apk it works fine but if i install apk-release.apk OneSignal.location not working - PLEASE HELP ME FIX

@nan-li
Copy link
Contributor

nan-li commented Apr 2, 2024

Hey @Samuelg0ld thanks for reporting. Can you test with obfuscation off?
Curious if this makes a difference.
See this comment on how: #713 (comment)

@Samuelg0ld
Copy link
Author

Yeah i tried it but it not working.

@FullstackWEB-developer
Copy link

I had same issue so I added this code to proguard-rule.pro and then it's also working on release mode

# Keep location-related classes and methods
-keep class com.google.android.gms.location.** { *; }
-keep class com.google.android.gms.common.api.** { *; }
-keep class com.google.android.gms.tasks.** { *; }

@jennantilla
Copy link
Contributor

Looks like this discussion has gone stale, so I'll be closing it out. @Samuelg0ld was the solution above sufficient for you?

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

4 participants