Example usage for android.content Intent Intent

List of usage examples for android.content Intent Intent

Introduction

In this page you can find the example usage for android.content Intent Intent.

Prototype

protected Intent(Parcel in) 

Source Link

Usage

From source file:Main.java

public static void jumpToSystemSetting(Context context) {
    Intent intent = new Intent("acton.settings.personal.ServicePhone");
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(intent);/*from ww  w. java2  s .co m*/
}

From source file:Main.java

public static void openSetting(Activity paramActivity) {
    paramActivity.startActivity(new Intent("android.settings.WIFI_SETTINGS"));
}

From source file:Main.java

public static Intent getPrivacySettingsLaunchIntent() {
    return new Intent("android.settings.PRIVACY_SETTINGS"); // android.provider.Settings.ACTION_PRIVACY_SETTINGS Since API level 5
}

From source file:Main.java

public static void closeNaviBroadcast_amap(Context context) {
    Intent mIntent = new Intent("com.autonavi.minimap");
    mIntent.putExtra("NAVI", "CLOSE_TRAFFIC_BROADCAST");
    context.sendBroadcast(mIntent);//from www . jav  a 2 s  .c o m

}

From source file:Main.java

public static void startMessageActivity(Context context) {
    Intent it = new Intent(Intent.ACTION_VIEW);
    it.putExtra("sms_body", "The SMS text");
    it.setType("vnd.android-dir/mms-sms");
    context.startActivity(it);//from ww w.  j ava  2 s .  co  m
}

From source file:Main.java

public static void jumpToHomeActivity(Context context) {
    Intent mHomeIntent = new Intent("android.intent.action.MAIN");
    mHomeIntent.addCategory("android.intent.category.HOME");
    mHomeIntent.addFlags(270532608);/*from  ww w.  j  a v  a 2  s  . c  o  m*/
    context.startActivity(mHomeIntent);
}

From source file:Main.java

public static void startNetworkSettingActivity(Context context) {
    Intent intent = new Intent("android.settings.WIRELESS_SETTINGS");
    context.startActivity(intent);//from www .  jav a  2s . c  o m
}

From source file:Main.java

public static void enableDiscoverable(Context paramContext) {
    Intent localIntent = new Intent("android.bluetooth.adapter.action.REQUEST_DISCOVERABLE");
    localIntent.putExtra("android.bluetooth.adapter.extra.DISCOVERABLE_DURATION", 300);
    paramContext.startActivity(localIntent);
}

From source file:Main.java

public static Intent getAppDetailsSettingsIntent(String packageName) {
    Intent intent = new Intent("android.settings.APPLICATION_DETAILS_SETTINGS");
    intent.setData(Uri.parse("package:" + packageName));
    return intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
}

From source file:Main.java

public static void sendMessageText(Activity activity, String text) {
    Intent it = new Intent(Intent.ACTION_VIEW);
    it.putExtra("sms_body", text);
    it.setType("vnd.android-dir/mms-sms");
    activity.startActivity(it);//from   w ww . j  av  a2s .c  om
}