Saturday, September 15, 2012

Socket Programming with Android

This weekend I tried my hand on socket programming with Android. I got it challenging, because emulator has its own settings for forwarding the packet. So it is so important to know how emulator forwards packet to any target IP address.

Ex.
If we send packet to 127.0.0.1, a simple thought that will come to mind is packet will be sent to developer host machine, but actually packet is targeted to android device.

I got good help by following page. Please read this before start socket programming on android emulator.
http://developer.android.com/tools/devices/emulator.html#connecting

:) B-)

Enabling PC's Key Board on Android Emulator

Today I faced one problem with android emulator, my pc keyboard is not working with the android emulator. The reason behind this was the update of upgrading the sdk.

This can be fixed by following steps :
  1. Eclipse > Window menu > AVD Manager
  2. Select your virtual device and click Edit
  3. Under Hardware, Click New
  4. Select Keyboard Support then click OK
  5. Edit its value to yes
And start your emulator with enabled PC's keyboard.

:) B-)

Reference: