2

カメラから写真をキャプチャしようとしています (Samsung S3 固有の問題) 以下は、同じコードです。

      protected void onActivityResult(int requestCode, int resultCode, Intent data) {  



    if( requestCode == 1337 && resultCode== RESULT_OK){
        Bundle extras = data.getExtras();
            if (extras != null){    
                   BitmapFactory.Options options = new BitmapFactory.Options();
            // options.inSampleSize = 1;
            // options.inPurgeable = true;
            // options.inInputShareable = true;
             thumbnail = (Bitmap) extras.get("data");
             image(thumbnail);
    }else{
                Toast.makeText(CreateProfile.this, "Picture NOt taken", Toast.LENGTH_LONG).show();
         } 

画像関数:

     public void image(Bitmap thumbnail){
       Bitmap photo = thumbnail; 
       ByteArrayOutputStream bos = new ByteArrayOutputStream();
       photo.compress(Bitmap.CompressFormat.PNG, 100, bos);
       b = bos.toByteArray();
       ImageView imageview = (ImageView)findViewById(R.id.imageView1);
      }

カメラ インテントを開始するためのコード:

       if(i==0){
                       Intent cameraIntent = new  Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); 
                       startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST); 
                }

ログキャット:

http://img534.imageshack.us/img534/8388/logcamera.png

http://img585.imageshack.us/img585/7559/camera1u.png

私のコードは、HTC Wildfire S、Dell XCD35、Samsung Galaxy Grand、Samsung Galaxy Tab で正常に動作していますが、このエラーが S3 に表示される理由はわかりません。手がかりはありますか?

4

1 に答える 1