javascript - Android opening Instagram intent with image causes crash -
i developing app android should have functionality take picture, , share instagram app. app opens camera, takes picture , instagram app opened "crop photo" window active. seems loading picture, after couple of seconds app crashes, can't see image ever gets loaded.
i developing app on top of appcelerators titanium platform, not think problem related titanium, rather how pass image.
since emulator doesn't have instagram app, developing on galaxy s4. have tried running logcat through adb sort of error message me, thing see notices instagram exited.
here code, wrong? have checked image saved filesystem.
ti.media.showcamera({ success: function(event) { var file = ti.filesystem.getfile(ti.filesystem.tempdirectory,"ggs-instagram.jpg"); file.write(event.media); var instaintent = ti.android.createintent({ action: ti.android.action_send, packagename: "com.instagram.android", type: 'image/jpeg' }); /*instaintent.putextra(ti.android.extra_text, "extra_text"); instaintent.putextra(ti.android.extra_subject, "extra_subject");*/ instaintent.putextra(ti.android.extra_stream, file.getnativepath()); ti.android.currentactivity.startactivity(instaintent); }, cancel: function() {}, error: function (error) { if (error.code == ti.media.no_camera) { alert("din telefon/platta har ingen kamera!"); } else { alert("kamerafel!"); } }, mediatypes: [ti.media.media_type_video,ti.media.media_type_photo], showcontrols: false, autohide: false, savetophotogallery: true });
pls take at
instagram android open on user , add caption uploaded image
Comments
Post a Comment