Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid task/intent: How to implement simple list / display properly in Back Stack
    primarykey
    data
    text
    <p>My questions are regarding Tasks and the Back Stack and not other aspects of the implementation.</p> <p>I have a simple application with two activities. </p> <p>Activity 1: Display list of items. Click on item starts activity 2 for specified item</p> <p>Activity 2: Download PDF for item and then display using ACTION_VIEW (application/pdf) intent</p> <p>Any launch of the application should re-use the existing list activity (or create a new one). I don't want multiple lists (that is, only one Tasks). <strong><em>(Is launchMode = singleTask on activity and implement onNewIntent() the right approach for this?)</em></strong></p> <p>Also, any click on detail should start the detail page which will only show a "downloading" status, once the downloading is done, the PDF viewer is launched and the detail activity is "finished". The back button from PDF should go back to the list. <strong><em>(If I finish() the detail activity when I start the PDF viewer activity, will the detail activity just drop out of the back stack cleanly?)</em></strong></p> <p>The status bar notifications should re-launch the existing. <strong><em>(Should my intent be the same as the main applicaton launch just with Extra data for the details of the new data?)</em></strong></p> <p>The net result is that the Back Stack should only have 4 states, one being intermediate:, and the application should only ever be associated with one Task:</p> <p>(activity 1)</p> <p>(activity 1) => (activity 2 - downloading)</p> <p>(activity 1) => (activity 2 - launching viewer) => (PDF viewer) <strong><em>intermediate</em></strong></p> <p>(activity 1) => (PDF Viewer)</p> <p>Thanks, Mike</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload