This is an extension for Android that works on Android upto v13 and made using latest GMS 2 version.
It does require the relevant permissions to be set and requested during runtime for Android 6+
My Android Permissions extension makes this easier, you can download it here: https://marketplace.gamemaker.io/assets/11300/android-permissions-extension
This extension has the following features: 1 - Take Photo: Take a photo using the phones camera app (default) 2 - Record Video: Easily record video using camera with mic sound and save as .mp4 or 3gp (whatever your phone supports). You will need to request the RECORD_AUDIO permission to allow use of the Mic. 3 - QRCODE / Barcode Scanner: It uses Zxing libraries to allow easy fullscreen scan of qrcode and barcodes and the value it reads will be returned in the Async Event.
Photos and Videos can be stored to the Temp Folder for easy access within GMS code or to external DCIM folder. Do not save to DCIM directly always use a subfolder!
Usage: Import this extension into your project. Set the required permission(s) in your project settings. Request runtime permissions if required. Call the functions in the extension to perform required action
Functions & Info: Android_getExternalPath() - Gets Path to the External Storage Directory Android_getDCIMPath() - Gets the path of the DCIM storage folder on the device. Create folder in here to save your photos. Android_getPicturesPath() - Gets DCIM Pictures folder ScannerCam_Photo(Path,FileName) - Take photo using camera and save at the given path using filename ScannerCam_PhotoTemp(FileName) - Take photo using camera and save apps temp folder using filename ScannerCam_Record(path,filenamewith ext) - Record video using camera and save at the given path using filename ScannerCam_RecordTemp(filenamewith ext) - Record video using camera and save apps temp folder using filename
Example To Take Photo:
var _filename="NewPhoto123.jpg";
var _path = Android_getDCIMPath() + "/MyAppName" ;
ScannerCam_Photo(_path,_filename); //Use this if you want to save to specific folder in external DCIM folder
End User Licence Agreement (EULA).