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

  • SEARCH
  • Home
  • 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 6955093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:41:31+00:00 2026-05-27T14:41:31+00:00

I wrote a script to simulate the user actions. The workflow is, for example,

  • 0

I wrote a script to simulate the user actions. The workflow is, for example, first tap an icon, launch an activity. Then do other actions.
The question is , I don’t know the exact time that the activity launched completely. At present, I use sleep to make my script wait.
Is there any way to know when an activity launched completely?

  • 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-27T14:41:32+00:00Added an answer on May 27, 2026 at 2:41 pm

    Is your final task is to run something after activity is launched… do this

    First method called from activity is onCreate() , Hence we can say completing the onCreate() system calls onStart() which calls onResume() method… as onResume() completes you can say your activity is launched properly…

    If you are not going to override onStart() or onResume() what I am going to describe can be written as last statements of onCreate(). That’s I usually do when I don’t need onStart() or onResume().

    You can create an object of Handler. Like

    Handler handler = new Handler();

    Handler has a method postDelayed() that is called some times after the creating and launching is finished.

    call it like

    handler.postDelayed(runnable,timeInMilliSeconds);

    after all the processes finish, application will wait for timeInMilliSecondsms to start the process defined in run method of runnable provided in postDelayed …..

    Thus

    If your task is to know when the launching is finished the answer is: at the end of onResume() called from your onStart() ….

    If you want to perform some action use handler.PostDelayed() method and keep timeInMilliSeconds very low… [between 1 to 10].

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

Sidebar

Related Questions

I wrote this script to first install the msi and then copy my application
I wrote a script that performs some adjustments, saves then closes the image: preferences.rulerUnits
This is for learning purposes. I wrote a script that will simulate typing. The
I finally wrote a script to get Google Analytics data then insert it into
I wrote a script, where i slurp in UTF-8 encoded HTML-file and then parse
I wrote one script which gets an image url through JSONP, and then I
I wrote a script to export twitter friends as foaf rdf description. Now I'm
I wrote a script in Ruby. I'd like to run it every day at
I wrote this script which counts occurrences of particular pattern in a given file.
I wrote a script that uses xcodebuild to generate an AdHoc build of an

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.