REQUEST_CHECK_SETTINGS的值是多少? [英] What is the value of REQUEST_CHECK_SETTINGS?
问题描述
我是Xamarin开发人员,我对此进行了研究: https://developers.google.com/android/reference/com/google/android/gms/location/SettingsApi
I am Xamarin developer and I studied this: https://developers.google.com/android/reference/com/google/android/gms/location/SettingsApi
我想调用方法"startResolutionForResult",但是要做到这一点,我需要知道REQUEST_CHECK_SETTINGS的值.在Xamarin GPS Api中,此方法的第二个参数只是一个整数.
I want to call the method "startResolutionForResult" but to do that I need to know the value of REQUEST_CHECK_SETTINGS. In the Xamarin GPS Api, the second argument of this method is just an integer.
这听起来像是一个愚蠢的问题,但未记录该值,因此android文档中只有一个页面引用该值:
It may sound like a stupid question but the value is not documented and there is only one page in the android documentation that refers to it: https://www.google.nl/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=site:developers.google.com+REQUEST_CHECK_SETTINGS&filter=0
推荐答案
神圣的废话,经过大量搜索,我找到了Google的官方示例,该示例将该常量定义为 0x1
.
Holy crap, after much searching I found the official Google sample, which defines this constant to 0x1
.
protected static final int REQUEST_CHECK_SETTINGS = 0x1;
示例和相关常量好像您使用 StartActivityForResult()
来确保我们从请求的内容返回时一样,此值似乎只是一个整数.
It seems this value is just an int just like when you use StartActivityForResult()
to make sure we are returning from something we requested.
这篇关于REQUEST_CHECK_SETTINGS的值是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!