Skip to main content
added clerification
Source Link
Sir Codesalot
  • 7.4k
  • 2
  • 54
  • 61

It shouldn't be any different but this works for me every time (not only once):

ActivityCompat.requestPermissions(activity, new String[]{Manifest.permission.ACCESS_BACKGROUND_LOCATION}, REQUEST_BACKGROUND_LOCATION_PERMISSION); 

It shouldn't be any different but this works for me every time:

ActivityCompat.requestPermissions(activity, new String[]{Manifest.permission.ACCESS_BACKGROUND_LOCATION}, REQUEST_BACKGROUND_LOCATION_PERMISSION); 

It shouldn't be any different but this works for me every time (not only once):

ActivityCompat.requestPermissions(activity, new String[]{Manifest.permission.ACCESS_BACKGROUND_LOCATION}, REQUEST_BACKGROUND_LOCATION_PERMISSION); 
Source Link
Sir Codesalot
  • 7.4k
  • 2
  • 54
  • 61

It shouldn't be any different but this works for me every time:

ActivityCompat.requestPermissions(activity, new String[]{Manifest.permission.ACCESS_BACKGROUND_LOCATION}, REQUEST_BACKGROUND_LOCATION_PERMISSION);