Chinaunix首页 | 论坛 | 博客
  • 博客访问: 472337
  • 博文数量: 60
  • 博客积分: 7346
  • 博客等级: 少将
  • 技术积分: 1980
  • 用 户 组: 普通用户
  • 注册时间: 2006-06-08 15:56
文章分类

全部博文(60)

文章存档

2022年(1)

2014年(5)

2012年(12)

2011年(1)

2010年(2)

2009年(34)

2008年(5)

我的朋友

分类: 嵌入式

2012-05-28 16:38:02

跳转到设置界面手动打开
Intent myIntent = new Intent(Settings.ACTION_SECURITY_SETTINGS ); 
startActivity(myIntent);
直接代码打开
Intent gpsIntent = new Intent();
gpsIntent.setClassName("com.android.settings", "com.android.settings.widget.SettingsAppWidgetProvider");
gpsIntent.addCategory("android.intent.category.ALTERNATIVE");
gpsIntent.setData(Uri.parse("custom:3"));
try {
    PendingIntent.getBroadcast(GPSTestActivity.this, 0, gpsIntent, 0).send();
} catch (CanceledException e) {
    e.printStackTrace();
}
阅读(1306) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~