Bhushan
Bhushan

Reputation: 424

How to start performance monitoring for Service or Job Scheduler for automatic traces

I have a module with no activity in it, its Job-scheduler or Service is created by a BroadcastReceiver (android.intent.action.BOOT_COMPLETED).

As per docs its mentioned that performance-monitoring "Starts when the app's FirebasePerfProvider ContentProvider completes its onCreate method and stops when the first activity's onResume() method is called. If the app was not cold-started by an activity (for example, by a service or broadcast receiver), no trace is generated."

So how to start performance-monitoring for apps without activities ?

Upvotes: 0

Views: 120

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317798

You're misunderstanding the documentation. What you're referring to is on this page about automatic traces.

Trace name: App start

Starts when the app's FirebasePerfProvider ContentProvider completes its onCreate method and stops when the first activity's onResume() method is called. If the app was not cold-started by an activity (for example, by a service or broadcast receiver), no trace is generated.

What this is telling you is how the "App start" automatic trace works. It doesn't affect the way the rest of your manual traces work. If your app has no activities, then it will generate no App start traces.

Upvotes: 1

Related Questions