The task of this application is to implicitly activate a separate application to view the URL, “http:// www.google.com”. So, App Chooser should appear and let me choose betw
Easy implementation of multiple actions app chooser:
Intent phoneCall = new Intent(Intent.ACTION_DIAL, Uri.fromParts("tel", contactNumber, null));
// Intent sms = new Intent(Intent.ACTION_VIEW, Uri.parse("sms:" + contactNumber));
Intent whatsapp = new Intent(Intent.ACTION_SENDTO, Uri.parse("smsto:" + contactNumber));
Uri.Builder builder = CalendarContract.CONTENT_URI.buildUpon();
builder.appendPath("time");
ContentUris.appendId(builder, Calendar.getInstance().getTimeInMillis());
Intent calendarIntent = new Intent(Intent.ACTION_VIEW).setData(builder.build());
Intent chooser = Intent.createChooser(whatsapp, "chooser??"); // default action
chooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[]{phoneCall, calendarIntent}); // additional actions
startActivity(chooser);