2

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.

Padma Kumar
  • 19,893
  • 17
  • 73
  • 130
user2301281
  • 757
  • 2
  • 12
  • 27

1 Answers1

2

you can also send by following ways

How do I pass data between Activities/Services within a single application?

Non-Persistent Objects

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

  • Singleton class - Ref Here:

  • A public static field/method

  • A HashMap of WeakReferences to Objects

Community
  • 1
  • 1
Padma Kumar
  • 19,893
  • 17
  • 73
  • 130