Category Archives: Java

Android: Using the CountDownTimer class

In this article I go over the Android SDK CountDownTimer class. It’s easy to use and gives you the ability to count for projects like a workout timer. In this case we are extending that class so that we can access the methods we need to make it work. Here is the code on GitHub. Here is our SimpleCountDownTimer: The extended timer class takes in the amount of time we … Continue reading

Posted in Android, Java | Tagged , , , | Comments

Android: Working with Preferences and Settings

In this article I go over using the built-in Android settings and preference system. I have a settings class as well as an activity that manages user input. A spinner is assigned the task of letting the user turn on or off a vibration feature. When the application is started again, the setting is accessed and assigned to the spinner. It also enables or disables the vibrator based on our … Continue reading

Posted in Android, Java | Tagged , , , , , | Comments

Android: Basic game loop with scaled graphics.

In this article I go over implementing a simple game loop with a custom view. The standard draw method is used with some timing checks so that we can get an approximately consistent refresh rate. This is a somewhat simple way to get started without having to use something OpenGL. The full source code is on GitHub. The main activity handles the creation of our custom view and passes along … Continue reading

Posted in Android, Java | Tagged , , , , | Comments