If it is possible to return A in B, C, and D, and there will not be two A at the same time, use SingleTask mode to directly start A in B/C/D. According to the characteristics of singleTask, A will be automatically destroyed. For the started Activity, the returned data can be transferred directly through the intent, and then the data can be received in onNewIntent() to refresh the view🎜
Direct call back to A can be achieved by clearing the top of the stack or directly finishing when switching between B, C, and D. Refreshing the page when returning to A can be achieved through the onResume method or broadcast.
If A will only be returned in B, then use
startActivityForResult
startActivityForResult
如果在B, C, D都有可能返回A, 同时不会有同时两个A的话, 使用SingleTask模式, 直接在B/C/D中直接启动A, 根据singleTask的特性就会自动销毁A之后启动的Activity, 返回数据可以直接通过intent传数据, 然后再
If it is possible to return A in B, C, and D, and there will not be two A at the same time, use SingleTask mode to directly start A in B/C/D. According to the characteristics of singleTask, A will be automatically destroyed. For the started Activity, the returned data can be transferred directly through the intent, and then the data can be received inonNewIntent()
onNewIntent()
to refresh the view🎜Direct call back to A can be achieved by clearing the top of the stack or directly finishing when switching between B, C, and D.
Refreshing the page when returning to A can be achieved through the onResume method or broadcast.