Module Expr Str Assign NameStore Str ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Str ClassDef bases NameLoad body Assign NameStore Call NameLoad NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body While NameLoad body AugAssignAdd AttributeStore NameLoad attr Num Assign NameStore BinOpAdd Call AttributeLoad Call AttributeLoad NameLoad attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr If UnaryOpNot Call NameLoad NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr BinOpAdd Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults vararg body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TupleLoad BinOpDiv NameLoad Num BinOpDiv NameLoad Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad keyword Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad keyword NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list decorator_list Expr Call AttributeLoad Call NameLoad attr
N/A N/A 
Take picture
============

.. author:: Mathieu Virbel <mat@kivy.org>

Little example to demonstrate how to start an Intent, and get the result.
When you use the Android.startActivityForResult(), the result will be dispatched
into onActivityResult. You can catch the event with the android.activity API
from python-for-android project.

If you want to compile it, don't forget to add the CAMERA permission::

    ./build.py --name 'TakePicture' --package org.test.takepicture             --permission CAMERA --version 1             --private ~/code/kivy/examples/android/takepicture             debug installd

 N/A __version__ 0.1 kivy.app App os.path exists jnius autoclass cast android activity functools partial kivy.clock Clock kivy.uix.scatter Scatter kivy.properties StringProperty PIL Image N/A Intent N/A autoclass android.content.Intent N/A PythonActivity N/A autoclass org.renpy.android.PythonActivity N/A MediaStore N/A autoclass android.provider.MediaStore N/A Uri N/A autoclass android.net.Uri N/A Environment N/A autoclass android.os.Environment Picture N/A Scatter N/A N/A source N/A StringProperty None N/A TakePictureApp N/A App N/A build N/A N/A self N/A N/A N/A N/A self index 0 N/A N/A N/A activity bind on_activity_result N/A self on_activity_result N/A get_filename N/A N/A self N/A N/A N/A True N/A N/A N/A self index 1 N/A fn N/A N/A N/A N/A N/A Environment getExternalStorageDirectory getPath N/A N/A /takepicture{}.jpg format N/A self index N/A N/A N/A exists fn N/A N/A fn N/A take_picture N/A N/A self N/A N/A N/A intent N/A Intent N/A MediaStore ACTION_IMAGE_CAPTURE N/A N/A self last_fn N/A N/A self get_filename N/A N/A self uri N/A N/A Uri parse N/A file:// N/A self last_fn N/A N/A self uri N/A cast android.os.Parcelable N/A self uri N/A N/A N/A intent putExtra N/A MediaStore EXTRA_OUTPUT N/A self uri N/A N/A N/A N/A PythonActivity mActivity startActivityForResult intent 291 N/A on_activity_result N/A N/A self requestCode resultCode intent N/A N/A N/A N/A requestCode 291 N/A N/A N/A N/A Clock schedule_once N/A partial N/A self add_picture N/A self last_fn 0 N/A add_picture N/A N/A self fn N/A args N/A N/A im N/A N/A Image open fn N/A N/A width height N/A im size N/A N/A N/A im thumbnail N/A N/A width 4 N/A height 4 N/A Image ANTIALIAS N/A N/A N/A im save fn quality 95 N/A N/A N/A N/A self root add_widget N/A Picture source fn center N/A N/A self root center N/A on_pause N/A N/A self N/A N/A N/A True N/A N/A N/A N/A N/A N/A TakePictureApp run