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 2862 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

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md