/**
* 打开gps
*/
private void gpsStart(){
Intent intent = new Intent();
intent.setClassName("com.android.settings", "com.android.settings.widget.SettingsAppWidgetProvider");
intent.addCategory("android.intent.category.ALTERNATIVE");
intent.setData(Uri.parse("custom:3"));
try {
PendingIntent.getBroadcast(mContext, 0, intent, 0).send();
} catch (CanceledException e) {
e.printStackTrace();
}
}
自动打开GPS
最新推荐文章于 2022-04-09 08:26:03 发布