question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LocationUpdatesForegroundService cannot launch application

See original GitHub issue

I get this code by git clone. If you launch this app on your Emulator, you cannot launch the app. Android monitor sends me these messages.

com.google.android.gms.location.sample.locationupdatesforegroundservice E/AndroidRuntime: FATAL EXCEPTION: GoogleApiHandler
                                                                                                                       Process: com.google.android.gms.location.sample.locationupdatesforegroundservice, PID: 2932
                                                                                                                       java.lang.SecurityException: Client must have ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission to perform any location operations.

How can I launch this app? Ofcause, in my Manifest, I put these permissions

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
samtsterncommented, Aug 11, 2017
0reactions
LNFWebsitecommented, Jun 26, 2018

Remove the getlastlocation call inside onCreate. See the comments above.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Request location updates - Android Developers
Before requesting location updates, your app must connect to location services and make a location request. The lesson on Changing Location Settings shows...
Read more >
com.peptrack.gps.locationupdatesforegroundservice.MainActivity ...
LocalBroadcastManager; import android.support.v7.app. ... notification is displayed, the user has the option to launch the * activity from the notification.
Read more >
Receive location updates in Android with Kotlin
Android 10 and 11 give users more control over their apps' access to their device locations. When an app running on Android 11...
Read more >
App doesn't send location in background! : r/androiddev - Reddit
But when I open it from recent apps, its still live and immediately starts sending ... /android-play-location/tree/master/LocationUpdatesForegroundService.
Read more >
I can't locate successfully installed android studio in windows 10
I found studio64.exe in following directory. C:\Program Files\Android\Android Studio\bin. Here I can launch android studio by double ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found