0

Possible Duplicate:
Error opening mobile network settings menu

Hi i develop an application where the user needs to enable 3G of Wi-Fi networks.

I successfully prompt the user to enable wi-fi and i get him into the wi-fi settings place but when i do the same thing for ACTION_DATA_ROAMING_SETTINGS it turns out the

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

The code i use is

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

Any ideas...?

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)

this is the hole log for the problem and as for the question my phone has a mobile networks data enable screen ...

Community
  • 1
  • 1
user878813
  • 765
  • 2
  • 16
  • 28
  • according to the doc, it makes sense : "In some cases, a matching Activity may not exist, so ensure you safeguard against this. " does your phone have a settings screen for roaming? can you see what intent is used when you start it? – njzk2 Aug 19 '11 at 10:40
  • 1
    This solved it Lukas really thanks :) – user878813 Aug 19 '11 at 11:48

0 Answers0