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
-~----------~----~----~----~------~----~------~--~---

Reply via email to