In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
In this article, the editor introduces in detail "Android app startup node and reporting startup method". The content is detailed, the steps are clear, and the details are handled properly. I hope this "Android app startup node and reporting startup method" article can help you solve your doubts.
Key nodes started by app
The startup libraries in content provider and Androidx are often used to initialize libraries, so what is the order in which the key methods of app startup are executed? How do I control the startup order of my library?
Refer to this article: Android multiple ContentProvider initialization order
The essence is in this picture:
Answer the above question: how do I control the startup order of my library?
It is recommended to use contentprovider and set initOrder.
Startup is not recommended because it can only be controlled by dependency in the dependices () callback. It is strongly dependent and inflexible.
How to calculate the startup time solution 1: refer to firebase:
From the first contentProvider's attachInfo to the first page's onReusme:
App-start-foreground-background-traces: https://firebase.google.com/docs/perf-mon/app-start-foreground-background-traces?authuser=0&platform=android
App start trace
This trace measures the time between when the user opens the app and when the app is responsive. In the console, the trace's name is _ app_start. The collected metric for this trace is "duration".
Starts when the app's FirebasePerfProvider ContentProvider completes its onCreate method.
Stops when the first activity's onResume () method is called.
Note that if the app was not cold-started by an activity (for example, by a service or broadcast receiver), no trace is generated.
Take a look at the configuration of FirebasePerfProvider:
InitOrder= 101is basically the largest. None of the other Provider in the project is configured with initOrder.
You can print / report a similar trace by yourself.
Then you can see the log output of logcat and the statistics of trace platform.
Option 2: ams
Adb command:
Adb shell am start-W package name / entry activity full class name
The log is output on the console:
The time here will be a little less than that of option 1.
After reading this, the article "Android app Startup Node and reporting Startup method" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.