Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Some text");
shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Some other text");
startActivity(Intent.createChooser(shareIntent, "Title for chooser"));
private void startShareMediaActivity(IImage image) {
boolean isVideo = image instanceof VideoObject;
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.setType(image.getMimeType());
intent.putExtra(Intent.EXTRA_STREAM, image.fullSizeImageUri());
try {
startActivity(Intent.createChooser(intent, getText(
isVideo ? R.string.sendVideo : R.string.sendImage)));
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(this, isVideo
? R.string.no_way_to_share_image
: R.string.no_way_to_share_video,
Toast.LENGTH_SHORT).show();
}
}