getTopForegroundActivity

public abstract Activity getTopForegroundActivity()

Retrieves the topmost Activity in the foreground.

Return

Returns the topmost Activity if the application is in the foreground; returns NULL if the application is in the background.