List of usage examples for android.content Intent ACTION_VIEW
String ACTION_VIEW
To view the source code for android.content Intent ACTION_VIEW.
Click Source Link
From source file:Main.java
public static Intent getSMSIntent(String body) { Intent it = new Intent(Intent.ACTION_VIEW); it.putExtra("sms_body", body); it.setType("vnd.android-dir/mms-sms"); return it;//from w ww . java 2 s . c om }
From source file:Main.java
public static Intent getInstallIntent(Uri uri) { Intent i = new Intent(Intent.ACTION_VIEW); i.setDataAndType(uri, "application/vnd.android.package-archive"); i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); return i;/*from w w w .j av a 2 s. c om*/ }
From source file:Main.java
public static Intent getInstallIntent(Uri uri) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(uri, "application/vnd.android.package-archive"); return intent; }
From source file:Main.java
public static Intent getMediaIntent(String path) { Intent it = new Intent(Intent.ACTION_VIEW); Uri uri = Uri.parse(path);/*from w w w.j a v a2 s.co m*/ it.setDataAndType(uri, "audio/mp3"); return it; }
From source file:Main.java
public static void newMessage(Context context) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setType("vnd.android-dir/mms-sms"); // intent.putExtra("sms_body", ""); context.startActivity(intent);/*from w w w .j a va 2 s. c o 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 getGooglePlayWebsiteIntent(final String pPackageName) { return new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=" + pPackageName)); }
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 w w w . j a v a2 s .c o m*/ }
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);/*w w w.j a va2 s . c o m*/ }
From source file:Main.java
public static Intent getPluginsIntent() { return new Intent(Intent.ACTION_VIEW, Uri.parse("http://plugins.announcify.com/")); // market://search?q=Announcify }