Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7254] Android: Intent - return EXTRA_STREAM data as blob

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-06-06T17:23:53.000+0000
Affected Version/sRelease 1.8.0.1, Release 3.3.0
Fix Version/sRelease 2.1.0, Sprint 2012-08
ComponentsAndroid
Labelsandroid, core, dr-list, module_android, qe-testadded, regression
ReporterTony Lukasavage
AssigneeBill Dawson
Created2012-01-17T10:18:24.000+0000
Updated2014-06-06T17:23:53.000+0000

Description

Attachments

FileDateSize
console_logs.txt2014-05-23T11:32:32.000+000017508
Screenshot_TIMOB-7254.png2014-05-23T11:32:32.000+0000272220

Comments

  1. Tony Lukasavage 2012-01-17

    I'm working on a pull request for this feature now. Just needed to create a corresponding Jira ticket first.
  2. Bill Dawson 2012-06-13

    Additional Testing Notes

    Here's how to get this to work (the part about the additions to the Android Manifest might be a little confusing). * Create an app with the code Tony put in above. * After you create the app, create a platform/android folder. * Copy build/android/AndroidManifest.xml to platform/android/AndroidManifest.xml. This makes a custom AndroidManifest.xml. * Open platform/android/AndroidManifest.xml. * Find the section for the default activity. It will look like this (though the name might be different in your case):
       <activity android:name=".Timob7254Activity"
           android:label="timob7254" android:theme="@style/Theme.Titanium"
           android:configChanges="keyboardHidden|orientation">
       <intent-filter>
           <action android:name="android.intent.action.MAIN" />
           <category android:name="android.intent.category.LAUNCHER" />
       </intent-filter>
       </activity>
       
    * See that "intent-filter" section? You'll want to make a second one right below it, using the intent-filter Tony provided above. So in my example it will end up looking like:
       <activity android:name=".Timob7254Activity"
           android:label="timob7254" android:theme="@style/Theme.Titanium"
           android:configChanges="keyboardHidden|orientation">
       <intent-filter>
           <action android:name="android.intent.action.MAIN" />
           <category android:name="android.intent.category.LAUNCHER" />
       </intent-filter>
       <intent-filter>
           <action android:name="android.intent.action.SEND" />
           <category android:name="android.intent.category.DEFAULT" />
           <data android:mimeType="image/*" />
       </intent-filter>
       </activity>
       
    * Save that file. * Build and install the app on a device/emulator that has some photos in its photo gallery. * Go to the device's photo gallery and long-press a photo, then select "Share" (or "Send" or whatever). * You'll see a list of installed applications that are able to share/send a photo. The app you just created should be listed among them -- choose it. * The app should open and display the photo.
  3. Natalie Huynh 2012-06-13

    Tested with Nexus One 2.2.2 with 2.1.0.v20120612170248
  4. Smbat Yeranyan 2012-06-30

    I'm having a bit of a trouble with this function, I did exactly as followed but my App throws an exception saying Uncaught TypeError: Object # has no method 'getBlobExtra' I suppose I have to reference a library in Titanium, but I'm having a difficult time understanding where and what to to reference. I even have SDK 2.1.0 installed. I simply just wanted to fetch my image path from the gallery so that I can upload it but that did not work traditionally and through hours of reading I ended up here. Thanks in advance
  5. Deepti Pandey 2014-05-23

    Reopening this ticket as application is getting crashed on launching. This is a regression . The test app is working fine using 3.2.3.GA build. Configurations used: Mac :10.9.2 Appcelerator Studio, build:3.3.0.201405211748 SDK - 3.3.0.v20140522144936 acs-1.0.14 alloy@1.4.0-alpha3 npm-1.3.2 titanium@3.3.0-alpha5 titanium-code-processor-1.1.1 Xcode :5.1.1 Devices Used: Nexus 4 (4.1.1) Please find attached log (console_logs.txt) and screenshot.
  6. Lokesh Choudhary 2014-05-23

    Tried to reproduce but the issues is not reproducible. Followed steps by [~billdawson] & the app does not crash. Selecting the app to share the pic from the gallery shows the shared pic in the app. Environment: Appc Studio : 3.3.0.201405211748 Ti SDK : 3.3.0.v20140523120121 Mac OSX : 10.8.5 Alloy : 1.4.0-alpha4 CLI - 3.3.0-alpha5 Code Processor: 1.1.1 Samsung Galaxy S4 - android 4.2.2 Sony Xperia - android 2.3.7 Samsung S3 - android 4.0.4
  7. Eric Merriman 2014-06-02

    [~dpandey] We are unable to reproduce. Can you attempt?
  8. Priya Agarwal 2014-06-03

    Closing the issue since it is not reproducible. Followed steps by Bill Dawson & the app does not crash. Selecting the app to share the pic from the gallery shows the shared pic in the app. But on importing and using the app from titanium_mobile_tests_internal/FeatureTest/Android/TIMOB-7254 app crashes.Hence test app needs modification. Verified with Environment: Appc-Studio:3.3.0.201405271647 sdk:3.3.0.v20140602174112 acs:1.0.14 alloy:1.4.0-beta npm:1.3.2 titanium:3.3.0-beta2 titanium-code-processor:1.1.1 xcode:5.1.1 Device:Nexus7(v4.4.2) OS:Maverick(10.9.2) Hence closing the issue.
  9. Lokesh Choudhary 2014-06-04

    Modifications made to the test app & pushed to repo.

JSON Source