Remove the 'android:permission="android.permission.CAMERA"' attribute
from the application tag and add the following line in your manifest
file:
<uses-permission android:name="android.permission.CAMERA"></uses-
permission>
--
Jack Ha
Open Source Development Center
・T・ ・ ・Mobile・ stick together
The views, opinions and statements in this email are those of
the author solely in their individual capacity, and do not
necessarily represent those of T-Mobile USA, Inc.
On Jul 30, 3:29 pm, chuu <[email protected]> wrote:
> Hi,
>
> I would like to try the camera preview function. I create a new
> project, copy the sample code (CameraPreview.java) from ApiDemo, and
> run on HTC G1. Nothing appear. The logcat shows:
>
> I/ActivityManager( 56): Starting activity: Intent { flags=0x10000000
> comp={com.example.camerapreview/
> com.example.camerapreview.CameraPreview} }
> W/ActivityManager( 56): Permission Denial: starting Intent
> { flags=0x10000000 comp={com.example.camerapreview/
> com.example.camerapreview.CameraPreview} } from null (pid=-1, uid=-1)
> requires android.permission.CAMERA
> D/AndroidRuntime( 9049): Shutting down VM
> W/dalvikvm( 9049): threadid=3: thread exiting with uncaught exception
> (group=0x4000fe70)
> E/AndroidRuntime( 9049): Uncaught handler: thread main exiting due to
> uncaught exception
> E/AndroidRuntime( 9049): *** EXCEPTION IN SYSTEM PROCESS. System will
> crash.
>
> My manifest is
> <?xml version="1.0" encoding="utf-8"?>
> <manifest xmlns:android="http://schemas.android.com/apk/res/android"
> package="com.example.camerapreview"
> android:versionCode="1"
> android:versionName="1.0">
> <application android:icon="@drawable/icon" android:label="@string/
> app_name" android:debuggable="true"
> android:permission="android.permission.CAMERA">
> <activity android:name=".CameraPreview"
> android:label="@string/app_name">
> <intent-filter>
> <action android:name="android.intent.action.MAIN" />
> <category
> android:name="android.intent.category.LAUNCHER" />
> </intent-filter>
> </activity>
> </application>
> <uses-sdk android:minSdkVersion="3" />
> </manifest>
>
> Could anyone give me a hint what's wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---