Hi all,

I am trying to show the network operator settings.

For this I have written something like this:

 public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        //startActivity(new Intent
(Settings.ACTION_LOCATION_SOURCE_SETTINGS)); // working
        startActivity(new Intent
(Settings.ACTION_NETWORK_OPERATOR_SETTINGS)); // NOT WORKING
    }

I am getting the following exception.

E/AndroidRuntime(  708): java.lang.RuntimeException: Unable to start
activity ComponentInfo{com.a.b/com.a.b.TelephoneOperator}:
android.content.ActivityNotFoundException: No Activity found to handle
Intent { act=android.settings.NETWORK_OPERATOR_SETTINGS }

E/AndroidRuntime(  708):        at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2401)

E/AndroidRuntime(  708):        at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2417)

E/AndroidRuntime(  708):        at android.app.ActivityThread.access$2100
(ActivityThread.java:116)

E/AndroidRuntime(  708):        at android.app.ActivityThread$H.handleMessage
(ActivityThread.java:1794)

E/AndroidRuntime(  708):        at android.os.Handler.dispatchMessage
(Handler.java:99)

E/AndroidRuntime(  708):        at android.os.Looper.loop(Looper.java:123)

E/AndroidRuntime(  708):        at android.app.ActivityThread.main
(ActivityThread.java:4203)

E/AndroidRuntime(  708):        at java.lang.reflect.Method.invokeNative
(Native Method)

E/AndroidRuntime(  708):        at java.lang.reflect.Method.invoke
(Method.java:521)

E/AndroidRuntime(  708):        at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:791)

E/AndroidRuntime(  708):        at com.android.internal.os.ZygoteInit.main
(ZygoteInit.java:549)

E/AndroidRuntime(  708):        at dalvik.system.NativeStart.main(Native
Method)

E/AndroidRuntime(  708): Caused by:
android.content.ActivityNotFoundException: No Activity found to handle
Intent { act=android.settings.NETWORK_OPERATOR_SETTINGS }

E/AndroidRuntime(  708):        at
android.app.Instrumentation.checkStartActivityResult
(Instrumentation.java:1484)

E/AndroidRuntime(  708):        at
android.app.Instrumentation.execStartActivity(Instrumentation.java:
1454)

E/AndroidRuntime(  708):        at
android.app.Activity.startActivityForResult(Activity.java:2660)

E/AndroidRuntime(  708):        at android.app.Activity.startActivity
(Activity.java:2704)

E/AndroidRuntime(  708):        at com.a.b.TelephoneOperator.onCreate
(TelephoneOperator.java:16)

E/AndroidRuntime(  708):        at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)

E/AndroidRuntime(  708):        at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2364)

E/AndroidRuntime(  708):        ... 11 more

Am I missing something? WHat is the correct approach to show the
network operator settings (Settings > Wireless controls > Mobile
networks > Network operators

Please help me.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to