Commit 834b731a authored by 周文华's avatar 周文华

【新增】新增应用使用日期记录

parent af402a2c
...@@ -24,6 +24,8 @@ import com.base.scanqrclear.fcm.work.RepeatingWorker.Companion.schedulePeriodicW ...@@ -24,6 +24,8 @@ import com.base.scanqrclear.fcm.work.RepeatingWorker.Companion.schedulePeriodicW
import com.base.scanqrclear.helper.EventUtils import com.base.scanqrclear.helper.EventUtils
import com.base.scanqrclear.helper.InstallHelps import com.base.scanqrclear.helper.InstallHelps
import com.base.scanqrclear.helper.NewComUtils import com.base.scanqrclear.helper.NewComUtils
import com.base.scanqrclear.luma.AdmobHelps.KEY_INSTALL_TIME
import com.base.scanqrclear.luma.SpUtils
import com.base.scanqrclear.service.StayJobService.Companion.startJob import com.base.scanqrclear.service.StayJobService.Companion.startJob
import com.base.scanqrclear.ui.start.StartActivity import com.base.scanqrclear.ui.start.StartActivity
import com.base.scanqrclear.utils.ActivityManagerUtils import com.base.scanqrclear.utils.ActivityManagerUtils
...@@ -117,7 +119,8 @@ class MyApplication : Application() { ...@@ -117,7 +119,8 @@ class MyApplication : Application() {
} }
private fun initApp() { private fun initApp() {
if (SpUtils.getInstance().getLong(KEY_INSTALL_TIME) == 0L)
SpUtils.getInstance().putLong(KEY_INSTALL_TIME, System.currentTimeMillis())
//前台服务 //前台服务
kotlin.runCatching { kotlin.runCatching {
startJob() startJob()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment