Example usage for android.app Service stopForeground

List of usage examples for android.app Service stopForeground

Introduction

In this page you can find the example usage for android.app Service stopForeground.

Prototype

public final void stopForeground(@StopForegroundFlags int flags) 

Source Link

Document

Remove this service from foreground state, allowing it to be killed if more memory is needed.

Usage

From source file:Main.java

public static void stopForeground(Service service) {
    service.stopForeground(true);
}

From source file:Main.java

public static void stopServiceAlive(Service service) {
    service.stopForeground(true);
}

From source file:com.reallynourl.nourl.fmpfoldermusicplayer.ui.notifications.MediaNotification.java

public static void remove(Service service) {
    service.stopForeground(true);
    NotificationManagerCompat.from(service).cancel(NOTIFICATION_ID);
}

From source file:com.schoentoon.connectbot.service.ConnectionNotifier.java

public void hideRunningNotification(Service context) {
    context.stopForeground(true);
}