David Matos
David Matos

Reputation: 560

How to visually simulate sending a SMS?

Is there any way to populate the address and SMS body AFTER launching the intent? I'd like to first open the app responsible for sending the SMS that, like this:

Intent smsIntent = new Intent(Intent.ACTION_VIEW);
smsIntent.setType("vnd.android-dir/mms-sms");
startActivity(smsIntent);

And then wait a few seconds and fill the address, wait a bit more and fill the body.

Upvotes: 0

Views: 55

Answers (1)

Bonatti
Bonatti

Reputation: 2781

As far as I can tell, you cannot interact with another process (another application) unless by specific APIs from that application. This means that you the developer, cannot order an application to do anything other than what it has allowed you to do so. (This is mostly for security, otherwise you could order a SMS application to give Contacts or other app provided info.)

If what you need is a demonstration, the I suggest making several "incremental" apps. Start with one that "does X"... then "does x, y", then "x, y , z and etc.."

This way, the reader can tell what is the purpose of each code written.

Upvotes: 1

Related Questions