What is the difference between these two? (I used ACTION_SENDTO as action type in the intent)
startActivity(Intent.createChooser(intentName, "some string");
and
if(intentName.resolveActivity(getPacketManager()) != null)
{
startActivity(intentName);
}
else
{
Toast.makeText(this, "No email apps in device", Toast.SHORT_LENGTH);
I used the second technique in a Android 11 (beta version) device and it showed that that No email apps in device, but I used the first technique in the same device and it worked! Why so? I checked both the apk's in my Android 9 device and both worked. Why the result is different in android 11?
Also where is the 2nd argument used in 1st technique?