AquaMail Forum

English - Android => Bug reports => Topic started by: Gibbz on February 11, 2013, 08:47:01 am

Title: Sharing with WordPad bug
Post by: Gibbz on February 11, 2013, 08:47:01 am
Hi,

Ive been working on my app Wordpad, however I try to receive the intent from aquamail sharing and I seems to give me no message body...

play.google.com/store/apps/details?id=blackcarbon.wordpad

      Intent intent = getIntent();
          Bundle extras = intent.getExtras();
      String subject = extras.getString(Intent.EXTRA_SUBJECT);
      String text = extras.getString(Intent.EXTRA_TEXT);

subject works, however text does not. If I use EXTRA_HTML_TEXT I get a html version, but I need the plain text version. Can you look into your share code and see if you are storing the data in EXTRA_TEXT?

Thanks!
Title: Re: Sharing with WordPad bug
Post by: Kostya Vasilyev on February 17, 2013, 10:29:57 pm
http://developer.android.com/reference/android/content/Intent.html#EXTRA_TEXT

>>
A constant CharSequence that is associated with the Intent, used with ACTION_SEND to supply the literal data to be sent. Note that this may be a styled CharSequence, so you must use Bundle.getCharSequence() to retrieve it.
<<

However, since this seems to be a common issue with many apps responding to ACTION_SEND, I've changed the extra from CharSequence to String for the next release.