Showing posts with label Always On Always Connected. Show all posts
Showing posts with label Always On Always Connected. Show all posts

Timeout update

Last time I wrote about Timeout, it was called Time Out! and it was only a wireframe. Since then, I showcased a half-working prototype at the 2014 ITP Spring Show, and had largely given up development due to my inability to overcome the challenge of reliably locking down an Android device, regardless of make, model, or version.

Then, two weeks ago, I stumbled on the Android Device Administration API. I have no clue how I missed this during my months of research but clearly I was making things way too hard for myself. In an attempt to mimic apps like Toddler Lock that prevent you from leaving the app, I had overlooked the fact that you could simply force the device to lock, and force it to lock immediately on unlock, ad infinitum, using a built-in Android feature that didn't require anything from the user besides activating device administration through one additional dialogue.

I got busy and, sure enough, it worked. In fact it works all the way back to Android 2.2, which is even more ideal, since that was the oldest version I had planned on supporting.

Today I finished development, and Timeout is now available on Google Play. Thank you to all of my classmates in Always On, Always Connected for sitting through various iterations of the early app, as well as Shawn Van Every his knowledge and support.

Midterm: Moon

Get the code: GitHub

My midterm Android application is Moon, an app that shows the moon phase for any date.


Problem/concept

I have been wanting to explore the phases of the moon for another potential project. The phases are extremely regular and could be used to control something when the moon is treated like a meter oscillating between 0 (dark) and 1 (light). This app is meant to be just for fun but it also allowed me to take the first step towards this and other possible projects involving the moon, sun, and other natural bodies which have consistent cycles.

Introduction

Moon is a simplification of the many moon phase Android apps (Moon Phases Lite, Simple Moon Phase Widget, Phases of the Moon Free, etc.) which feature realistic and/or cheesy graphics. I am not against these apps but I wanted to make something pure and simple that really lets you focus on the cycle.  Moon is no better or worse than the other available apps - it definitely has less functionality, but I will say that it does one thing and it does it well. And the reduced functionality allowed me to focus on smaller, but no less important, UI design features.

How I did it

The most important part of the app is the data that drives the moon phases for a given date. This data is available in tabular form but I wanted to do the calculations programmatically. I tried three different code sources, the first being a PHP snippet that I translated to Java. It turned out that the calculations were wrong, so in the end I found MoonPhase, a J2ME program that calculates and displays moon phases on older mobile phones.  From this I used only the Java class which did the math.

Keeping simplicity in mind, I opted for a single Activity. I then created a custom View that draws the graphics of the phases based on the calculations from MoonPhase. In the custom View I developed a way to form accurate representations of moon phases using simple shapes. This can be seen below, with the shapes given colors to let them stand out.


There are only four cases needed to draw all possible moon phases. In each the color and location of the oval and rectangle are switched to make it appear that the moon face is seamless. In this case, the rectangle is black and the oval is white, but this changes throughout the cycle.

Once able draw the moon phase for a given date, I added a few TextViews and Buttons to step back and forth between dates. I also incorporated an instance of DatePickerDialog for easy date selection, so that tapping the date lets you select any date you want.

I spent extra time on the arrow buttons and enabled them to handle a press-and-hold rather than just a single touch. This lets you more quickly increment/decrement the date. A very useful Stack Overflow thread explains this feature.

What works and what doesn't

Technically there isn't anything that doesn't work, but there is at least one thing that could be improved on. The MoonPhase calculations are so accurate that you can get the exact phase of the moon down to the millisecond, which means that my app greatly diminishes the potential accuracy of what's going on underneath. An enhancement would be to update the moon phase in real time (or closer to real time) when the current date is set. Also it would be nice to accommodate users in the Southern Hemisphere, since this only displays the moon as we see it here in the North.

I don't know what the future holds for Moon but I may attempt to use it as a UI for throttling bandwidth based on the percent of the moon illuminated. Other than that, it was a great exploration of some new Android programming conventions and features.

Midterm ideas

Idea #1: Time Out!

I originally thought Time Out! would be my final project for this class but the amount of work required to finish it may make more sense as a midterm rather than a final. The main problem with the app so far is that in the latest version of Android there isn't a way for one app to kill another app. According to the research I've done, this used to be allowed, as demonstrated by the many task killer apps available in the Google Play Store. However, since the update that removed this ability (I believe it was 4.2), these task killers now lack a large part of their original functionality.



So, either Time Out! needs to be a Launcher (an app that would take the place of the default Android Launcher), which gives a greater chance of being able to manipulate and/or control a user's actions, or I need to think up a new model for achieving the same goals which doesn't rely on programmatically preventing the user from doing anything.

Idea #2: Minimalist moon phase tracker

This idea is related to another potential project that I've been thinking about lately. For the purposes of this class, the app would display a representation of the current moon phase, as well as the moon phase for any date in the past or future.  I know of a few APIs and datasets which provide this information so the app would likely consist of some simple graphics and a date picker running off of asynchronous data (or a purely local dataset if feasible).


Wireframing an app: Time Out!

Time Out! is a proposed app that helps you get away from your mobile device. Most apps want a large serving of your personal time.  In contrast, not only does Time Out! not want your time, it wants to prevent your other apps from over-indulging as well.

Usage case 1: Peace and quiet
It's Saturday. You want some peace and quiet after a hectic week but your social media notifications will not cease. Open the app, adjust the settings to desired stringency, and press Time Out! You will now be unable to open any apps besides those specifically allowed through the Settings screen until the timer runs out.

Usage case 2: Workday focus
It's Monday. You have a ton of work to catch up on but, again, your social media notifications will not cease. Open the app, adjust the settings to desired stringency, and press Time Out! You will now be unable to open any apps besides those specifically allowed through the Settings screen until the timer runs out.

There are really only 3 activities needed for basic implementation.  I haven't given them official names yet but they can be seen below. Additionally, I created a chart to keep track of the activity flow. Even though it is still quite simple, it's nice to see the relationships in clear terms.



An important theme of Time Out! is simplicity, and that's what I'm aiming for in the design of the activities. Keeping the settings compartmentalized within the official Settings menu, only having an "on" button, and keeping most of the app's inner workings invisible to the user just adds to this theme. The app will also include an optional, persistent notification which will keep the countdown accessible even while you use other allowed apps.

I have done a bit of programming so far: most of the design elements for the initial activity are in place, the persistent notification is working (though with one slight issue), and the countdown timer is counting.

Next up:

  • Killing/blocking other apps from launching
  • Coding the logic which alters the main activity on button-press
  • Creating an Android-style Settings activity

My relationship with my phone

I have two relationships with my devices.  The first is as a technological aficionado, in which I serve as a patron and critical analyst. The second is as an end user, in which I depend on the device in my daily life.

I am not one of those people who literally can't be separated from their phone, but I will admit having "information pangs" when I find myself without it. The information I could miss is mostly unimportant.  And the time frame of being without it is very short.  But the feelings of dependency are real and show the big part of my existence my phone occupies.

I got my first smartphone, an iPhone 4, in early 2011, followed by an iPhone 5 in late 2012. The tail end of a device's technological supremacy always starts to feel like a bottleneck in terms of speed as well as usefulness.  I am at that point with my iPhone 5 after only a little more than a year later. I can feel that the device is heavily mediating my interactions rather than facilitating them, even though just a year earlier I felt more empowered than hindered. It strains me to channel my human senses back and forth through a thin aluminum brick.

Getting used to a level of speed or information density makes it hard to go backward.  This is why we need new, innovative ways to process and keep track of all the data we have conditioned ourselves to accept and produce. My iPhone 5 is but an awkward transitional design paradigm that will lead to something better, and hopefully, something more conducive to handling our human senses.

Spring 2014 courses

Always On, Always Connected (Shawn Van Every)

With their always on and always connected nature, mobile devices (phones and tablets) have become the center of our connected self. They offer us the ability to access the network anywhere at anytime, enabling us to share our experiences and share in the experiences of others. They are also starting to emerge as the hub of an emerging set of smart personal accessories such as watches, glasses and jewelry.

In this class, we'll examine the current state-of-the art in mobile technology and smart devices. We’ll focus on developing applications using the Android SDK and various accessory SDKs such as the Glass Development Kit for Google Glass (pending availability) and possibly the Pebble SDK.


Energy (Jeff Feddersen)

Energy has been called the "universal currency" (Vaclav Smil) but also "a very subtle concept… very, very difficult to get right" (Richard Feynman). Building on skills developed in physical computing, we will, through generating and measuring electricity, gain a more nuanced and quantitative understanding of energy in various forms. We will turn kinetic and solar energy into electrical energy, store that in batteries and capacitors, and use it to power small projects. Several sessions will include hands-on labs. We will develop skills useful in a variety of undertakings, from citizen science to art installations, and address a range of topics through the lens of energy. Students will build a final project using skills learned in the class.


LEDs and Non-traditional Display Surfaces (Michael Schneider)

Designing for LEDs and non-traditional display surfaces - A 2-point hands-on production based class that explores the challenges and opportunities of working with non-traditional displays. Students will learn about LED, LCD and other more architectural displays as well as look at a variety of software and content creation tools that are used to drive such displays. The class will be focused on creating a project to be presented at the LED Lab in Tribeca (website is in the process of being updated). There will be an initial quick structured project that students will use to test there content and better understand issues such as resolution, scale, speed of motion and color. Students will then develop an idea for their final project that they will develop and test out at the LED Lab 2-3 times before the final presentation/event.

The LED Lab contains a variety of different LED Products, LCD arrays, media servers, lighting implements and features the UVA designed D3 software that can build and control media displays as well as lighting in 3d.


Rest of You (Dan O'Sullivan)

We build computers around an illusory image of ourselves. In particular the illusion that our consciousness is the full extent of our experience limits how we might use computers to augment the fuller expression of our lives. This class looks at how we can use computational media to connect with the rest of your existence. The class begins by examining some of the illusions that we operate under and how revisiting those can be helpful. Then we will use sensors to give voice the less represented parts of your body. This class will also serve as a gentle rejoinder to Physical Computing and ICM. Exercises will use bio sensors, cameras, logging, mobile tech, data analysis and visualization.