Note that there are some explanatory texts on larger screens.

plurals
  1. POLaunch a hidden Android settings activity from a program
    primarykey
    data
    text
    <p>I'm trying to launch the Android tethering settings menu from within a program, however it's one of those semi-hidden menus with a slash in its name (com.android.settings/.tether.Tether) and I'm not sure what I should be referring to it as. This is what I've tried so far:</p> <pre><code>Intent intent = new Intent(); intent.setClassName("com.android.settings", "com.android.settings/.tether.Tether"); startActivity(intent); </code></pre> <p>I've also tried "com.android.settings/" in the setClassName line</p> <p>However, either way, it says it can't find the class:</p> <blockquote> <p>I/ActivityManager( 51): Starting activity: Intent { act=android.intent.action.MAIN cmp=com.android.settings/com.android.settings/.tether.Tether } D/AndroidRuntime( 254): Shutting down VM W/dalvikvm( 254): threadid=3: thread exiting with uncaught exception (group=0x4001b188) E/AndroidRuntime( 254): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 254): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.zzzz.launcher/com.zzzz.launcher.Launcher}: > android.content.ActivityNotFoundException: Unable to find explicit activity class > {com.android.settings/com.android.settings/.tether.Tether}; have you declared this activity in your AndroidManifest.xml?</p> </blockquote> <p>I have the following activity listed in my manifest file:</p> <pre><code>&lt;activity android:name="com.android.settings/.tether.Tether" /&gt; </code></pre> <p>(And I've also tried escaping the slash with a backslash, there)</p> <p>There doesn't appear to be any associated Settings.* value associated with it, so the usual way of launching like the following, wouldn't work:</p> <pre><code>startActivity(new Intent(Settings.ACTION_TETHER_SETTINGS)); </code></pre> <p>...but even so, I would still like to learn how I can launch it with its classname, because there are other classes with slashes in their names (such as com.android.settings./proxySelector) that I'd like to launch in a similar way.</p> <p>Cheers,</p> <p>Paul</p> <p>(Further stacktrace:)</p> <blockquote> <p>I/ActivityManager( 59): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.zzzz.launcher/.ProxySet bnds=[163,240][237,319] } I/ActivityManager( 59): Start proc com.zzzz.launcher for activity com.zzzz.launcher/.ProxySet: pid=397 uid=10040 gids={1015} I/ActivityManager( 59): Starting activity: Intent { cmp=com.android.settings/.ProxySelector } D/AndroidRuntime( 397): Shutting down VM W/dalvikvm( 397): threadid=1: thread exiting with uncaught exception (group=0x4001d800) E/AndroidRuntime( 397): FATAL EXCEPTION: main E/AndroidRuntime( 397): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.zzzz.launcher/com.zzzz.launcher.ProxySet}: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.settings/.ProxySelector}; have you declared this activity in your AndroidManifest.xml?</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload