Users Pricing

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 2774 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);

1 Answers