medic / cht-gateway

Android SMS gateway app for CHT Applications
GNU Affero General Public License v3.0
84 stars 41 forks source link

WakefulService is deprecated and needs to be replaced #147

Open SCdF opened 5 years ago

SCdF commented 5 years ago

See: https://github.com/commonsguy/cwac-wakeful

As of writing this says:

UPDATE 2019-05-11: Users of this library should migrate to JobIntentService or WorkManager from Android Jetpack. Those classes cover the primary WakefulIntentService use case, are officially supported, and help with the Android 8.0+ limitation on the life of background services. For the classic WakefulIntentService pattern of just overriding doWakefulWork(), migration to JobIntentService is a matter of changing the superclass, refactoring that method to onHandleWork(), and using enqueueWork() to start the work.

This library is officially discontinued, unless some use case arises where JobIntentService is unsuitable. If you think that you have one, file an issue here.

The rest of the documentation remains for the historical (and possibly hysterical) record.

This repository will be removed from public access on 1 December 2019.

It's unclear to me how severe that last line is, though I suppose it means that we won't have access to the source (unless we clone first) but builds will still continue to work (as they won't remove them from m2 or where-ever).

garethbowen commented 4 years ago

It looks like WorkManager is the supported way forward. Be sure to include the GCM libraries to support API from 16 through 23, and the WorkManager library for 23+ (documentation).

kennsippell commented 3 years ago

This should be investigated as a potential blocker of Nepal project's upgrade to the latest gateway version. https://github.com/medic/medic-gateway/issues/135#issuecomment-722520982