Saturday, July 15, 2023

Revival of Trickle

Trickle has been revived! Brought back from the dead! Made fully compatible with Android 14!

Trickle is the pyamsoft Android application which puts your device automatically into Low-Power mode when the screen turns off, and turns off Low-Power mode when the screen turns back on. It is a very efficient power manager application, and much better than the other snake-oil applications on the store as it does not do any custom power logic itself - rather it simply calls to the Android OS power mode.

Recent changes have made it compatible with Android 14 and the new store policy around Foreground Service Restrictions. The has been re-published to the store as the new version 22 with support for Android 14! The publication will go live in a few days and then you will be able to download the new version.

Trickle will continue to be supported for the foreseeable future, until Play Store policy kills us again!


Stay tuned!

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================

Wednesday, July 12, 2023

Death of the Highlander

The Highlander Android library is deprecated and no longer maintained.

Highlander is a simple pyamsoft Android library which helped ensure that only a single instance of a coroutine was running at any given time.

It was one of the earliest pyamsoft libraries that dealt with Coroutines, and it was over-engineered due to a misunderstanding of what coroutines were. A coroutine can mimic Highlander behavior, by simply assigning the launched Job to a variable and canceling the variable before attempting a new Job launch.

Simple, stupid, and no maintaining required.

Worried about race conditions? You are either in a suspending function already and you can use a Mutex to lock and ensure assignments, or you are not in a suspending function and thus can either safely cancel-and-assign a new job (like on the Main Thread), or you can launch a simple coroutine that then allows you to access the Mutex and launch your real coroutine after you have ensured it was cancelled. Easy peasy! Go forth, and adhere to best practices!

Stay tuned!

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================

Always Type Your Sudo Password

Here's a fun one.

You're working on your machine, life is good, everything normal.

You type some command that uses sudo and it asks for your password. You decide you actually don't want to run the command, and you cancel it with Ctrl+C. Maybe you do this a few more times.

Suddenly, you decide you actually do want to run the command, so you type it out again, with sudo and you enter your password and...it rejects you.

You know your password is correct, you're absolutely sure. You even change your password to 12 to make sure you can't mis-type it.

Nope still blocked.

Congratulations, you messed up!

Well sort of. On Linux, sudo works with pam to manage your user-switching attempts. pam is configured by default via /etc/security/faillock.conf which will lock an account if 3 bad passwords are entered in the span of 15 minutes. It seems like a recent change means that even "not entering" a password counts as entering a "bad password" now, so you will be locked and the error message is the same as when the password is wrong so you are none the wiser.

What you need to do, assuming you have normal root access, is switch to root and run faillock --user ${USER} --reset which will clear out the locked sessions for your user if they exist. Then you'll need to re-login to your desktop session. Loads of fun with this one the past hour - thanks sudo!


Stay tuned!

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================

Thursday, July 6, 2023

Feedback

Do you use haptic feedback on your phone? I didn't until recently when I turned it on one day on a whim, it's pretty cool. Since I'm so interested now in the pleasing little buzz of haptics when you swipe and scroll and press on important buttons, I'm adding haptics to all pyamsoft apps, and the PYDroid library. Yay buzz buzz!

Work continues on TetherFi specifically around network proxy performance. I continue to look at the ability to proxy UDP traffic - but it does not really seem to be as easy as I was hoping for a non-rooted Android app to be able to do, so this may need to be put on ice for a while as I figure it out more.

I have been daily driving both my stock app "TickerTape" and my finance management app "Sleep for Breakfast" for a while now - but just haven't made the final polish touches to release them as products, which is unfortunate. Sleep for Breakfast is pretty neat - it watches your phone notifications for things like Google Wallet payment notifications and Venmo transactions, and automatically adds Spending or Earning transactions, so you don't need to open the app up every time youre doing stuff to annoyingly fiddle with a virtual keyboard. You don't even need to take a picture of a stupid receipt, because as long as you received a notification about it, its already recorded! Super useful - very not complete though.

Final bits on the coding side, PYDroid has almost completely removed everything related to the old View system, meaning we are almost ready to go 100% Compose and never interact again with Fragments, Views, or XML (except in string/color resources I guess). Some day soon! I also moved the build toolchain to the new KSP instead of kapt (except in the case of Dagger, which needs kapt still), and hope to eventually move all to KSP once Dagger is ready.

Other miscellaneous updates on the non-coding side, my Steam game launching script gametime gained support for Zink OpenGL rendering, inside of a flatpak, inside of a gamescope embedded session. It's proven very useful when playing Team Fortress 2 and other old OpenGL games that are - lets face it - never getting Vulkan support.

I haven't wrote much lately because all of my computer time has either been spent being employed, or coding instead of writing. Sorry about that. But for the foreseeable future, I see myself coding more than writing once again.

Stay tuned!

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================