protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
if (requestCode == 1)
{
if (resultCode == 20)
{
Bitmap cameraBitmap;
byte[] bytes = data.getExtras().getByteArray("bytes");
//这时得到 bytes 把它转换成 String 类型前,如何转码,也就是转换成自己想要的编码格式???
// String s= new String(bytes);
// new AlertDialog.Builder(this).setMessage("什么 "+s).create().show();
cameraBitmap = BitmapFactory.decodeByteArray(bytes, 0,
bytes.length);
在上面如果直接把 bytes 转变成 String 时会出现乱码???如何解决???
{
if (requestCode == 1)
{
if (resultCode == 20)
{
Bitmap cameraBitmap;
byte[] bytes = data.getExtras().getByteArray("bytes");
//这时得到 bytes 把它转换成 String 类型前,如何转码,也就是转换成自己想要的编码格式???
// String s= new String(bytes);
// new AlertDialog.Builder(this).setMessage("什么 "+s).create().show();
cameraBitmap = BitmapFactory.decodeByteArray(bytes, 0,
bytes.length);
在上面如果直接把 bytes 转变成 String 时会出现乱码???如何解决???
解决方案 »
- 利用RotateAnimation旋转图片的问题
- 4.0Brower中下载时报android.process.media错
- 如何判断手机桌面是否已经存在某个快捷方式
- android cts测试问题
- Andriod sdk的安装问题
- 关于assets目录下文件的绝对路径
- (求助)android root权限怎么删除system/app下的APK的文件啊?
- 如何确保一个android应用程序只能在一部手机上运行?(禁止通过拷贝在其它手机上安装运行)
- 手机联系人里的ListView
- 安卓7.1.2可以调用VS2003发布的webservice吗
- 安装SDK出现如下错误
- android一个对话框问题请教
参数二:charsetName - The name of a supported charset 这样试一下!