Photos shared from Android photo gallery to Ionic app


#1

I’ve added the following to platforms/android/AndroidManifest.xml:

    <intent-filter>
        <action android:name="android.intent.action.SEND" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="image/*" />
    </intent-filter>

The above succeeds in opening my application after sharing an image from my photo gallery. Now, I need a way to catch the photo shared from the gallery and handle it in the Ionic app.

Is this possible with ngCordova? If so, or if some parallel approach is known, references and suggestions would be greatly appreciated.

Thank you,

G


#2

I found success following Mike’s 6/6/14 response at stackoverflow.com/questions/23526502/share-the-picture-from-android-gallery-to-cordova-app-using-cordova, including his fix to WebIntent.java.

(Of note, while I was able to intercept a photo shared from the photo gallery of an Android device, the image load time and its orientation were unsatisfactory; I still seek a satisfactory approach to those two issues.)

G