Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-2587

Android: Support setting true URIs for EXTRA_STREAM

    Details

      Description

      {html}<div><p>Our <code>IntentProxy.getData</code> is implemented by returning
      <code>Intent.getDataString</code> ("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.").<br></p>
      <p>This, in turn, means we can't use our new intents and such to do
      something like the following:</p>
      <ul>
      <li>Start the sound recorder activity and get the Uri to the
      recorded sound file back.</li>
      <li>Pass that uri to a picker for ACTION_SEND (so as to send the
      audio file to somebody.)</li>
      </ul>
      <p>For example, if you try the attached win.js and select the Gmail
      app as the sending mechanism, Gmail crashes with</p>
      <pre>
      <code>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</code>
      </pre></div>{html}

        Attachments

          Activity

            People

            • Assignee:
              billdawson Bill Dawson
              Reporter:
              billdawson Bill Dawson
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration