Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Hmm - first, to be more precise, I should point out that in Android you start activities, rather than applications!</p> <p>So, as your entry point to your application is the Activity which handles the LAUNCH intent, one could interpret your question as "how to measure activity start up time".</p> <p>For this, I suggest to look at an Activities lifecycle here: <a href="https://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle" rel="nofollow noreferrer">https://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle</a>.</p> <p>Looking at the nice graph there, you see that startup time is essentially the time that is spent in <code>onCreate()</code>, <code>onStart()</code> and <code>onResume()</code>.</p> <p>To measure that, I would suggest to use <a href="https://developer.android.com/studio/profile/traceview.html" rel="nofollow noreferrer">traceview</a> as this will really show you in all its detail where you spent your time! Start tracing using <code>Debug.startMethodTracing("startUp");</code> in the beginning of <code>onCreate()</code> and end tracing at the end of <code>onResume()</code> with <code>Debug.stopMethodTracing();</code>.</p> <p>Because <code>onCreate()</code> is only called once per instance, you don't even have to worry about multiple calls to <code>onResume()</code> in case this activity will be put to the background as you will call the stop method twice, which is no harm!</p> <p>Have fun - I like the possibilities of traceview very much!</p>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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