[TIMOB-2587] Android: Support setting true URIs for EXTRA_STREAM
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:59:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M05 |
Components | Android |
Labels | android, feature, intent, release-1.6.0 |
Reporter | Bill Dawson |
Assignee | Bill Dawson |
Created | 2011-04-15T03:23:39.000+0000 |
Updated | 2011-04-17T01:59:32.000+0000 |
Description
Our IntentProxy.getData
is implemented by returning
Intent.getDataString
("The same as getData(), but
returns the URI as an encoded String" [android docs]). This means
we can't then take that information and pass it back into a new
intent's EXTRA_STREAM field. (EXTRA_STREAM: "A content: URI holding
a stream of data associated with the Intent, used with ACTION_SEND
to supply the data being sent.").
This, in turn, means we can't use our new intents and such to do something like the following:
- Start the sound recorder activity and get the Uri to the recorded sound file back.
- Pass that uri to a picker for ACTION_SEND (so as to send the audio file to somebody.)
For example, if you try the attached win.js and select the Gmail app as the sending mechanism, Gmail crashes with
W/Bundle (30615): Key android.intent.extra.STREAM expected Parcelable but value was a java.lang.String. The default value <null> was returned.
W/Bundle (30615): Attempt to cast generated internal exception:
W/Bundle (30615): java.lang.ClassCastException: java.lang.String
Attachments
File | Date | Size |
---|---|---|
win.js | 2011-04-15T03:23:40.000+0000 | 2143 |