batman
batman

Reputation: 4918

Executing the intents manually and get its result

I'm very new to Android programming and I wish I could do this:

1)Create a new Intent

2)Execute the Intent and get its result as string.

Something like:

Instrumentation.ActivityResult ar = new Instrumentation.ActivityResult(1, new Intent(Intent.ACTION_CALL,Uri.parse("tel:" + ussd)));

I wish the intent :

new Intent(Intent.ACTION_CALL,Uri.parse("tel:" + ussd))

need to be executed and get its result.

I tried with getResultData which is just giving the:

Intent { act=android.intent.action.CALL dat=tel:xxx-xxx-xxxx } 

But I want to get the data out of it. Data I mean the data that will be displayed when this ussd executed normally.

Is is possible? Thanks in advance.

Upvotes: 1

Views: 110

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007340

I wish the intent new Intent(Intent.ACTION_CALL,Uri.parse("tel:" + ussd)) need to be executed and get its result.

There is no "result" for "executing" that Intent, for any likely definition of your term "execute".

Data I mean the data that will be displayed when this ussd executed normally.

That "data" is displayed to the user. It is not available to developers.

Upvotes: 2

Related Questions