Showing posts with label android. Show all posts
Showing posts with label android. Show all posts

Monday, July 9, 2012

Taking screenshot on Android devices

  1. First of all you’ll need to download, install and configure Android SDK, along with the USB drivers.
  2. Enable USB Debugging mode. You can do that from Settings -> Applications -> Development.
  3. Connect your Android device to a PC via USB cable.
  4. Go to the “tools” folder in Android SDK and start the batch file titled “ddms” to launch the Dalvik Debug Monitor Service. You should be able to see your device connected on top.
  5. Under the “Device” menu, within the Debugger window, click “Screen Capture” or press Ctrl + S.

Thursday, September 8, 2011

Checkbox/Radio button size on Android Safari

You cannot change checkbox/radio button width/height on Android in Safari because it is tied to the OS.

But since the default ones are so tiny that you may need bigger buttons.
Here is a simple trick:

input[type=checkbox] {
-webkit-transform: scale(2,2);
}

Please note that if you set up values bigger than ~2 then the yellow outline will look weird.

Sunday, May 8, 2011

Sniffing Android Tablets

On Android devices the "Mobile" string in the User Agent indicates that the device would prefer a version of the website optimized for Mobile (small form factor devices).
Tablets don't have this, for example

Mozilla/5.0 (Linux; U; Android 2.2.1; en-us; device Build/FRG83) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Safari/533.1

unlike phones

Mozilla/5.0 (Linux; U; Android 2.2.1; en-us; Nexus One Build/FRG83) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1


This can be used to detect Android tablet devices

is_androidmobile = request.user_agent =~ /android/i && request.user_agent =~ /mobile/i


in context

def is_mobile?
is_iosmobile = request.user_agent =~ /iphone|ipod/i
is_androidmobile = request.user_agent =~ /android/i && request.user_agent =~ /mobile/i

return is_iosmobile || is_androidmobile
end



more on that here,
android-browser-user-agent-issues