I'm new to android and i have noticed that i can share an intent in 2 ways.
first way :
ShareCompat.IntentBuilder.from(this).
setType(mimeType).
setChooserTitle(title).
setText(text).
startChooser();
second way is:
Intent shareIntent = ShareCompat.IntentBuilder.from(this)
.setChooserTitle(title)
.setType(mimeType)
.setText(text)
.getIntent();
if (shareIntent.resolveActivity(getPackageManager()) != null){
startActivity(shareIntent);
}
my question is ,does using startChooser()
saves me from the check that i use in the second way? ..also is there any other differences between these two functions?