Showing posts with label Android Wear. Show all posts
Showing posts with label Android Wear. Show all posts

28 July 2015

Top Ten Free Android Wear Watch Faces

I've recently got myself an Android Wear Watch. It’s actually an Asus ZenWatch and thus far I’ve really enjoyed it. In using it I'm constantly on the lookout for new and attractive watch faces. There are hundreds of different watch faces out there and developers build more every day. I myself have created a few watch faces and am looking forward to launching a new digital watch face soon. I thought I’d do a list of my favourite free watch faces.

I’ll specify that the following list of free watch faces are almost all digital. Yes I’m one of those people who own a digital watch. I dislike analogue watches and always will.

Orbiting this at a distance of roughly ninety-eight million miles is an utterly insignificant little blue-green planet whose ape-descended life forms are so amazingly primitive that they still think digital watches are a pretty neat idea.
- Douglas Adams (Hitchhiker's Guide To The Galaxy)

Here is a list of the top ten free watch faces I’ve found so far:

  1. Weather Watch face
    https://play.google.com/store/apps/details?id=com.pizzaentertainment.weatherwatchface&hl=en
    This is a really beautiful watch face. Granted it’s “fremium”, you can install it for free and then pay for more features, but the basic model is really great.
  2. LED Clock
    https://play.google.com/store/apps/details?id=com.seenapps.ledclock_face&hl=en
    Very simple, very elegant, I really like this watch face. Just LED numbers, nothing else.
  3. Word Clock
    https://play.google.com/store/apps/details?id=de.amnoid.thakis.wordclock&hl=en
    I love this watch face, whoever thought of this is a genious. I wish I’d come up with the idea. It shows the time as words, which is really fun. No date and no battery info.
  4. Binary
    https://play.google.com/store/apps/details?id=com.halachev.martin.android.wearable.binarywatchface&hl=en
    The ultimate geek watch face. Time displayed in highlighted circles representing 8,4,2,1 for the hour and so on. Really clever. Date in the background can be a bit hard to decipher and day of the week is missing.
  5. Matrix
    https://play.google.com/store/apps/details?id=net.dheera.wearfacematrix&hl=en Probably not great for battery and becomes a little annoying. Still a really fun idea. Doesn’t display any date or battery levels.
  6. Space and Time
    https://play.google.com/store/apps/details?id=net.genggao.spaceandtime&hl=en
    Colourful and fun, these things please me.
  7. Vigor Watch Face
    Comes free with either Google Wear or Asus, either way it’s a lovely little watch face. Ties nicely into the numbers of steps you’ve done in a day.Lacks the month and year, but I should really know that shouldn’t I?
  8. QWF
    https://play.google.com/store/apps/details?id=qwf.ammarptn.com.qwf&hl=en
    This is a really lovely little watch face. Super simple, super pretty. It lacks a day of the week and some of the information the others have, but that’s excusable.
  9. Un Petit Monde
    https://play.google.com/store/apps/details?id=net.unpetitmonde.miniadventure.watchface
    No options, battery and limited date display, but a fun design with a relaxing background effect.
  10. Simple Watch Face
    https://play.google.com/store/apps/details?id=com.koherent.simplisticwatchface&hl=en
    Does exactly what it says on the tin. A nice simple watch face with good colours and a good idea for a theme. No 24 hour, no date, no battery.




09 July 2015

Android Wear - A week with a smartwatch

Thus far, I've not been impressed with smartwatches, I like new toys but even Android Wear has yet to impress me. The watches are just too big, I don’t buy into the charging every day thing and frankly I'm just not excited about the benefits. I've had a Casio watch which I've worn every day for about fifteen years and I've never charged it. Not once!

Roughly a week ago my work bought an Asus Zenwatch running Android Wear for testing and developing on. Not one to look a gift horse in the mouth and always up for some new programming and tinkering I was quite looking forward to having a play. I've previously written a test app but I used an emulator for this: http://webdeveloperpadawan.blogspot.co.uk/2014/07/android-wearables-first-go.html

My first impression of the Zen Watch was actually very good. It’s not nearly as fat as the LG Moto 360 which a few of my colleagues have and both the leather strap and the face have a nice look and feel. It is square but I can’t imagine that would bear any consequence to anyone.

It is too big, my tiny girl wrists are very twig like and the watch doesn't fit well and looks huge. There are huge gaps in the corners where the watch overlaps the flat bit of my wrist. That said it is comfortable and easy to get used to.

Turn on and set-up are a breeze and you can play with the watch faces on the play store which is fun for a few minutes.

Then it hits you….what now? You can’t really do anything with it! This is what is quite funny, people spot it on your wrist quite quickly and you honestly can’t show them much. It’s a passive device, you can’t play games on it, you can’t type on it, it just responds.

Sure you can use OK Google which is impressive, but I don’t talk to my phone and I’m unlikely to talk to this. It does work well and you can send messages and such by talking. Word to the wise, don’t try this after half a bottle of wine as I ended up sending all sorts of random messages to various people.

The beauty of the watch, and where I'm finally coming to actually really like it, is when you need to react to something. For example when one of the millions of spam messages comes to my phone, I don’t actually need to get my phone out to check it. I can immediately check and prioritise what’s important. The other thing that really stands out is the vibrate on your wrist, this is great as I often miss a call or message on my phone. The wrist vibrate is subtle but also unmissable. The ability to not get your phone out of your pocket sounds unbelievably lazy, but the watch works. For example in meetings or when you’re busy doing something, you can prioritise at a glance. Is this just another meaningless message from some inane whatsapp group or is it a message from Nest saying my house is on fire?

The battery is much less of a big deal than I thought, I'm getting two or three days of use out of it (I turn it off at night) and can just chuck it on its gradle for a bit while I'm working on it. Will it get tired….possibly, but so far its really not bothered me.

The Oatmeal have a fantastic post about the watch, all be it the apple one…. and it’s got funnier pictures than I do:

So to summarize, I'm impressed, very impressed. It can be surprisingly useful and does make life much easier. Million dollar question, would I buy one? No. They’re too big, when technology advances and the size comes way down, yes I will.

07 July 2014

Android Wearables First Go

I thought I’d try the new Android wear SDK and see if I could do anything useful with it. It took a while and a few head scratching moments but I got there in the end. What I wanted to do was send a message from the Android wear watch to my Android phone. Seems like such an easy ask!


First up you need Android Studio. I hope they make it possible with Eclipse / ADT, but I couldn't make it happen and quickly gave up! You also need to be super up to date with your SDK, as of today my versions:


  • Android SDK Tools 23.0.2
  • Android 4.4W (API 20)
  • Android 4.4.2 (API 19)
  • Google Play Services revision 18 (5.0)


Once all that is ready and working without error you need a to create a new project and follow the steps as per the Android developer page: http://developer.android.com/training/wearables/apps/creating.html
Basically create an app for mobile as per usual and a partner application for wear. You also need to setup an emulator or use a real watch. I can’t afford a real wear watch so I'm on the emulator. Follow the steps to connect your phone via usb cable and the emulator, bit fiddly but works eventually. The basic idea here is to use Google Play Services to transfer messages between the watch and the phone with the Message API. I believe this is new which is why it is so important to ensure everything is up to date.


Now the code, first the mobile side of things.


This is the gradle dependancies. My min sdk is 9 and my target sdk is 20.
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    wearApp project(':wear')
    compile 'com.android.support:appcompat-v7:19.+'
    compile 'com.google.android.gms:play-services-wearable:+'
}


Now we’re not making a fancy front end here as this is just really a proof of concept. Here’s the MainActivity.java. As you should be able to see this is a fairly simple listener.


public class MainActivity extends Activity implements GoogleApiClient.ConnectionCallbacks,
    GoogleApiClient.OnConnectionFailedListener,
    MessageApi.MessageListener{


Now some member variables:


    GoogleApiClient mGoogleApiClient;
    public static final String START_ACTIVITY_PATH = "/start/MainActivity";


Here is the on create:


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

         // Create a GoogleApiClient instance
        mGoogleApiClient = new GoogleApiClient.Builder(this)
                .addApi(Wearable.API)
                .addConnectionCallbacks(this)
                .addOnConnectionFailedListener(this)
                .build();

         mGoogleApiClient.connect();
}


What we’re doing here is initialising the Google API Client with the Wearable.API. These are the methods overwritten from the implements section.


    @Override
    public void onConnected(Bundle bundle) {
        Log.i("mobile", "Connected");
        //We are connected, we can add our listener to this Activity.
        Wearable.MessageApi.addListener(mGoogleApiClient, this);
    }

     @Override
    public void onConnectionSuspended(int i) {
        Log.i("mobile", "Connection Suspended");
    }

     @Override
    public void onConnectionFailed(ConnectionResult connectionResult) {
        Log.i("mobile", "Connection Failed");
    }

     @Override
    public void onMessageReceived(MessageEvent messageEvent) {
        Log.i("mobile", "msg recieved and understood");

         if (messageEvent.getPath().equals(START_ACTIVITY_PATH)) {
            Log.i("mobile", "******WHOOOO*******");
            //Send a message to a Handler for UI Update.
            myHandler.sendEmptyMessage(DO_UPDATE_TEXT);
        }
    }


That’s the mobile side of things more or less done :) Again, nothing fancy, just proof of concept.


Now the wearable part of the project. Here we’re going to send the message, but again we have to connect to Google API Client.


I’m just going to post the whole file here as it’s probably easier. I’ll skip the layout, as its just a button.


  1. First (in onCreate) we define and connect to our mGoogleApiClient.
  2. OnConnected we start of the getConnectedNodes Async Task. This needs to run seperate from the UI and basically grabs all connected nodes. In our case there is only one, but you should really check here and maybe flash up a dialog or something if there are more or less than one clients connected.


  1. Once that’s done we send a message as such sendMsg(results.get(0));. This sends the node ID we got from the Wearable API and calls the sendMsg function


  1. In SendMsg we call Wearable.MessageApi.sendMessage. As expected this sends our message. Right now the message is meaningless, but you could easily modify this example to send a real message and have the listener display it.


That’s it. Hope it helps, here is the wear project code:



package com.example.com.wearable;

 import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.wearable.view.WatchViewStub;
import android.util.Log;
import android.view.View;
import android.widget.TextView;

 import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.wearable.MessageApi;
import com.google.android.gms.wearable.Node;
import com.google.android.gms.wearable.NodeApi;
import com.google.android.gms.wearable.Wearable;

 import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;

 public class WearActivity extends Activity implements GoogleApiClient.ConnectionCallbacks,
        GoogleApiClient.OnConnectionFailedListener {

     private TextView mTextView;
    GoogleApiClient mGoogleApiClient;
    public static final String START_ACTIVITY_PATH = "/start/MainActivity";

     @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_wear);

         // Create a GoogleApiClient instance
        mGoogleApiClient = new GoogleApiClient.Builder(this)
                .addApi(Wearable.API)
                .addConnectionCallbacks(this)
                .addOnConnectionFailedListener(this)
                .build();

         mGoogleApiClient.connect();

         final WatchViewStub stub = (WatchViewStub) findViewById(R.id.watch_view_stub);
        stub.setOnLayoutInflatedListener(new WatchViewStub.OnLayoutInflatedListener() {
            @Override
            public void onLayoutInflated(WatchViewStub stub) {
                mTextView = (TextView) stub.findViewById(R.id.text);

                 findViewById(R.id.activity_wear_send_msg).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        GetConnectedNodes task = new GetConnectedNodes();
                        task.execute(new String[]{"com"});
                    }
                });

             }
        });
    }

     private Collection<String> getNodes() {
        HashSet<String> results = new HashSet<String>();
        NodeApi.GetConnectedNodesResult nodes = Wearable.NodeApi.getConnectedNodes(mGoogleApiClient).await();
        for (Node node : nodes.getNodes()) {
            results.add(node.getId());
            Log.i("wear", node.getId());
        }
        return results;
    }

     @Override
    public void onConnected(Bundle bundle) {
        Log.i("wear", "Connection success");
        GetConnectedNodes task = new GetConnectedNodes();
        task.execute(new String[] { "" });
    }

     @Override
    public void onConnectionSuspended(int i) {
        Log.i("wear", "Connection suspended");
    }

     @Override
    public void onConnectionFailed(ConnectionResult connectionResult) {
        Log.i("wear", "Connection failed");
    }

     private void sendMsg(String node){
        String msg = "All your base";

         MessageApi.SendMessageResult result = Wearable.MessageApi.sendMessage(mGoogleApiClient, node, START_ACTIVITY_PATH, msg.getBytes()).await();
        if (!result.getStatus().isSuccess()) {
            Log.e("wear", "ERROR: failed to send Message: " + result.getStatus());
        }else{
            Log.i("wear", "Message sent: " + result.getStatus());
        }

     }

     private class GetConnectedNodes extends AsyncTask<String, Void, Void> {
        protected Void doInBackground(String... params) {
            ArrayList<String> results = new ArrayList<String>();
            NodeApi.GetConnectedNodesResult nodes = Wearable.NodeApi.getConnectedNodes(mGoogleApiClient).await();

             Log.i("wear", "Hello from GetConnectedNodes");
            Log.i("wear", "node count:" + String.valueOf(nodes.getNodes().size()));

             for (Node node : nodes.getNodes()) {
                results.add(node.getId());
                Log.i("wear", node.getId());
            }

             if(results.size() > 0){
                sendMsg(results.get(0));
            }
            return null;
        }
    }
}

And here's the gradle:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.google.android.support:wearable:+'
    compile 'com.google.android.gms:play-services:+'
}