问题描述
我是 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 文档中只有一页提到了它: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
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;
样本和有问题的常量 可以在 GitHub 上找到.
The Sample and the constant in question can be found on GitHub.
(旧的 github 链接已损坏.检查新的)
(old github link is broken. Check the new one)
看起来这个值只是一个整数,就像你使用 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 的值是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!