Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 876083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:22:32+00:00 2026-05-15T11:22:32+00:00

I wanna run two system activities one after another in specific order. now as

  • 0

I wanna run two system activities one after another in specific order.

now as we know, startActivity is an asynchronous operation, so i cant keep on a specific order.

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

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

Any tricks how could i manage with this issue?

Some code:

first activity:

                                         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);

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:22:33+00:00Added an answer on May 15, 2026 at 11:22 am

    You should be able to use startActivityForResult.. The second parameter to that function is a unique id, which you can use to track which activity is ending.

    In onActivityResult of the calling activity, check which activity just finished, then start the next one with another call to startActivityForResult (or, if you don’t care what happens with the 2nd, just startActivity).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project on intellij and now i wanna run it on intellinj
I wanna get the Timedate value from another page using request.querystring and then use
I wanna place two child un-ordered lists side by side. They are having Class
I have activity A in package one, and I want to run an intent
I wanna run a java application through NSIS. My java program is called PropertiesReader.java
i wanna using curl in php script and run it in command line mode.
I have two columns of data. I'd like to run select statement on them
I have a Database with some tables, I wanna to run a method in
Wanna write a RegEx to validate a driving license. if it doesn't start with
I wanna stop the reading of my text input file when the word synonyms

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.