Calling the native camera application on Android

1,206 views
Skip to first unread message

Ao Yen

unread,
Mar 25, 2014, 11:32:58 AM3/25/14
to kivy-...@googlegroups.com
Hello all,

In a nutshell I would like to call the native camera application on my Android phone from inside Kivy. Take a picture with that camera app and save it to a location that was defined in Kivy. After which I'd need to return to my Kivy app. The camera of my phone works inside Kivy using this example:
https://github.com/Davideddu/kivy-android-camera/blob/master/main.py

This works but there's no focussing ability, essentially making it useless. I imagine this needs to be done through pyjnius. Any ideas?

Alexander Taylor

unread,
Mar 25, 2014, 12:06:34 PM3/25/14
to kivy-...@googlegroups.com
The actual android process involves calling the camera intent and somehow receiving the picture back from it, and you can do it all using pyjnius.

Kivy's plyer project (https://github.com/kivy/plyer) actually already has wrapped this in a python interface, or you can check out the source to see the actual pyjnius code used to do it.

Ao Yen

unread,
Mar 25, 2014, 7:30:36 PM3/25/14
to kivy-...@googlegroups.com
The plyer camera facade does exactly what I needed.
There's no camera example available on the project Git so I've adapted this example.

Nice work Kivy team :)

Ahmed Ibrahim

unread,
Jul 1, 2017, 9:55:14 PM7/1/17
to Kivy users support
Hi All,

I am trying to add camera to my app. I am developing the app using kivy, and using buildozer to build it for android. I tried the example app mentioned here but it crashes once the app starts on the phone. After searching for that problem I concluded most likely the root cause is the new python for android package. Some recommendations were to use the old_toolchain.

I haven't solved this problem yet, so please if you still having this app up and running using the latest buildozer version please help me.

Clemo Clemo

unread,
Jul 2, 2017, 3:49:21 AM7/2/17
to kivy-...@googlegroups.com
Are you using windows?


--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages