Skip to content

Instantly share code, notes, and snippets.

@aquarla
Created November 9, 2011 04:39
Show Gist options
  • Save aquarla/1350408 to your computer and use it in GitHub Desktop.
Save aquarla/1350408 to your computer and use it in GitHub Desktop.
Androidのテザリング設定画面を開くだけのアプリ
package net.aquarla.android.tethershortcut;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
/*
* テザリング設定画面を開くだけのActivity
* 以下を参考にした
* http://groundwalker.com/blog/315
*/
public class TetherShortcutActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent i = new Intent(Intent.ACTION_MAIN);
i.setClassName(
"com.android.settings",
"com.android.settings.TetherSettings");
try {
startActivity(i);
} catch (Exception e) {
}
finish();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment