App Inventor Extensions


Camera Extension

See the App Inventor Extensions document about how to use an App Inventor Extension.

For questions about this extension or bug reports please start a new thread in the App Inventor Extensions forum. Thank you.

For feature requests please contact me by email. To be a sponsor of a new method already is possible starting from only 10 USD! With your contribution you will help the complete App Inventor community. Thank you.

March 20h, 2017: Version 2: Initial Version released

Description

Camera extension to take a picture programmatically without user interaction.
Required permission: android.permission.CAMERA, android.permission.WRITE_EXTERNAL_STORAGE, android.permission.FLASHLIGHT
Minimum API Level to use for this extension is API Level 11 (Android 3.0).

Notes

Properties


Returns File name of taken picture.


Specifies File name of taken picture. Default value is /Pictures/picture.jpg.


Returns Flash mode. See also method SupportedFlashModes.


Specifies Flash mode. Default value is auto. See also method SupportedFlashModes.


Returns Focus mode. See also method SupportedFocusModes.


Specifies Focus mode. Default value is auto. See also method SupportedFocusModes.


Returns Quality of taken picture.


Specifies Quality of taken picture. Possible values between 0 and 100. 0 meaning compress for small size, 100 meaning compress for max quality. Default value is 80.


Returns whether front camera should be used.


Specifies whether front camera should be used. Default value is False.


Returns width. See also method SupportedPictureSizes.


Specifies width. Default value is 0, i.e. default width of camera will be used. See also method SupportedPictureSizes.


Returns height. See also method SupportedPictureSizes.


Specifies height. Default value is 0, i.e. default height of camera will be used. See also method SupportedPictureSizes.


Returns whether device is ready to take a picture (readyToTakePicture = true) or process of taking a picture is already in progress (readyToTakePicture = false).


Returns whether Warnings should be suppressed.


Specifies whether Warnings should be suppressed.

Methods


Take Picture programmatically without user interaction.
Note: This process takes takes a few seconds. Don't move the device while taking the photo.


Get supported picture sizes of the device.
Returns a list of supported picture sizes of the device. The width and height is delimited by x, for example 640x480. You can set the width and height of the picture to take in property Width and Height. If you choose a width-height combination, which is not supported by the device, then the next lower width-height combination will be used.


Get supported flash modes of the device.
Returns a list of supported flash modes of the device. You can set the flash mode in property FlashMode. If you choose a flash mode, which is not supported by the device, then auto will be used.


Get supported focus modes of the device.
Returns a list of supported focus modes of the device. You can set the focus mode in property FocusMode. If you choose a focus mode, which is not supported by the device, then auto will be used.

Events


Event indicating that picture has been taken.


Event indicating that an error occurred.

Example App: Camera Extension Test

Example App: Time Lapse

The example project takes a picture using the front camera each 3 seconds. After 3 pictures are taken, a time lapse video of the 3 taken pictures will be displayed.


Test and Minor Known Issues

Do you need help with your App Inventor project?

I can help you: for one hour I charge 25 USD.
Please contact me at info [at] puravidaapps [dot] com for details!
For questions about App Inventor, please use the App Inventor forum. Thank you.

Test the functionality of the Camera extension

Both test apps are available in Google Play for Beta testers. You can test the examples following these steps

  1. Join the Taifun Test Google+ Group to be able to test the example apps
  2. Then follow the opt-in URL for the camera test app and the opt-in URL for the timelapse test app to get access to the apps and to be able to download them to your device. It might take a few hours for Google to enable you as beta tester!
  3. Start testing.

Buy the Camera extension for App Inventor


You can buy this extension (aix file).
With your payment you accept the terms and conditions below.

Payment options

1. Paypal

Please transfer 10 USD via Paypal
to Pura Vida Apps

2. Bitcoin

After having received your payment I will be happy to send the extension (aix file) to you.
Thank you! Taifun


Please check your spam folder in case you did not receive the extension!
I usually will send the extension not later than 24 hours after having received your payment.

 

Terms and Conditions

Back to top of page ...


Home | Snippets | Tutorials | Extensions | News | Forums | Links | Search | Contact