Blogs

A Java method to determine if an integer is between a range

Last night I was writing some code for my Android football game, and decided it would be best if I had a between method, so I could write some code like this to show that I wanted to test to see if a number was between an integer range:

if (between(distance, 8, 10)) { ...

That could would be interpreted as, “If the distance is between the values 8 and 10, do whatever is in the code block.” (I can make that code more readable in Scala, but in Java I think that’s the best I can do.)

What is Android doing when it says “optimizing apps” after a system upgrade?

Android FAQ: What is Android doing when it says “optimizing apps” after an Android system upgrade (and reboot)?

The short story is that Android is doing what it says, creating an optimized version of each app for the new version of Android you just upgraded to. This process makes each app start as fast as possible with the new Android version.

Over 100 of my favorite “mindfulness” quotes

This page contains a list of my favorite “mindfulness reminder” quotes. In particular these are short, concise quotes that I think work well with my “Just Be” mobile app.

Just Be is currently an app for Android users. If you haven’t seen it before, this is what the reminders/notifications look like when you receive them on an Android phone or tablet:

A Moto 360 smartwatch + Android Wear review

A week or two ago Google put the first generation Moto 360 watch/smartwatch on sale for $99, and I was lucky enough to buy one before they went out of stock. It seems weird to write a review about an older piece of technology, but I actually like the watch much more than I expected to — despite a few bugs — so I thought I’d share what I’ve learned.

Moto 360 - Pull down settings menu not working

Important note: I wrote the following text just after receiving my Moto 360, charging it, and connecting it to my Android device. At that time these instructions were 100% accurate. But what I learned the next morning is that the Moto 360 user interface changes on the second day (or perhaps within the first 24 hours). I don’t know why it works this way, but in the morning I received a notification saying that pressing the power button now brings up the Settings menu as well as a menu of apps, and sure enough it does.

Syndicate content