Synchronous system activities
<p>I wanna run two system activities one after another in specific order.</p>

<p>now as we know, <code>startActivity</code> is an asynchronous operation, so i cant keep on a specific order.</p>

<p>so i thought maybe I should try to do it with <code>dialogBox</code> in the middle but also running a <code>dialogBox</code> is an asynchronous.</p>

<p>now as i said the activities which i try to run are system activities, so i cant even start them with <code>startActivityForResult</code> (or mybe i can, but i cant think how it will help me).</p>

<p>Any tricks how could i manage with this issue?</p>

<p>Some code:</p>

<p>first activity:</p>

<pre><code>                                         Intent intent = new Intent();
                                        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                                           intent.setAction(Settings.ACTION_APPLICATION_SETTINGS);
                                           startActivity(intent);   

second activity:

    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    intent.setDataAndType(Uri.fromFile(tmpPackageFile
            .getAbsoluteFile()),
            "application/vnd.android.package-archive");
    startActivity(intent);
</code></pre>

<p>as you can see, i dont have any access to those activites, i can just run thire intents from an outside class/activity/service.</p>
