An app is considered to be in the foreground if any of the following is true: It has a visible activity , whether the activity is started or paused. It has a foreground service. Another foreground app is connected to the app, either by binding to one of its services or by making use of one of its content providers.