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
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.
The two variants of startActivityForResult() method are: public void startActivityForResult (Intent intent, int requestCode) public void startActivityForResult (Intent intent, int requestCode, Bundle options)
But recently startActivityForResult() method is deprecated in AndroidX. Android came up with ActivityResultCallback (also called Activity Results API) as an alternative for it.
You can't, this is not part of the API. It returns once you have pressed send button even if it is not sent
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With