Schedule daily job for deleting old messages

This commit is contained in:
Moez Bhatti
2020-12-26 19:54:22 -05:00
parent b087de8f73
commit 0d6a8c7d12
8 changed files with 150 additions and 1 deletions
@@ -18,6 +18,7 @@
*/
package com.moez.QKSMS.common.util.extensions
import android.app.job.JobScheduler
import android.content.Context
import android.content.res.ColorStateList
import android.graphics.Color
@@ -25,6 +26,7 @@ import android.util.TypedValue
import android.widget.Toast
import androidx.annotation.StringRes
import androidx.core.content.ContextCompat
import androidx.core.content.getSystemService
import com.moez.QKSMS.util.tryOrNull
fun Context.getColorCompat(colorRes: Int): Int {
@@ -84,3 +86,6 @@ fun Context.isInstalled(packageName: String): Boolean {
val Context.versionCode: Int
get() = packageManager.getPackageInfo(packageName, 0).versionCode
val Context.jobScheduler: JobScheduler
get() = getSystemService()!!