email: Which are Intent.ACTION_SEND return values?

前端 未结 2 470
野的像风
野的像风 2021-01-22 21:12

When I launch

startActivity(new Intent(Intent.ACTION_SEND)) 

for sending an email, which are the returned values that I can test in the

相关标签:
2条回答
  • 2021-01-22 21:28

    I know it is a bit of a cludge but why not use the H-API (Human Application Programming Interface) to determine if it was sent. Pop up a dialog and ask them "Did you send the email?" or "Was the email sent OK?". Or add a required checkbox to the calling view "Email Sent?" and ensure it is checked before allowing the user to continue.

    We try to "save" the user from having to interact as much as possible but I'm not convinced that is necessarily what they want. Not all solutions have to be solved with technical workarounds. Devs forget that sometimes.

    0 讨论(0)
  • 2021-01-22 21:44

    I don't think this is specified.

    You can't be sure which Activity will end up handling your intent, and each Activity could return different resultCodes for the same logical outcome.

    In my testing the text messaging app in the emulator returned zero no matter the outcome.

    0 讨论(0)
提交回复
热议问题