REQUEST_CHECK_SETTINGS的价值是多少?

Daa*_*aan 15 android xamarin.android xamarin

我是Xamarin开发人员,我研究过这个:https: //developers.google.com/android/reference/com/google/android/gms/location/SettingsApi

我想调用方法"startResolutionForResult",但要做到这一点,我需要知道REQUEST_CHECK_SETTINGS的值.在Xamarin GPS Api中,此方法的第二个参数只是一个整数.

这可能听起来像一个愚蠢的问题,但价值没有记录,并且android文档中只有一个页面引用它:https: //www.google.nl/webhp?sourceid = chrome-instant&ion = 1&espv = 2&ie= UTF-8#q =站点:developers.google.com + REQUEST_CHECK_SETTINGS&滤波器= 0

Che*_*ron 31

神圣的废话,经过多次搜索,我找到了官方的Google样本,它将此常量定义为0x1.

protected static final int REQUEST_CHECK_SETTINGS = 0x1;
Run Code Online (Sandbox Code Playgroud)

可以在GitHub上找到有关的Sample和常量.

看起来这个值只是一个int,就像你StartActivityForResult()用来确保我们从我们请求的东西返回时一样.