Chen Kinnrot
Chen Kinnrot

Reputation: 21015

Observing active activity of application

Is it possible to observe the active activity on the Application context in any way? how?

Upvotes: 0

Views: 364

Answers (1)

Amit Channagiri
Amit Channagiri

Reputation: 61

An application can have only one active activity at a time, that activity is the one being displayed on the screen. Go through the the android activity life cycle to know more.enter image description here

As you can see,there are various states an activity can be in. The one that is active/visible is the one in running state.

If you have started to develop an android application in an IDE like eclipse, you can see what happens behind the scene by observing the logcat. Here is a screenshot of one of my apps, u can observe which activity is being shown to the userenter image description here

To know the current activity on a device i think you should probably look at the log files generated by apps like

NE-Debugger

aLogCat

CatLog

Upvotes: 1

Related Questions