BLOX2: “Wakey, Wakey, Mouse!”

sleep2wake

That quote is from one of my son’s favorite books, “Max the Brave”!

Another update to the BLOX2 (BLU Life One X2) kernel, I just added Sweep2Wake and DoubleTap2Wake! You can check out the commit on GitLab, but my phone’s screen and proximity sensor are smashed, so I’m not sure it all works properly. It’s all part of my video series for modifying 64 bit kernels, which you can check out on my YouTube channel: https://www.youtube.com/channel/UCnGqG_jyyXmTzdamBpKfeHA

Linux – keep it simple.

Advertisements

Text field types to capitalize sentences…

device-2018-09-10-130014

I recently received a comment from a Just Notes user about how much they loved the simplicity of the notes app. However, they also pointed out that the text field that you type into doesn’t automatically capitalize sentences or names, and somewhat lacks a bit in terms of use.

He was right.

I typically use this for typing grocery lists, and things that don’t turn out to be complete sentences. So I noticed, but it didn’t really matter to me. I realize that others may use it differently, so I wanted to fix this.

So I did.

You can check out the commit here, where I updated to the target api of 26 (per Google’s requirements to be listed on the Play Store now – *sigh*) and changed the text field type. Here is the only thing that actually changed in my app, from this:

android:inputType=”textMultiLine”

to this:

android:inputType=”textCapSentences|textAutoCorrect|textAutoComplete|textMultiLine” />

And that’s it. That makes it work with auto correct, auto complete, and to capitalize sentences!

Linux – keep it simple.

BLOX2: Voltage Control for the CPU!

cpuvolt

Another update to the BLOX2 (BLU Life One X2) kernel, I just added the ability to adjust the voltage of the CPU on the fly! You can check out the commit on GitLab, but it currently only controls the voltage on the “big” 4 CPU’s, not on the “small” 4 CPU’s. It’s all part of my video series for modifying 64 bit kernels, which you can check out on my YouTube channel: https://www.youtube.com/channel/UCnGqG_jyyXmTzdamBpKfeHA

Linux – keep it simple.

BLOX2: Adding autoSMP Hotplug!

hotplug

Another update to the BLOX2 (BLU Life One X2) kernel, I just added another hot-plug controller called autoSMP. Hot-plug controllers can turn of CPU cores if they are not in use, to save power. You can check out the commit on GitLab, but it is very straight forward. It’s all part of my video series for modifying 64 bit kernels, which you can check out on my YouTube channel: https://www.youtube.com/channel/UCnGqG_jyyXmTzdamBpKfeHA

Linux – keep it simple.

Triple check that, will ya?

device-2017-03-08-124806A long long time ago
I can still remember how
That App used to make me smile….
And I knew if I had my chance
That I could make those dice dance
And maybe they’d be happy for a while….

Uh, wrong lyrics. Actually, it was quite a while ago that I made the Android app, Ships, Captain, and Crew! After the move from GitHub to GitLab, I decided to look over some of my old issues that were imported with GitLab’s great import tool. Among them, I found two issues for this old app that I had made.

The first was that of an issue with screen rotation causing the app to restart. I quickly fixed that by just setting the activity to portrait mode in the manifest file. You can check my commit if you need details.

The second issue was a bit more complicated, in that there was a problem with checking the dice for a ship, captain, or crew. Essentially, if you rolled a 4, 5, 6, 1, and 3, it would say you only have a ship (the 6) and no captain (5) or crew (4). Obviously that’s wrong. The issue is that you need a 6 before you can keep a 5 or 4. And since the dice were checked in order, when it looked at the 5 or 4, it did not have a 6 yet, so they were not “kept”.

This is how I fixed it:

for (int i = 0; i < 3; i++) {

// Check three times.

myNumber = firstDie;

diceCheck();

if (waschecked){

firstnotchecked = false;

}

dieOne.setImageResource(id);

myNumber = secondDie;

diceCheck();

if (waschecked){

secondnotchecked = false;

}

dieTwo.setImageResource(id);

myNumber = thirdDie;

diceCheck();

if (waschecked){

thirdnotchecked = false;

}

dieThree.setImageResource(id);

myNumber = fourthDie;

diceCheck();

if (waschecked){

fourthnotchecked = false;

}

dieFour.setImageResource(id);

myNumber = fifthDie;

diceCheck();

if (waschecked){

fifthnotchecked = false;

}


dieFive.setImageResource(id);


}

As you can see,  I told it to check the dice, first to last, three times. Yes, this is ugly and poor programming. Actually, I was almost ashamed of this early work, it looked so congested and terrible. However, my goal today was the quick fix, so that’s what I did. Hopefully, the update will be available on F-Droid soon, so you’ll have to check it out!

Linux – keep it simple.

Game restarts when minimized!

When I originally created JustChess, I had a problem. If you were playing a game, and pressed the new game button, then started another game, you could press back and go back to the menu, then back and go back to the game. This was a bit odd. At the time, I solved it with “Intent.FLAG_ACTIVITY_NO_HISTORY”. This worked great. Too great.

The problem, as pointed out on my issue tracker, was that when you minimized the game, it would be “destroyed” and rebuilt when you brought the app back. Which is not cool. You may need to answer a text and then come back to your game, and it shouldn’t disappear in between!

minimized

So, I fixed it with my latest commit. I took out the FLAG_ACTIVITY_NO_HISTORY intents, but then my original problem returned. To solve that, I added “finish()” to my new game button, like so:

// First you define it.
Intent myintent = new Intent(MainActivity.this, IntroActivity.class);
// Now you call it.
startActivity(myintent);
finish();

}
})

Now, when you select a new game, it “finishes” your old one. Pressing the back button doesn’t lead you on a wild goose chase to dozens of old games, it just brings you back to the main menu, and that’s much better!

Linux – keep it simple.