DEV Community

Discussion on: Android Vitals - Profiling App Startup 🔬

Collapse
 
anjalsaneen profile image
anjalsaneen • Edited

Unfortunately we cannot control the order in which ContentProvider instances are created, so we may be missing some of the early startup code.

developer.android.com/guide/topics...

Android has an initOrder tag. The value is a simple integer, with higher numbers being initialized first.

    <provider
        android:name=".AppStartListener"
        android:authorities="${applicationId}.appStartProvider"
        android:initOrder="2147483647"
        android:exported="false" />
Enter fullscreen mode Exit fullscreen mode
Collapse
 
pyricau profile image
Py ⚔

Oh that's interesting, Looks like I missed this. Does it work?

Collapse
 
anjalsaneen profile image
anjalsaneen • Edited

Yes. it works.

Thanks for this great article series. we are instrumenting the time taken for each step in the production.

dev-to-uploads.s3.amazonaws.com/up...

Thread Thread
 
pyricau profile image
Py ⚔

Nice!

Blog updated:

updated