安卓:发送和放大器;得到字符串除了使用额外的()方法 [英] android: send & get String besides by using extra() method

查看:161
本文介绍了安卓:发送和放大器;得到字符串除了使用额外的()方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道用什么方法可以用来从一个到另一个活动送字符串除了使用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:

一个公共静态字段/方法

A public static field/method

在WeakReferences的一个HashMap到对象

A HashMap of WeakReferences to Objects

这篇关于安卓:发送和放大器;得到字符串除了使用额外的()方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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