字符串数据的最大尺寸可以在意图传递 [英] Max size of string data that can be passed in intents
本文介绍了字符串数据的最大尺寸可以在意图传递的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一个最大的限制,可以在额外的意图传递字符串数据?多少数据可以在下面的字符串str持有?
intentI1.putExtra(MyString的海峡);
解决方案
结帐<一个href=\"http://stackoverflow.com/questions/12496700/maximum-length-of-intent-putextra-method-force-close\">this帖子它说1MB是有极限的。另外结账这个。
还有一个现场问题报告>。
真正的问题是:为什么通过活动之间的1M数据?也许是更好的方式来实现你想要的是坚持这一数据并传递一个标识符来代替。
Is there a max limit to the string data that can be passed in intent extra? How much data can the below String str hold?
intentI1.putExtra("MyString", str);
解决方案
Checkout this post which says 1MB is a limit. Also checkout this one.
There is also a report on issues site.
The real question is: why pass a 1M data between activities? Perhaps a better way to achieve what you want is to persist this data and pass an identifier instead.
这篇关于字符串数据的最大尺寸可以在意图传递的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文