forum

Home / DeveloperSection / Forums / Under what condition could the code sample below crash your application? How would you modify the code to avoid this potential problem?

Under what condition could the code sample below crash your application? How would you modify the code to avoid this potential problem?

Anurag Sharma 1977 04-Aug-2015
    Intent sendIntent = new Intent();
    sendIntent.setAction(Intent.ACTION_SEND);
    sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage);
    sendIntent.setType(HTTP.PLAIN_TEXT_TYPE); // "text/plain" MIME type
    startActivity(sendIntent);

Updated on 05-Aug-2015

Can you answer this question?


Answer

1 Answers

Liked By