安卓:发送和放大器;得到字符串除了使用额外的()方法放大器、字符串、方法

由网友(很酷不撩妹)分享简介:我不知道用什么方法可以用来从一个到另一个活动送字符串除了使用intent.putExtra(),和getIntent.getExtra()。因为我的项目得到意想不到的结果使用putExtra()时,只是想给他人发送的字符串。I just wonder what method can be use to send S...

我不知道用什么方法可以用来从一个到另一个活动送字符串除了使用intent.putExtra(),和getIntent.getExtra()。 因为我的项目得到意想不到的结果使用putExtra()时,只是想给他人发送的字符串。

I just wonder what method can be use to send String from one to another activity besides by using intent.putExtra(), and getIntent.getExtra(). Cause my project getting unexpected result when using putExtra(), just want to another for send String.

任何建议和例子?谢谢你。

Any suggestion and examples? Thanks.

推荐答案

您也可以发送通过以下方式

you can also send by following ways

如何传递/活动之间的数据服务在一个单一的应用程序?

非持久性对象

有关分担短时间复杂的非持久性用户定义的对象,则建议使用如下方法:

For sharing complex non-persistent user-defined objects for short duration, the following approaches are recommended:

Singleton类 - 参考这里:

一个公共静态字段/方法

A public static field/method

在WeakReferences的一个HashMap到对象

A HashMap of WeakReferences to Objects

阅读全文

相关推荐

最新文章