evilthreads669966 / bootlaces Goto Github PK
View Code? Open in Web Editor NEWA Kotlin work manager library for Android with progress notifications and Hilt support.
License: Apache License 2.0
A Kotlin work manager library for Android with progress notifications and Hilt support.
License: Apache License 2.0
I'm thinking about picking up a Marijuana habit and starting planet side 2 again. Maby after I'll update the release with the new code.
I was playing with my phone off to the side and I Restarted and my persistent hourly worker didn't run after reboot so I kicked the system clock up and kept trying and kind of forgot but now I am really going to check all these while I do something else
the question is the singleton of the database synchronized. I'm working through some Room documentation right now and it stuck out
I just realized that my adapter is supposed to be named converter....haha, Oh well I can't upload for a year sooo and I am not even supposed to be on here either. This is really my last post and the account is frozen. I shall return on New Years Eve
Thinking surviveReboot parameter will make more sense than persistent.
Okay so I was gonna disable the app icon before I dissapeared but here is what my research brought. I've only been at this for 10 minutes. I spent the last 2 days straight working with jetpack.
Soo if we disable the launcher activity which disables the icon in the launcher... then we can't start that activity to lock the screen...
meaning we must have a second activity for locking the screen that way we can disable the launcher activity and still be able to lock the screen I am working on this right before I go back to working on my core skill set and updating my knowledge of android libraries for the next 6-8 months.
It's complaining about ReschedulingReceiver matching the same key.
C:\Users\evilt\AndroidStudioProjects\EvilScreenNew\app\build\generated\source\kapt\debug\com\evilthreads\App_HiltComponents.java:141: error: [Dagger/MissingBinding] @dagger.hilt.android.qualifiers.ActivityContext android.content.Context cannot be provided without an @Provides-annotated method.
public abstract static class SingletonC implements ReschedulingReceiver_GeneratedInjector,
^
A binding with matching key exists in component: com.evilthreads.App_HiltComponents.ActivityC
@dagger.hilt.android.qualifiers.ActivityContext android.content.Context is injected at
com.evilthreads.LockObserver(activityContext, �)
com.evilthreads.LockObserver is injected at
com.evilthreads.lock.ui.LockActivity.lockObserver
com.evilthreads.lock.ui.LockActivity is injected at
com.evilthreads.lock.ui.LockActivity_GeneratedInjector.injectLockActivity(com.evilthreads.lock.ui.LockActivity) [com.evilthreads.App_HiltComponents.SingletonC ? com.evilthreads.App_HiltComponents.ActivityRetainedC ? com.evilthreads.App_HiltComponents.ActivityC]
There isn't a bug but I just finished everything and I realized I can get rid of persistent workers. The extra properties aren't needed. It might take some time but it will make it more flexible and it will be cleaner.
Background notification content is not persisting across reboot. This might be related to direct boot but I am not sure.
I'm laying in bed like just finishing writing that function and I check my git log and it goes back like 30 merges haha. Wow. I've never felt like this bad before. Like right as my body begins to feel weary and my eyes are burning from the excessive screen exposure and lack off sleep...i guess it feels better though because the end result. makes my eyes lay easier
Since WorkRescheduling is only use one time only, it should perhaps be only instantiated once and then let it be garbage collected
changing work from public to internal broke the build
Display background work notification on watches.
2020-12-31 20:35:20.074 4776-4853/com.candroid.lacedboots D/Hourly worker: working hourly
2020-12-31 20:35:20.085 4776-4850/com.candroid.lacedboots D/Hourly worker: working hourly
2020-12-31 20:35:20.125 4776-4845/com.candroid.lacedboots D/Hourly worker: working hourly
fun WorkScheduler.scheduleWork() {
PersistentWorker().schedulePersistent()
FirstFutureWorker().scheduleFuture(10000L, true, true)
}
onCreate(...){
PersistentWorker().schedulePersistent()
FirstFutureWorker().scheduleFuture(10000L, true, true)
}
class WorkScheduler @Inject constructor(@ApplicationContext val ctx: Context, val alarmMgr: AlarmManager, val factory: IntentFactory) {
fun Worker.schedulePersistent() = schedule(ctx, factory)
fun Worker.scheduleNow(): Boolean = schedule(factory, alarmMgr, 0L, false, false)
fun Worker.scheduleFuture(delay: Long, repeating: Boolean = false, wakeupIfIdle: Boolean = false): Boolean =
schedule(factory, alarmMgr, delay, repeating, wakeupIfIdle)
fun Worker.scheduleHour(repeating: Boolean = false, wakeupIfIdle: Boolean = false): Boolean =
schedule(factory, alarmMgr, AlarmManager.INTERVAL_HOUR, repeating, wakeupIfIdle)
fun Worker.scheduleQuarterDay(repeating: Boolean = false, wakeupIfIdle: Boolean = false): Boolean =
schedule(factory, alarmMgr, AlarmManager.INTERVAL_HOUR * 6, repeating, wakeupIfIdle)
}
internal fun Worker.schedule(factory: IntentFactory, alarmMgr: AlarmManager, interval: Long, repeating: Boolean, wakeupIfIdle: Boolean): Boolean{
val pendingIntent = factory.createPendingIntent(this.toWork()) ?: return false
var alarmTimeType: Int = AlarmManager.RTC
val triggerTime = System.currentTimeMillis() + interval
if(wakeupIfIdle)
alarmTimeType = AlarmManager.RTC_WAKEUP
if(repeating)
alarmMgr.setRepeating(alarmTimeType, triggerTime, interval, pendingIntent)
else
if(wakeupIfIdle)
alarmMgr.setExactAndAllowWhileIdle(alarmTimeType, triggerTime, pendingIntent)
else
alarmMgr.setExact(alarmTimeType, triggerTime, pendingIntent)
return true
}
///TWO Internal KTX functions for internal API one schedules non-persistent and the other persistent
internal fun Worker.schedule(ctx: Context, factory: IntentFactory){
val intent = factory.createWorkIntent(this.toWork(), Actions.ACTION_WORK_PERSISTENT)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
ctx.startForegroundService(intent)
else
ctx.startService(intent)
WorkService.persist(ctx)
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.