提示用户启用移动数据

时间:2011-08-19 10:19:24

标签: android

  

可能重复:
  Error opening mobile network settings menu

您好我开发了一个用户需要启用3G Wi-Fi网络的应用程序。

我成功提示用户启用wi-fi并让我进入wi-fi设置位置但是当我为ACTION_DATA_ROAMING_SETTINGS做同样的事情时,结果显示

08-19 13:17:06.291: ERROR/AndroidRuntime(10981): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.DATA_ROAMING_SETTINGS

我使用的代码是

Intent gOptionsIntent = new Intent(  
      android.provider.Settings.ACTION_DATA_ROAMING_SETTINGS);  
startActivity(gOptionsIntent);  
alert.dismiss();

任何想法......?

08-19 13:17:06.291: ERROR/AndroidRuntime(10981): FATAL EXCEPTION: main
08-19 13:17:06.291: ERROR/AndroidRuntime(10981): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.DATA_ROAMING_SETTINGS }
08-19 13:17:06.291: ERROR/AndroidRuntime(10981):     at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1408)
08-19 13:17:06.291: ERROR/AndroidRuntime(10981):     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
08-19 13:17:06.291: ERROR/AndroidRuntime(10981):     at android.app.Activity.startActivityForResult(Activity.java:2817)
08-19 13:17:06.291: ERROR/AndroidRuntime(10981):     at android.app.Activity.startActivity(Activity.java:2923)
08-19 13:17:06.291: ERROR/AndroidRuntime(10981):     at min3d.sampleProject1.completed$3.onClick(completed.java:109)
08-19 13:17:06.291: ERROR/AndroidRuntime(10981):     at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:158)
08-19 13:17:06.291: ERROR/AndroidRuntime(10981):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-19 13:17:06.291: ERROR/AndroidRuntime(10981):     at android.os.Looper.loop(Looper.java:123)
08-19 13:17:06.291: ERROR/AndroidRuntime(10981):     at android.app.ActivityThread.main(ActivityThread.java:4627)
08-19 13:17:06.291: ERROR/AndroidRuntime(10981):     at java.lang.reflect.Method.invokeNative(Native Method)
08-19 13:17:06.291: ERROR/AndroidRuntime(10981):     at java.lang.reflect.Method.invoke(Method.java:521)
08-19 13:17:06.291: ERROR/AndroidRuntime(10981):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
08-19 13:17:06.291: ERROR/AndroidRuntime(10981):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
08-19 13:17:06.291: ERROR/AndroidRuntime(10981):     at dalvik.system.NativeStart.main(Native Method)

这是该问题的漏洞日志,至于我的手机有移动网络数据启用屏幕的问题......

0 个答案:

没有答案