Android: CameraPicker & ImagePickerMonkey Programming Forums/User Modules/Android: CameraPicker & ImagePicker
| Hey guys!|
Now I've managed to document my module. Here it is.
With this module you'll be able to get access to the camera and the image gallery of an Android device. Next step is to implement the iOS and WinPhone target.
I've added two examples for each. For more infos, just read the documentation.
Here the Git-Repo: https://github.com/Ironstorm/bbd
| Nice work. will test it soon |
| Cool - I downloaded some Java code a while ago intending to develop something like this, but I never got around to it! |
| Sounds good, thanks. |
| Will test in a bit, thanks! |
| Hi, the image picker works great on my Nexus 7, I could not get the camera picker to work, I added the CAMERA permission but still does not open the camera.|
EDIT: It is fine if I remove If camerapicker.HasCamera()
| Ah, sorry. Forget to check if the device has only a front-facing camera. HasCamera() only checks for a rear-camera.|
I've updated the repo. HasCamera() should now return true if there is any camera available.
| @Iron, are you still working on this?|
Could need some help.
I'm working on an App, which basically shall take a Picture and store it to the sd-card into a specific folder.
As i see, your module should basically to so. But, I've a really weird problem over here.
My Code is like the following:
Local currDate:Int = GetDate()
imagename = "DCIM/MyFolder/"+currDate+"_"+currDate+"_"+currDate+"_"+currDate+currDate+currDate+"_Pic"
camerapicker.OpenCameraPickerAsync(imagename , Self) ' Check if device has camera, if so open the camera
Print "Not running on Android"
If result <> "" Then
Print "result: " + result
LoadImageAsync(result, 1, Image.DefaultFlags, Self)
Method OnLoadImageComplete:Void(image:Image, path:String, source:IAsyncEventSource)
Print "path: " + path
If path.Contains(imagename) Then
'Print "Loaded Picture: " + path + "."+imagename
MyPicture = image
So, my hope was, it will store the pictures on my SD, but it doesn't.
Secondly, my Phone couldn't load the Picture... it's always null (within Monkey App), So when i search on my phone via FileMananger on Android i see it created a folder called "DCIM/MyFolder/..." (internal) and it stored all taken pictures. the strange thing is, i can't open it on my Phone. But when i Copy the taken pictures to another Folder, then my Phone is able to load them. And when i link my Phone to my PC, i even can't see the "DCIM/MyFolder/...". Do you have any idea what the problem could be?
I just tested to do it as in your example too, but then i even can't find the taken pictures.
And yes, UpdateAsync and everything is running properly. when i tried your module with an older Phone (Android 2.3 or something) i remember, it run a little bit better.
But then it sometime didn't load async pictures correct, but they've been saved.
I'm Using Sony XPeria E3 with Android 4.4.4 if it helps.