1

I am developing an Android application which sends emails using Intent.ACTION_SEND. I am sending EXTRA_EMAIL, EXTRA_CC, EXTRA_BCC, EXTRA_SUBJECT along with it. My problem with Lotus noted is that, the above mentioned parameters are not getting populated in Lotus Notes while other email clients are working fine.

I am aware that in the Android developers site, it clearly states that

"Optionally, you can set some standard extras for the intent: EXTRA_EMAIL, EXTRA_CC, EXTRA_BCC, EXTRA_SUBJECT. If the receiving application is not designed to use them, it simply ignores them."

But there is nothing I can find to prove that Lotus Notes Traveler is one of such kind.

It will be nice if anyone can provide solution...

Thanks in advance,

Heyjii

heyjii
  • 834
  • 8
  • 26
  • Looks like you have actually proven that. If it does not react on those extras, then it is not designed to use them. It might be that Lotus Notest suppurts its own extras, if it is documented anywhere. – stealth Jan 16 '15 at 09:03

2 Answers2

1

If you want to test if any app responds particular intent type then you can do that using adb shell am command

Examples:

  • Sending intent with action view by specifying the action and data uri

    adb shell am start -a "android.intent.action.VIEW" -d "http://developer.android.com"
    
  • Sending intent with action send with an string extra by specifying the action, mime type and an extra string

    adb shell am start -a "android.intent.action.SEND" --es "android.intent.extra.TEXT" "Hello Android" -t "text/plain"
    

Try doing this for required actions and include required extras.

Praveena
  • 6,340
  • 2
  • 40
  • 53
  • Thanks @Praveen for the prompt response. I have tested it and ensured that Lotus Notes listens to the Action_Send intent. But my actual problem is it is not pre populating the bcc and cc fields even though the other intent extras are working fine... – heyjii Jan 16 '15 at 12:08
  • Send bcc and cc extras from commandline using adb if you get same result then it means your app works fine but it is the problem with Lotus app – Praveena Jan 16 '15 at 12:31
0

Thanks for your time. I got a solution which works in Lotus Notes Traveler as well. I have used the solution provided by becomputer06 for this stackoverflow question.

Here it is....

StringBuffer buffer = new StringBuffer();
    buffer.append("mailto:");
    buffer.append("stackoverflow@stackoverflow.com");
    buffer.append("?subject=");
    buffer.append("App Name");
    buffer.append("&body=");
    String uriString = buffer.toString().replace(" ", "%20");

    startActivity(Intent.createChooser(new Intent(Intent.ACTION_SENDTO, Uri.parse(uriString)), 

It uses a URI scheme to send the data and all the fields are getting populated...

Thanks and Regards,

Heyjii

Community
  • 1
  • 1
heyjii
  • 834
  • 8
  • 26