Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can we use startActivityforResult() for Email intent?

I am using intent for send email with attachment,it is work fine,i want to get this email intent result,i already used startActivityforResult(),but i can't get result for email intent,how can we use startActivityforResult() for Email intent?

Thanks All

like image 491
sivaraj Avatar asked Sep 23 '10 11:09

sivaraj


People also ask

How do you implement startActivityForResult?

Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main. xml. In the above code, we have taken text view to show on Activity result data.

What are result codes of startActivityForResult ()?

The two variants of startActivityForResult() method are: public void startActivityForResult (Intent intent, int requestCode) public void startActivityForResult (Intent intent, int requestCode, Bundle options)

What can I use in place of startActivityForResult?

But recently startActivityForResult() method is deprecated in AndroidX. Android came up with ActivityResultCallback (also called Activity Results API) as an alternative for it.


1 Answers

You can't, this is not part of the API. It returns once you have pressed send button even if it is not sent

like image 195
fedj Avatar answered Oct 11 '22 16:10

fedj