mobileexporttoalbum doesn't work?

The place to discuss anything and everything about running your LiveCode on Android

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

mobileexporttoalbum doesn't work?

Post by sefrojones » Wed Apr 09, 2014 3:48 am

I have been trying to export an image from my card to the android photo album and have no idea why it's not working.

Code: Select all

on mouseUp
   if the environment is "development" then
     set the defaultfolder to specialfolderpath("desktop")
     export snapshot from  img id 1039 to file "test.jpg" as jpeg
  end if
  
  if the environment is "mobile" then
   put the long id of image "coded" into tImageID
   mobileExportImageToAlbum tImageID, "test_file"
   if the result is empty then
      exit mouseup
   else
      answer the result
   end if
   
  end if
  
end mouseUp
any tips would be greatly appreciated.

Thanks,

Sefro

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: mobileexporttoalbum doesn't work?

Post by sefrojones » Thu Apr 10, 2014 7:24 pm

apparently this is a known bug that is being worked on, until then we can use the specialfolderpath("documents") like this:

Code: Select all

put image "image" into URL ("binfile:"&specialFolderPath("documents")&"/pic.jpg")
This was answered by runrevneil, I reposted here to help anyone who runs into the same bug and finds this thread.

--sefro

pkocsis
Posts: 103
Joined: Sat Apr 15, 2006 7:20 am

Re: mobileexporttoalbum doesn't work?

Post by pkocsis » Sat Oct 25, 2014 12:12 am

sefrojones wrote:apparently this is a known bug that is being worked on, until then we can use the specialfolderpath("documents") like this:

Code: Select all

put image "image" into URL ("binfile:"&specialFolderPath("documents")&"/pic.jpg")
This was answered by runrevneil, I reposted here to help anyone who runs into the same bug and finds this thread.

--sefro
Forgive me, but this workaround is not at all useful if the intention is to allow an image to be viewed/used outside of the LC app. It is useful if one simply needs to save an image for later use by the same LC app, but is not a workaround for mobileExportImageToAlbum for those that wish to expose the 'saved' image to the user for use outside of the app. Am I missing something?

Post Reply

Return to “Android Deployment”