search

Home  >  Q&A  >  body text

android - 当目标activity的launchMode为singleTask时,如何向源Activity返回数据?

如题,从 ActivityA start ActivityB,B的launchMode为singleTask;
问,如何将 ActivityB 的结果返回给 ActivityA?

伊谢尔伦伊谢尔伦2773 days ago763

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 11:40:12

    1. In AstartActivityForResult Start B
    2. B processes the data setResult and then finish
    3. A overloadonActivityResult receives data

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 11:40:12

    You can use some event frameworks such as EventBus and Otto to replace Android's native intent communication.

    reply
    0
  • Cancelreply