i am workin on an application that clicks images and uploads them to a
server....i m not able to invoke the camera and click an image......

Button click = new Button(this);
        click.bringToFront();
        click.setText("Click me");
        click.setOnClickListener(new View.OnClickListener(){
            public void onClick(View v)
            {
                android.hardware.Camera camera = Camera.open();
                camera.setPreviewCallback(new Camera.PreviewCallback()
                {
                    public void onPreviewFrame(byte[] imageBytes,
Camera camera)
                    {
                        System.out.println("In preview");
                    }
                });

                camera.takePicture(null, null, new
Camera.PictureCallback()
                {
                    public void onPictureTaken(byte[]
imageBytes,Camera camera)
 
{
                        System.out.println("picture taken");
                        camera.release();
                    }

                });
            }


        });

please help

On Nov 17, 5:46 pm, Urakagi <[EMAIL PROTECTED]> wrote:
> Thank you David.
> Now I can concentrate on other works.
>
> On 11月18日, 上午1時18分, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > Most JNI functions are registered with the VM during runtime boot.
>
> > FYI, the 1.0 SDK does not support native code development. If you
> > proceed along this path, be aware that any API's you use are subject
> > to change without notice.
>
> > On Nov 17, 2:03 am, Urakagi <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
> > > I have a G1, and downloaded the Android source code.
> > > When I open, say,android.hardware.Camera.java, it uses native
> > > functions without calling loadLibrary(). Of course if I do the same in
> > > my application, UnsatisfiedLinkError will come.
> > > I tried to load libandroid_runtime.so, but the device just replays
> > > there's no such library.
>
> > > Does anyone know what trick the SDK uses, so it can use native
> > > functions?
> > > Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to