How to exchange data (objects) between different Android Activities?

前端 未结 4 861
暗喜
暗喜 2021-02-09 17:35

What is proper way to exchange data or objects between different Android Activities?

Welcome screen <-> Main Screen <-> Startup routines <-> Processing data <

4条回答
  •  长情又很酷
    2021-02-09 18:13

    Do what google commands you to do here: http://developer.android.com/resources/faq/framework.html#3

    Choices: Primitive Data Types Non-Persistent Objects Singleton class - my favorite :D A public static field/method A HashMap of WeakReferences to Objects Persistent Objects ( Application Preferences, Files,contentProviders,SQLite DB)

提交回复
热议问题