QtDataSync  4.2.0
A simple offline-first synchronisation framework, to synchronize data of Qt applications between devices
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
de.skycoder42.qtdatasync.SyncBootReceiver Class Reference

A helper class used by the android background sync service to restart the service after a reboot. More...

+ Inheritance diagram for de.skycoder42.qtdatasync.SyncBootReceiver:

Public Member Functions

void onReceive (Context context, Intent intent)
 Inherits android.content.BroadcastReceiver.onReceive.
 

Static Public Member Functions

static void prepareRegistration (Context context, String serviceName, long interval)
 Prepares a service for beeing rescheduled by registering it with the receiver. More...
 
static void clearRegistration (Context context)
 Remove any service registrations for rescheduling after a reboot. More...
 

Static Public Attributes

static final String ServiceNameKey = "de.skycoder42.qtdatasync.SyncBootReceiver.key.serviceName"
 The key used to store the name of the service to be started.
 
static final String IntervalKey = "de.skycoder42.qtdatasync.SyncBootReceiver.key.interval"
 The key used to store the synchronization interval of the service to be started.
 

Detailed Description

A helper class used by the android background sync service to restart the service after a reboot.

Definition at line 17 of file SyncBootReceiver.java.

Member Function Documentation

◆ clearRegistration()

static void de.skycoder42.qtdatasync.SyncBootReceiver.clearRegistration ( Context  context)
inlinestatic

Remove any service registrations for rescheduling after a reboot.

Parameters
contextThe android context of the activity/service making this call

Internally called by QtDataSync::AndroidSyncControl disable rescheduling of the sync service in case background sync gets disabled

Definition at line 62 of file SyncBootReceiver.java.

◆ prepareRegistration()

static void de.skycoder42.qtdatasync.SyncBootReceiver.prepareRegistration ( Context  context,
String  serviceName,
long  interval 
)
inlinestatic

Prepares a service for beeing rescheduled by registering it with the receiver.

Parameters
contextThe android context of the activity/service making this call
serviceNameThe JAVA-Class name of the service to be run for synchronization
intervalThe synchronization interval the service should run at

Internally called by QtDataSync::AndroidSyncControl to ensure a sync service gets rescheduled after a system reboot

Definition at line 48 of file SyncBootReceiver.java.


The documentation for this class was generated from the following file: