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