mobileExportImageToAlbum broken?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
mobileExportImageToAlbum broken?
community 6.0.1
On android, trying to export an image to album/gallery by:
put the long ID of image "myImage" into tImageID
mobileExportImageToAlbum tImageID, "my_file"
...yet I get "export failed" every time....(and YES, there is a valid 'image "myImage"')
Does mobileExportImageToAlbum not work on android? How about iOS?
Testing on a sprint Nexus S (Android 4.1.1)
EDIT: It has been suggested in other threads to "export image" to a full path such as "/sdcard/Pictures/my_file.jpg". While indeed a file can be successfully written, this workaround is not so good because (on my Nexus S 4.1.1) a "rescan" of the media library is not performed, and the newly "exported" image is not visible when going to "gallery". One must power down then up in order to make the phone "scan" for new pictures. After a re-boot, the "exported" image can indeed be seen using android's "gallery"...As part of this "export image" workaround, I've been trying to find a way to force android to "re-scan", but have failed in all attempts. (Note that when tapping "gallery", the menu key has a "refresh" option....tapping that option does NOT force android to rescan the Pictures folder for changes)
On android, trying to export an image to album/gallery by:
put the long ID of image "myImage" into tImageID
mobileExportImageToAlbum tImageID, "my_file"
...yet I get "export failed" every time....(and YES, there is a valid 'image "myImage"')
Does mobileExportImageToAlbum not work on android? How about iOS?
Testing on a sprint Nexus S (Android 4.1.1)
EDIT: It has been suggested in other threads to "export image" to a full path such as "/sdcard/Pictures/my_file.jpg". While indeed a file can be successfully written, this workaround is not so good because (on my Nexus S 4.1.1) a "rescan" of the media library is not performed, and the newly "exported" image is not visible when going to "gallery". One must power down then up in order to make the phone "scan" for new pictures. After a re-boot, the "exported" image can indeed be seen using android's "gallery"...As part of this "export image" workaround, I've been trying to find a way to force android to "re-scan", but have failed in all attempts. (Note that when tapping "gallery", the menu key has a "refresh" option....tapping that option does NOT force android to rescan the Pictures folder for changes)
Re: mobileExportImageToAlbum broken?
Under iOS, mobileExportImageToAlbum works fine. Instead I think I have the same problem with this command under Android.
PS
I think that to use "export image" command in Android you need to know exactly where to export, and maybe you need an external to do this (e.g. mergAndroid). In fact under Android, specialFolderPath LC's function, gives you only "engine", "documents" and "cache" directories.
Anyway I tried to do in that way, but maybe I'm missing something because it don't work:
PS
I think that to use "export image" command in Android you need to know exactly where to export, and maybe you need an external to do this (e.g. mergAndroid). In fact under Android, specialFolderPath LC's function, gives you only "engine", "documents" and "cache" directories.
Anyway I tried to do in that way, but maybe I'm missing something because it don't work:
Code: Select all
put mergStoragePath("pictures") into myPath -- uses mergAndroid external
answer myPath -- and the path looks like OK (maybe): /mnt/sdcard/Pictures
export image myImage of card myCard to file (myPath &"/photo34443.jpg") as JPEG -- don't work
Re: mobileExportImageToAlbum broken?
OK, mobileExportImageToAlbum don't work because a LiveCode bug.
The other way (using mergStoragePath - mergAndroid external) it seems does work.
Any other way to export an image/video on the Android's device camera roll?
The other way (using mergStoragePath - mergAndroid external) it seems does work.
Any other way to export an image/video on the Android's device camera roll?
Re: mobileExportImageToAlbum broken?
I know RR has been busy with 665 670 and 7 (and the 6.5 series before that), but as far as I can tell, mobileExportImageToAlbum has *NEVER* worked on android. Complaints and bug reports are nearly a year old.
Such a fundamental feature, and it just flat out does not work ("export failed"). I'm astonished its never been addressed....(sigh).....
Such a fundamental feature, and it just flat out does not work ("export failed"). I'm astonished its never been addressed....(sigh).....
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: mobileExportImageToAlbum broken?
Hi pkocsis,
You probably don't want a workaround but... here.
That will show up in the Gallery.
If loading via USB, remember to unplug it or the sd card won't show up.
Simon
Edit; For those devices that don't have an sd card you just search for DCIM in the root.
You probably don't want a workaround but... here.
Code: Select all
on mouseUp
set the defaultFolder to "/mnt/sdcard/DCIM/"
put image "myImage" into url("binfile:picTest.jpg")
answer the result
end mouseUp
If loading via USB, remember to unplug it or the sd card won't show up.
Simon
Edit; For those devices that don't have an sd card you just search for DCIM in the root.
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: mobileExportImageToAlbum broken?
pkocsis wrote:I know RR has been busy with 665 670 and 7 (and the 6.5 series before that), but as far as I can tell, mobileExportImageToAlbum has *NEVER* worked on android. Complaints and bug reports are nearly a year old.
Such a fundamental feature, and it just flat out does not work ("export failed"). I'm astonished its never been addressed....(sigh).....
I had to throw a project due to this bug, hours and hours trying to find a working workaround. Of course maybe I'm clumsy but I have not found anything really reliable to show pictures in all devices. This is the life of those who use LiveCode to make apps.
-
- Posts: 192
- Joined: Tue Mar 11, 2014 12:57 pm
Re: mobileExportImageToAlbum broken?
i tried this with the example in the bug report: http://quality.runrev.com/show_bug.cgi?id=11417Simon wrote:Hi pkocsis,
You probably don't want a workaround but... here.That will show up in the Gallery.Code: Select all
on mouseUp set the defaultFolder to "/mnt/sdcard/DCIM/" put image "myImage" into url("binfile:picTest.jpg") answer the result end mouseUp
If loading via USB, remember to unplug it or the sd card won't show up.
Simon
Edit; For those devices that don't have an sd card you just search for DCIM in the root.
But had the message "can't open file".
Re: mobileExportImageToAlbum broken?
Thanks Simon but it only shows up if the phone is rebooted since this workaround does not notify the OS to re-scan. Is there some way I can fake the OS into rescanning the gallery?Simon wrote:Hi pkocsis,
You probably don't want a workaround but... here.That will show up in the Gallery.Code: Select all
on mouseUp set the defaultFolder to "/mnt/sdcard/DCIM/" put image "myImage" into url("binfile:picTest.jpg") answer the result end mouseUp
If loading via USB, remember to unplug it or the sd card won't show up.
Simon
Edit; For those devices that don't have an sd card you just search for DCIM in the root.