How to check if Bugsense is running in my Android application

176 views Asked by At

BugSense work perfect on my application but i want to make sure if it is running? I cant find any why to do this?

I imagine something like this:

if (BugSenseHandler == null) {
   BugSenseHandler.initAndStartSession(this, "API KEY");
}

Thanks..

1

There are 1 answers

0
kospol On BEST ANSWER

I'm Kostas, the Android developer of BugSense.

If you use the initAndStartSession method, BugSense will be running until the application get's out of the stack. More info on tasks and back stack here.

That's why we recommend to place the initAndStartSession method at the first (starting) activity of your application.

There is absolutely no problem in using the initAndStartSession method in every onCreate method of your activities, you can also put it in every onResume too, we've already taken care of this possibility. If you want to be 100% sure that BugSense is running, you can go this way.