Android Sharesheet
Today I learned about “Android Sharesheet”, simply by adding one line of code to the share intent makes it look nicer.
Line of code:
Intent shareIntent = Intent.createChooser(share, null);
The below code opens the new Android Sharesheet:
/**
* Create simple share intent by simply appending the url to the {@code shareText}.
*/
public Intent buildShareIntent(String shareText, String url) {
if (StringUtils.isEmpty(shareText) || StringUtils.isEmpty(url)) {
return null;
}
Intent share = new…