Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想为活动的下一次启动设置一些 Extras。但是,我希望用户启动活动,我不想使用 startActivity() 以编程方式启动它;
如果目标活动当前被杀死,它也应该工作。
你能告诉我该怎么做吗?
谢谢
您可以使用SharedPreferences并将变量存储到非易失性内存中。然后在活动的 onCreate() 中阅读它们。