Alright, thank you. But I am confused as to how I import this into Eclipse. I downloaded the source, and tried to import the file, but Eclipse said it couldn't find a project.
On Apr 21, 2:24 pm, Mark Murphy <mmur...@commonsware.com> wrote: > WillHesterwrote: > > Anyone? > > > On Apr 19, 3:17 pm, WillHester<whes...@gmail.com> wrote: > >> So I made a class called CameraSurfaceView.java that has a constructor > >> and all of the Camera methods, but what I'm confused about is how to > >> instantiate and display the camera in my activity I called > >> TypeWalker.java. For that, I have this: > > >> package com.schleudaastudios.typewalker; > > >> import android.app.Activity; > >> import android.os.Bundle; > > >> public class TypeWalker extends Activity { > >> /** Called when the activity is first created. */ > >> @Override > >> public void onCreate(Bundle savedInstanceState) { > >> super.onCreate(savedInstanceState); > >> setContentView(R.layout.main); > >> CameraSurfaceView cam = new CameraSurfaceView(this); > >> cam.surfaceCreated(null); > >> } > > >> } > > >> But when I run it, it crashes immediately. I have no idea how to make > >> the camera display, any help? > > Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine the > stack trace associated with the crash, so you can figure out where you > are going wrong. It is difficult, perhaps impossible, to provide you > other advice based on this code snippet. > > If it helps, here is an example project that uses the Camera and a > SurfaceView: > > http://github.com/commonsguy/cw-advandroid/tree/master/Camera/Picture/ > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android Training...At Your Office:http://commonsware.com/training > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group > athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en