Thursday, November 15, 2012

How to Debug Android Devices

If you get the following:
android@Hythloth:~/android-sdk-linux/platform-tools$ ./adb devices
List of devices attached
????????????    no permissions

android@Hythloth:~/android-sdk-linux/platform-tools$

Then you need to define your device in udev. Do the following:
lsusb
android@Hythloth:~/android-sdk-linux/platform-tools$ ./adb devices
List of devices attached
???????????? no permissions

android@Hythloth:~/android-sdk-linux/platform-tools$
you need to add to usb list your device
sudo vim /etc/udev/rules.d/51-android.rules
and put this line (use your own vendor ID)
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
save it, and then
sudo chmod a+r /etc/udev/rules.d/51-android.rules
sudo service udev reload
and it should work now.
But it didn't!
What did work was:
sudo ./adb kill-server
sudo ./adb start-server
As root.

This was taken from the incredibly useful stackoverflow.com post why-is-eclipses-android-device-chooser-not-showing-my-android-device and is probably based on developer.android.com/tools/device.html

Monday, October 29, 2012

Scrollbars are a good thing

Usability in smart phones has taken a huge step back - in the name of efficiency, elegance and stupidity, we got rid of the scroll bar. Unfortunately, that line to the right has three important uses:
  1. It is a dedicated element for scrolling up and down
  2. It gives us a visual cue to where we are in the screen
  3. It tells us there is more content below!
Because smart phones have small screens, designers (programmers) decided to save on space and let you use the space between widgets to scroll. If you missed and hit a control and sent an inappropriate text message to you mother in law, all the better.

Unfortunately, this potentially hides a considerable part of the application from even the most powerful of users. Consider the following screen on the left. It looks complete. A single dialog box with three volume sliders.
But wait, there are two more sliders hidden below!

If someone (for example Samsung) were to mute your notifications during the last software update (Why???), you would be left without notifications of your incoming text messages, appointments, etc.

A complete FAIL.

I originally solved this by writing an app to monitor incoming text messages and beep. Yes! it was easier to program a workaround then to figure this out. Pathetic