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 jumpHome(Context context) {
    Intent startMain = new Intent(Intent.ACTION_MAIN);
    startMain.addCategory(Intent.CATEGORY_HOME);
    context.startActivity(startMain);/*from   w  w  w  . j  a  va  2 s  .  co m*/
}

From source file:Main.java

public static Intent getBrowserIntent(String url) {
    Intent browserIntent = new Intent(Intent.ACTION_VIEW);
    browserIntent.setData(Uri.parse(url));
    return browserIntent;
}

From source file:Main.java

public static Intent createButtonIntent(String buttonText, String intentActionName) {
    Intent intent = new Intent(intentActionName);
    intent.putExtra("button_text", buttonText);
    return intent;
}

From source file:Main.java

private static Intent getNormalCameraIntent() {
    Intent intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    return intent;
}

From source file:Main.java

public static void exitNavi_amap(Context context) {

    Intent mIntent = new Intent("com.autonavi.minimap");
    mIntent.putExtra("NAVI", "NAVI_EXIT");
    context.sendBroadcast(mIntent);/*from   www .j a  v a 2 s  .c  o m*/
}

From source file:Main.java

public static void exitGapdeApp_amap(Context context) {
    Intent mIntent = new Intent("com.autonavi.minimap");
    mIntent.putExtra("NAVI", "APP_EXIT");
    context.sendBroadcast(mIntent);/*from   ww  w.j a  v a  2  s.c  o m*/
}

From source file:Main.java

public static final void gotoHome(Context context) {
    Intent intent = new Intent(Intent.ACTION_MAIN);
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    intent.addCategory(Intent.CATEGORY_HOME);
    context.startActivity(intent);//from w w w. jav  a  2 s . c o  m
}

From source file:Main.java

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

From source file:Main.java

public static void startMainActivity(Context context) {
    Intent intent = new Intent("MAIN_ACTIVITY");
    intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    context.startActivity(intent);// w  w  w  . j a  v  a  2  s .  c o  m
}

From source file:Main.java

public static void startNavi3D_amap(Context context) {
    Intent mIntent = new Intent("com.autonavi.minimap");
    mIntent.putExtra("NAVI", "MAP_3D_MODEL");
    context.sendBroadcast(mIntent);//from w ww.j  a v a 2s.  c  o  m

}