Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is REQUEST_CHECK_SETTING?

I'm following this doc: https://developer.android.com/training/location/change-location-settings.html
REQUEST_CHECK_SETTING isn't defined but used, and I can't find its value after doing several searchs, all I found is that : What is the value of REQUEST_CHECK_SETTINGS?
someone giving it a "random" value (provided link not working), can someone please tell me how to get the value? or am I supposed to define it myself?
Thank you.

like image 204
hereForLearing Avatar asked Mar 08 '23 16:03

hereForLearing


1 Answers

REQUEST_CHECK_SETTING isn't defined but used

The "training" at the Android developer site routinely skips stuff.

can someone please tell me how to get the value? or am I supposed to define it myself?

You are supposed to define it yourself. startResolutionForResult() works like startActivityForResult(), requestPermissions(), and similar methods:

  • You supply an int to the call

  • You get that int in the callback (e.g., onActivityResult() for startActivityForResult()), to help you identify what call triggered the callback

In this sample app, I used a value of 61124 (defined there as REQUEST_RESOLUTION) in my startResolutionForResult() call.

like image 195
CommonsWare Avatar answered Mar 19 '23 18:03

CommonsWare