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 void showMarketPublish(Context context, String publish) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("market://search?q=pub:" + publish)); context.startActivity(intent);/*from w w w . j av a 2 s. c o m*/ }
From source file:Main.java
public static void openUrlInBrowser(Context context, String url) { Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); context.startActivity(browserIntent); }
From source file:Main.java
private static void openUrlInBrowser(Context context, String url) { Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); context.startActivity(browserIntent); }
From source file:Main.java
public static void locationMarket(Context context, String packangeName) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("market://details?id=" + packangeName)); context.startActivity(intent);/*w w w .j a v a 2 s. co m*/ }
From source file:Main.java
public static void openGooglePlayForApp(Context context, String namespace) { Intent inPlay = new Intent(Intent.ACTION_VIEW); inPlay.setData(Uri.parse("market://details?id=" + namespace)); context.startActivity(inPlay);//from www. ja va2 s . c om }
From source file:Main.java
public static Intent getInstallIntent(File apkFile) { Intent intent = new Intent(); intent.setAction(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(new File(apkFile.getAbsolutePath())), "application/vnd.android.package-archive"); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); return intent; }
From source file:Main.java
public static void forwardBySms(Context context, String body) { if (body != null) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setType("vnd.android-dir/mms-sms"); // intent.putExtra("forwarded_message",true); // comment this may improve performance for forwarding sms intent.putExtra("sms_body", body); context.startActivity(intent);/*from w w w.j a va 2s .co m*/ } }
From source file:Main.java
public static void openSourceURL(Activity activity, String title, String url) { Intent intent = new Intent(Intent.ACTION_VIEW); Uri uri = Uri.parse(url);/*from w w w . j a v a 2 s.c o m*/ intent.setData(uri); activity.startActivity(Intent.createChooser(intent, title)); }
From source file:Main.java
public static void showMarketProductBuyPackage(Context context, String pack) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("market://details?id=" + pack)); context.startActivity(intent);//from www .j a v a 2 s. c o m }
From source file:Main.java
public static void browse(String url) { Intent browseIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); _context.startActivity(browseIntent); }