Android的照片捕捉并保存图像查看和发送MMS它? [英] android capture photo and save it in image view and send it MMS?

查看:244
本文介绍了Android的照片捕捉并保存图像查看和发送MMS它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要拍照,并在图像视图删除按钮图像视图中显示,如果我不想照片并拍另一张照片并发送照片通过彩信服用。

I want to take photo and display it in image view with delete button in image view if i dont want the photo and take another photo and send the photo taking via MMS.

推荐答案

声明按钮和ImageView的

Declaring Button and ImageView

ImageView imageView= (ImageView)this.findViewById(R.id.imageView1);
Button photoButton = (Button) this.findViewById(R.id.button1);

按钮的onclick捕获图像

Button OnCLick to Capture an Image

 photoButton.setOnClickListener(new View.OnClickListener() {
       public void onClick(View v) {
                Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); 
                startActivityForResult(cameraIntent, CAMERA_REQUEST); 
            }
        });

将捕捉到的图像进入的ImageView

Place the Captured Image Into ImageView

protected void onActivityResult(int requestCode, int resultCode, Intent data) {  
        if (requestCode == CAMERA_REQUEST && resultCode == RESULT_OK) {  
            Bitmap photo = (Bitmap) data.getExtras().get("data"); 
            imageView.setImageBitmap(photo);
        }  
    }

需要清单文件添加

Required to add in Manifest File

<uses-feature android:name="android.hardware.camera"></uses-feature> 

我倒没意识到发送的形象彩信

I am Not Much aware sending that image MMS

有关更多参考

如何通过彩信发送图像中的Andr​​oid?

这篇关于Android的照片捕捉并保存图像查看和发送MMS它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆