Showing posts with label Zooper. Show all posts
Showing posts with label Zooper. Show all posts

Saturday, January 26, 2019

Kustom-izing Android

I look back and realize that I've been dedicated to the Android environment for quite awhile.  One of the things I love about Android is how open and customizable it is.  I was tired of looking at the same screens of nothing but icons, and seeing various screenshots of widgets in those early days allowed me to dream of having a truly personalized phone with a minimalist view.  I'd wanted something akin to an interactive wallpaper... something where the widgets would just seem to blend in to complement whatever background I was using for my device.

One of the first things I did was find a proper launcher.  To this day, I'm still using Nova Launcher.

To complement Nova Launcher, my searches led me to Zooper Widget.  It's a no-nonsense app that, if you did your research and stuck to it, you could set up any type of widget to your heart's desire.  Used in conjuction with other apps (Media Utilities which was also under Zooper, and Popup Widget, both come to mind), I was able to set up an icon-free launcher which also dynamically changed which widget I wanted to access based on what I tapped on screen.  Zooper has been my go-to widget for years.  And then that stopped.

As ambitious as my setup went, a few years had passed and there was a lack of updates.  Outside of learning how to program the date in binary, there really wasn't too much else that I could do, and it just became nothing more than a custom clock for me.  I'm sure there could have been more to discover, but I was resigned to spend any more extra effort, and I was content with leaving things basic and minimalist anyway.

Then my always trusty "twin" Flow recently introduced me to KLWP (Kustom Live Wallpaper).  Now, Kustom Industries has other apps, like KWGT (Kustom Widget Maker), but the potential for using a live wallpaper instead of a wideget was brought to my attention quite quickly.  Checking the odd tutorials online, and seeing examples, I instantly fell in love, and realized that those ideas I had implemented years ago could easily be brought back to the forefront.  I dare say that compared to Zooper, certain presets (especially when it comes to the clock) makes things easier, and the programming is similar enough where I was able to jump in without much effort.  Even the integration of programming within the various objects you're working with, along with specifying Global Variables and object grouping, makes this app feel a lot more robust that I've completely dropped Zooper from my phone.

Currently, I'm now using 2 Android devices:  My trusty Pixel 2XL, and for work a Samsung Galaxy S8.  Rather than mess around with my personal phone, I've used the S8 as my little digial playground to test ideas that I have, and see if can apply what I've learned (and continue to learn) for KLWP.  I've since uploaded a couple of sample videos on YouTube of what I've played around with.




The setup is not quite ready on my 2XL, but I've at least included a screenshot as a teaser :)

Saturday, June 3, 2017

Zooper Binary Programming - How it Works

Awhile back, as a way of testing the AZ Screen Recorder app for Android, I created a quick short video highlighting my phone's minimalist setup:



Initially, I was thinking of creating a supplemental video detailing the programming behind my "binary calendar" setup (which I may end up doing anyway), but figured I needed to go into the mathematics behind the programming to show how the binary works.

I had originally stumbled across this blog when trying to learn how to program my own binary script.  I'd figured that trying to read a binary clock would be too much of a hassle for myself.  Besides, I was more enamored by the analog clock that I'd scripted for so long, I wanted something more elegant to subtly show the date, and so the binary calendar was born.

Anyway, after reading up on that blog I found, I couldn't quite grasp the programming initially, but it provided enough insight on why the math worked.  I'd noticed the correlation between the remainder patterns of when the numbers are divided, and how each bit in the binary is called upon.

First, a quick lesson on binary...

As the name implies, there are only 2 outcomes for an active bit: on or off... in other words, 1 or 0.  Each bit represent a set value: 1, 2, 4, 8, 16, etc.  Bits are aligned where the smallest value (1) is at the very end.

From there it's basic mathematics. Here is an example of a binary table:

4 2 1
0 0 0 0
1 0 0 1
2 0 1 0
3 0 1 1
4 1 0 0
5 1 0 1
6 1 1 0
7 1 1 1

The top row represents the bit.  The first column represents the numbers.  If, for example, we wanted to represent the number 5 in binary, we need the 3rd bit (4), and 1st bit (1) active, hence the binary equivalent is 101.

So how to we translate this table into the programming?  As previously mentioned, there's a correlation in the remainder patterns when those number are divided by those same number patterns in the bits, starting from 2, as seen in the table below:

8 4 2
0 0 0 0
1 1 1 1
2 2 2 0
3 3 3 1
4 4 0 0
5 5 1 1
6 6 2 0
7 7 3 1

For example, for each number divided by 4, the remainder is either 0 or something else.  However, we need to go a step further.  Again, looking at when the numbers are divided by 4, this actually represents the 2nd bit (2), so for each remainder value greater than or equal to 2, that represents an active bit.  You'll notice the numbers in red are the ones that match up with the binary table, just to give you a better understanding of what I'm trying to explain.

At this point, it's just a matter of applying the modulus function within Zooper's Advanced Parameters to determine the remainder, and apply it to whatever preset variable (whether it's for "time", or "date", or whatever requires a numeric value) within Zooper itself.  As an example, to determine the 3rd bit of the binary function:

$(#Zooper Preset variable#%8)>=4?true statement:false statement$

If you happened to stumble upon this blog in search of programming some binary into your Zooper widget, I hope I'd explained the concept well enough.  My apologies if it all seems a bit confusing.  This is really for someone who has invested some time already into doing some programming into Zooper, and has a basic idea of how the programming works.

Kustom-izing Android

I look back and realize that I've been dedicated to the Android environment for quite awhile.  One of the things I love about Android is...