![]() |
Speedify SDK for Android
15.3.0
|
Foreground Service notification Interface.
All calls happen from the background :vpnservice process. All calls are sent from background threads.
Classes | |
class | ServiceData |
Common status data used in default foreground notification. More... | |
Public Member Functions | |
void | UpdateForegroundNotification (@NonNull Service service, @NonNull ServiceData serviceData) |
Callback to show a notification of the service state. More... | |
void | HideForegroundNotification (@NonNull Service service) |
Callback when vpn service task is removed. More... | |
void com.speedify.speedifysdk.receivers.IForegroundNotificationReceiver.HideForegroundNotification | ( | @NonNull Service | service | ) |
Callback when vpn service task is removed.
If overriding UpdateForegroundNotification, use this to hide your notification. Called from secondary (:vpnservice) process.
service | Reference to the vpn service |
Implemented in com.speedify.speedifysdk.SpeedifyHandler.
void com.speedify.speedifysdk.receivers.IForegroundNotificationReceiver.UpdateForegroundNotification | ( | @NonNull Service | service, |
@NonNull ServiceData | serviceData | ||
) |
Callback to show a notification of the service state.
A default implementation is provided. If overriding, it is required on Oreo and higher that you call service.startForeground so that Android does not automatically stop the service after a few seconds. Prior to Oreo it is still recommended to use service.startForeground so that Android is less likely to destroy the service in low memory situations. Called from secondary (:vpnservice) process.
service | Reference to the vpn service |
serviceData | Data to use in the notification |