Showing posts with label smartwatch. Show all posts
Showing posts with label smartwatch. Show all posts

Monday, June 1, 2015

Fit Cat at Google I/O

One of the most exciting things at Google I/O this year for me was to meet Virginia Poltrack in person.

Online introduction

I wanted to make an Android Wear watch face with a cat that does different things depending on how many steps you took that day. The first order of business is to find an illustrator to draw the cute cats. I posted on Google Plus to ask for recommendations, and my friend Macy introduced me to Virginia. At that point I didn't say anything about a watch face, so I was really surprised when I saw this on Virginia's profile:

Yup, not only that she is an amazing illustrator, she has made watch faces before!

Rapid iterations

Once I explained my idea to Virginia, we both got really excited and started working right away.

Our goal was to launch before I/O, and we did it! Twice, in fact: first with just the cat, and then with pedometer integration.

Women Techmakers interview

At this point we have only worked together online, so we were really looking forward to seeing each other at I/O. Then Natalie Villalobos from Women Techmakers gave us a wonderful surprise: she interviewed both of us about Fit Cat!

Fit Cat everywhere!

Google I/O was a perfect place to test Fit Cat since I tend to walk a lot during conferences. I snapped photos of it throughout the day.

My friends started doing the same, and it was so heartwarming to see Fit Cat everywhere!

Only the beginning

It has been such a pleasure working with Virginia. We are already plotting our next projects together, so stay tuned!

Saturday, August 4, 2012

Tally Counter for Smart Watch and Headset

I've been trying to come up with an app for my Sony Smart Wireless Headset pro, and like I mentioned in my Ignite talk, I often get new ideas when I swim. This time, however, it was quite literal. I was handing my pass to the clerk at the counter, and he clicked on his tally counter to keep track of how many people went swimming that day. That is perfect for the headset! It just needs one button to operate, which the headset has a big one in front, somewhere to show the counter, which the headset can do on its display.

After the made the app on the headset I decided to put it on the watch as well. Initially I used the same style, but then I realized the watch has a color screen, so I added some gradients to give it a background that looks like the dial on an odometer.

I did some user testing: gave the watch and headset to my husband to try. The headset was great, he said, because the button gave him tactile feedback, so he knew he clicked successfully without looking. Maybe I could add vibration to the watch? It was a really great idea. Besides giving tactile feedback, the vibration made a little buzz, and it happens to emulate the sound of a real tally counter. It was really satisfactory to tap on the watch and hear the count go up.

See it in action in this video:

Get this extension for free from Google Play: Tally Counter for SmartWatch.

Monday, May 28, 2012

Sony SmartWatch as name tag

As I mentioned earlier, I got a Sony SmartWatch at AnDevCon. I have been trying to come up with app ideas, but most of them didn't pass the "I can just pull out my phone" test. I was chatting with some friends, and one of them unclipped the watch from its strap and clipped it on his shirt. Now that's an awesome name tag!

I decided to write an app that reads images out of a folder on the SD card and show them on the watch as a slideshow. I first wrote a widget, but that did not work well because there was a loading screen between each refresh. I looked into the SDK some more, and decided to write a control instead. I refactored my widget code to add a control, but the control simply would not show up on the watch. I was studying the sample code very carefully and just could not figure out why. So I went to bed.

The next morning I started a fresh project to write the control. That worked. I then added a widget. Now the widget would not show up. It suddenly occurred to me that perhaps the LiveWare manager stored the app properties in a database, and did not reset the state when I reinstalled the app, so it did not recognize the additional control/widget.

To test that theory, I went to "Manage Applications" and cleared the data of the LiveWere manager. Well well, now it didn't even know about the SmartWatch! I uninstalled the SmartWatch app and reinstalled it from Google Play. And then I did the Bluetooth pairing again. Finally I installed my extension, and indeed, now my control showed up. That was really difficult to debug!

At this point the control was just displaying some hard-coded images. I swapped in a MediaStore query to get images from the phone:

String[] projection = {
  MediaStore.Images.Media._ID,
  MediaStore.Images.Media.DATA,
  MediaStore.Images.Media.ORIENTATION
};
Cursor cursor = mContext.getContentResolver().query(
  MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
  projection,
  MediaStore.Images.Media.DATA + " LIKE ?",
  new String[] { folder + "/%"},
  MediaStore.Images.Media.DATA);

A few notes here:

  • I use ORIENTATION to rotate the image before displaying.
  • The "where" part of the query is specified by data binding. It is a safe way to say MediaStore.Images.Media.DATA + " LIKE '" + folder + "/%'"

The SmartWatch dims the screen to save battery, but a dimmed name tag is a bit useless, so I added an option to leave the screen on.

setScreenState(alwaysOn ? 
  Control.Intents.SCREEN_STATE_ON : 
  Control.Intents.SCREEN_STATE_AUTO);

After adding the option to change the slide duration, I was ready to deploy. Very curiously, I got a fatal lint error, complaining that I did not localize my app to zh-rTW and ja. I could disable the lint, but as luck has it I speak both Chinese and Japanese, so I decided to localize the app!

The extension is now available on Google Play:
https://play.google.com/store/apps/details?id=com.sqisland.smartwatch.slideshow

You can also check out the Chinese and Japanese descriptions. I got lazy for Japanese, so I did not talk about selecting a folder or using it as a name tag. If you have a good translation, let me know!

The extension took me 2 days end to end. Overall it was a pretty good experience, except the part where I needed to clear data from the LiveWare manager when adding a control to an installed extension.

If you are an Android developer and you would like to get a SmartWatch for writing your own apps, you can submit a request to Sony using this link: https://www.surveymonkey.com/s/VT9D25X. If you do, ping me. I'm curious what you'll do with the SmartWatch!