Time for action – loading pictures
LiveCode can call upon the native photo library and camera apps. We will test both of these on Android and iOS, but of course only if your device has some saved images, and a camera. For the Kindle Fire, which doesn't have a camera, make sure to save some pictures into the Gallery app, so that we can at least try loading those.
Copy the Test button from the DatePicker card, and paste it twice onto the Pictures card. Change the name of the buttons to
Test Camera
andTest Library
.Edit the script of the
Test Camera
button to the following:on mouseUp mobilePickPhoto "camera" end mouseup
Edit the script of the
Test Library
button to the following:on mouseUp mobilePickPhoto "library" end mouseup
As we test the loading of pictures, the image that is loaded will cover the test buttons, stopping us from returning to the menu card. To solve this issue, add this to the card script:
on mouseup if word 1 of the target is "image" then delete the target end mouseup...