zionhigt / android-python27

Automatically exported from code.google.com/p/android-python27
0 stars 0 forks source link

App crashes when trying to launch camera on phone #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Bundle the attached file cam.py into apk
2. Run this on an Android phone

What is the expected output? What do you see instead?
Camera app should be launched. Instead, application crashes.

What version of the product are you using? On what operating system?
Tried this on Eclipse 3.7.2 on Ubuntu and Windows XP

Please provide any additional information below.
When the same script file is executed from "sl4a" app on the phone, camera app 
is launched and I am able to click and store images on the sdcard successfully. 
Please let me know how this issue can be resolved. 

cam_logcat_output - Error messages in logcat.
cam.py - Source File

Original issue reported on code.google.com by rvijayra...@gmail.com on 13 Jun 2012 at 10:07

Attachments:

GoogleCodeExporter commented 8 years ago
I'm seing the same error on SL4A, you may be using an older SL4A version where 
this code was not broken ?

Original comment by anthony....@gmail.com on 14 Jun 2012 at 7:05

GoogleCodeExporter commented 8 years ago
Thanks for your response. I downloaded SL4A again now from this link 
http://code.google.com/p/android-scripting/, and the script still runs from 
SL4A.

The same problem exists when bundled into an apk. I suspect mismatch or 
incorrect .class files?

Original comment by rvijayra...@gmail.com on 14 Jun 2012 at 4:04

GoogleCodeExporter commented 8 years ago
I found a solution for this issue. Had to change the "Permissions" in 
AndroidManifest.xml to enable the application to access camera.

Solution: In AndroidManifest.xml file, uncomment the line 
<uses-permission android:name="android.permission.CAMERA"/>

Original comment by rvijayra...@gmail.com on 14 Jun 2012 at 9:12

GoogleCodeExporter commented 8 years ago
Good, makes sense.

Original comment by anthony....@gmail.com on 14 Jun 2012 at 9:21