Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts
Wednesday, 15 January 2014

Handy adb commands for Android

Android

Here are some of the commands I find useful for Android's adb. They can be used manually or to automate your build or testing process.

View connected device(s)

Use this to view all connected devices and list their IDs.

adb devices

If multiple devices are attached, use adb -s DEVICE_ID to target a specific device.

Thursday, 31 January 2013

Let me pinch-to-zoom your responsive site

When I was doing my latest redesign of the blog, I came to the point where I needed to implement the viewport meta tag so the design would scale correctly on different devices. After a little research I discovered several tutorials that said to use this:

<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1,user-scalable=no" />

I had a think about the user-scalable attribute, which so many tutorials seem to include. What it does is disables pinch-to-zoom on mobile devices, and I couldn't come up with a reason for RWD tutorials to include it. Really there is no reason why we should be disabling pinch-to-zoom on a responsive site, unless zooming would break the app itself. The ability to zoom in on images, text, links, etc. is really handy and I use it all the time. Disabling it introduces potential usability/accessibility issue, so please in the future if you can, omit the user-scalable=no value.

<!-- much better -->
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1" />
Sunday, 27 January 2013

Korean Vocab Widget

I released my first app on Google Play yesterday!

As some of you may know, I'm learning Korean in my spare time. Being a software developer I'm always thinking about how I use computers to increase my productivity, and that's exactly what happened. I was looking at my phone and thought about how many times a day do I look at this thing. What if I was also doing something productive when I checked to see if I have any emails or what the time is?

So it hit me, a lock screen widget to supplement my Korean vocabulary study. I went searching for something fitting my needs on the Play Store and found very little, so I decided to make one!



It's a customisable widget that shows Korean words and English translations. There are only just over 100 words right now, but that number should increase pretty soon. Especially considering it's built for me! It's up for free (and ad-free) on Google Play.


Wednesday, 28 November 2012

Enabling USB debugging on your Nexus 10 under Windows

I just received my new Nexus 10 and am loving it. As usual when it comes to setting up Android development, I had a few issues. It was really never the smoothest process in my experience, at least it's nice and smooth for the most part when it's all up and running. Not many relevant results came through so here's how I got it up and running under Windows 8.
  1. Install the USB drivers using the Android SDK Manager


  2. Open Device Manager and update the drivers for the device under "Other Devices" as described here.
Now go have some fun optimising your apps for XHPDI!
Saturday, 28 April 2012

Touch != Click

I started programming for Android a few months ago, starting a few apps while playing around with the API, re-familiarising myself with Java and getting a feel for mobile development. Having spent the majority of my programming time during the last couple of years using WinForms, ASP.NET and other Microsoft technologies, I've really enjoyed breaking out and trying something new.

When moving from using a mouse and keyboard for all input to using your finger and a soft-keyboard for the first time, there are a few things that you need to learn until you can take full advantage of the OS.

No more hover

There is no hover for touchscreens, unless of course these become the norm. You can simulate hover in a mobile browser by long pressing but of course it isn't the same.

Less control

Unfortunately, your fat fingers are not as accurate as that small cursor. Your buttons will generally have to be a bit larger when developing for touch. The Android design guidelines recommend making your buttons at least 48dp (density-independent pixel) which translates to approximately 9mm, in order to offset any inaccuracy. I find that I very rarely miss touching a button if it is 48dp or larger.

You must also be mindful of the touch areas of your widgets. This is where memorising the difference between padding and margin is useful, padding with make the widget larger whereas margin will just put space around the widget.