Intent发送bitmap的问题
来源:互联网 发布:怎么判断封包数据 编辑:程序博客网 时间:2024/05/19 07:41
通过intent发送bitmap,直接发送的话,对bitmap的大小有限制,
会打印如下错误信息
FAILED BINDER TRANSACTION
可以利用如下方法
private byte[] compress(Bitmap bitmap){
ByteArrayOutputStream stream=new ByteArrayOutputStream();
bitmap.compress(CompressFormat.JPEG,100,stream);
return stream.toByteArray();
}
压缩成byte[]后发送
private Bitmap unCompressBitmap(byte[] bytes){
return BitmapFactory.decodeByteArray(bytes,0,bytes.length);
}
接收方
通过此方法解压缩
这样可以传输大容量数据
0 0
- Intent发送bitmap的问题
- intent传递bitmap失效的问题
- Android-Intent传递数据(Bitmap)闪退问题
- intent传bitmap,接收bitmap
- bitmap溢出的问题
- Bitmap的recycle问题
- Bitmap的recycle问题
- Bitmap的recycle问题
- BitMap的recycle问题
- bitmap的oom问题
- Bitmap的recycle问题
- Intent-filter的配置和Intent的发送
- intent传参 之 Bitmap
- intent传参 之 Bitmap
- Intent 传递InputStream、Bitmap
- Intent传递Bitmap
- intent传bitmap
- Intent的发送(隐式启动)
- getAttribute()与getParameter的区别
- Java 利用url获取Bitmap图片
- [BZOJ1818] [Cqoi2010]内部白点
- 解决Android 工程出现 unable to get system library for the project 异常
- 设计模式(四)简单工厂模式
- Intent发送bitmap的问题
- 函数指针与函数名
- LeetCode 237. Delete Node in a Linked List
- 关于AlertDialog.Builder的传参
- 多线程网络总结
- Linux的用户和群组
- 百度云管家 提取下载链接
- hdu4521小明系列问题——小明序列【最长上升子序列,间隔】
- 说说Android的MVP模式