Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/210.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android检查来自服务的权限_Android - Fatal编程技术网

Android检查来自服务的权限

Android检查来自服务的权限,android,Android,我有gps服务,从哪里获取设备gps位置。但我注意到,在Anroid 6和更高版本中,无法获取位置,因为需要获得许可。我还注意到,在服务中有inhiri方法,例如checkSelfPermission(字符串权限)、int checkPermission(字符串权限、int pid、int uid)。我如何检查服务的许可 试试我的图书馆:

我有gps服务,从哪里获取设备gps位置。但我注意到,在Anroid 6和更高版本中,无法获取位置,因为需要获得许可。我还注意到,在服务中有inhiri方法,例如checkSelfPermission(字符串权限)、int checkPermission(字符串权限、int pid、int uid)。我如何检查服务的许可

试试我的图书馆: