Code example for Queue

Methods: add

0
    @Override 
    protected void onResume() { 
        super.onResume(); 
        Intent intent = getIntent();
        if (intent != null) {
            mDownloadsToShow.add(intent);
            setIntent(null);
            showNextDialog(); 
        } 
        if (mDialog != null && !mDialog.isShowing()) {
            mDialog.show();
        } 
    } 
 
    private void showNextDialog() { 
        if (mDialog != null) {
            return; 
        } 
 
        if (mDownloadsToShow.isEmpty()) {
            finish();