ASK COMPATIBLE BATTERY : zte blade

by dimas mailist » Sat, 16 Apr 2011 11:47:10 GMT


Sponsored Links
 baterai zte blade (orange san fransisco) itu compatible dengan handphone apa
ya?
atau kalau beli orinya berapaan dan dimana?

thx

-- 
"



Other Threads

1. In my app.ShutterCallback didn't implemented

public class Preview extends SurfaceView implements
SurfaceHolder.Callback {
        SurfaceHolder mHolder;
        Camera mCamera;

        Preview(Context context) {
                super(context);
                mHolder = getHolder();
                mHolder.addCallback(this);
                mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
        }

            public void surfaceCreated(SurfaceHolder holder) {
                                mCamera = Camera.open();
                Camera.Parameters parameters=mCamera.getParameters();
           parameters.setPictureFormat(PixelFormat.JPEG);
            parameters.setPictureSize(420, 320);
                mCamera.setParameters(parameters);

                mCamera.setPreviewCallback(previewCallback);
                 mCamera.takePicture(shutterCallback, pictureCallback,
                  jpegPictureCallback);
                try {
                        mCamera.setPreviewDisplay(holder);
                } catch (IOException e) {

                        e.printStackTrace();
                }
        }


        private PreviewCallback previewCallback = new PreviewCallback() {

                @Override
                public void onPreviewFrame(byte[] data, Camera camera) {

                        Log.i("Preview", "onPreviewFrame");
                }

        };

        int i = 0;
        private ShutterCallback shutterCallback = new ShutterCallback() {

                @Override
                public void onShutter() {

                        Log.i("Preview", "onShutter");
                        if (++i > 1) {
                                mCamera.stopPreview();
                        }
                }

        };

        private PictureCallback pictureCallback = new PictureCallback() {

                @Override
                public void onPictureTaken(byte[] data, Camera camera) {

                        Log.i("Preview", "onPictureTaken");
                }

        };

        private byte[] picData;
        private PictureCallback jpegPictureCallback = new PictureCallback() {

                @Override
                public void onPictureTaken(byte[] data, Camera camera) {

                        picData = data;
                        Log.i("Preview", "onPictureTaken jpeg");
                }

        };

        public String getPicture() throws IOException {
                //mCamera.takePicture(shutterCallback,pictureCallback,
jpegPictureCallback);
                mCamera.takePicture(shutterCallback, pictureCallback,
                                jpegPictureCallback);
                if (picData == null) {
                        return null;
                }
                int bytelength=picData.length;
                int length=1024;
                 String dataString = new SimpleDateFormat("yyyy-mm-dd
HH:mm:ss").format(Calendar.getInstance().getTime());
                 dataString=dataString.replaceAll("\\s", "");
                 dataString=dataString.replaceAll(":", "");

                    String pathString="/sdcard/"+dataString+".jpg";

                FileOutputStream fos = null;
                        try {
                                  fos=new FileOutputStream(pathString);
                                   int offset=0;
                                  while(offset+length<bytelength){
                                          fos.write(picData, offset, length);
                                          offset+=length;
                                  }
                                  fos.write(picData, offset, bytelength-offset);

                        } catch (Exception e) {
                                 Log.e("ww",e.toString());
                        }finally{
                                        fos.close();
                        }



                return pathString;
        }

        public void cancel() {
                mCamera.stopPreview();
                mCamera.release();
                mCamera = null;
        }

        public void surfaceDestroyed(SurfaceHolder holder) {
                // Surface will be destroyed when we return, so stop the
                // preview.
                // Because the CameraDevice object is not a shared resource,
                // it's very
                // important to release it when the activity is paused.
                if (mCamera != null) {
                        mCamera.stopPreview();
                        mCamera = null;
                }
        }

        public void surfaceChanged(SurfaceHolder holder, int format, int w,
int h) {
                // Now that the size is known, set up the camera parameters
                // and begin
                // the preview.
                Camera.Parameters parameters = mCamera.getParameters();
                parameters.setPreviewSize(w, h);
                mCamera.setParameters(parameters);
                mCamera.startPreview();
        }

}


And when  toggle a breakpoint in the private ShutterCallback
shutterCallback = new ShutterCallback(),it hasn't been implemented.
So when I invoke the getPicture outside ,the picture is black and the
pisdata is null.
Why this happen?Where did i do wrong?

--~--~---------~--~----~------------~-------~--~----~

2. Android Device not detected on Karmic

Long story short, I can't get adb to list my android device:

dan...@ubuntu:~$ uname -ar
Linux ubuntu 2.6.31-2-generic #16-Ubuntu SMP Mon Jul 6 20:38:51 UTC 2009 
i686 GNU/Linux
dan...@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu karmic (development branch)
Release:    9.10
Codename:    karmic
dan...@ubuntu:~$ cat /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
dan...@ubuntu:~$ sudo /etc/init.d/udev restart
 * Stopping kernel event 
manager...                                                                      
                                                                                
                                                                               
[ OK ]
 * Starting kernel event 
manager...                                                                      
                                                                                
                                                                               
[ OK ]
dan...@ubuntu:~$ sudo killall adb
dan...@ubuntu:~$ dmesg | grep -i android
[150391.798593] scsi 9:0:0:0: Direct-Access     HTC      Android 
Phone    0100 PQ: 0 ANSI: 2
dan...@ubuntu:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/daniel/dev/android-sdk-linux_x86-1.5_r2/tools
dan...@ubuntu:~$ adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached

dan...@ubuntu:~$


Anyone know what else I can try?

--~--~---------~--~----~------------~-------~--~----~

3. Use an android phone's GPS from a website

4. Life cycle and Oncreate clarifications

5. How to set title icon on Dialog Theme

6. How to contact device with ADB from Windows NT

7. Removing margin between widgets inside a ListView