Android Development

Rapid android development from Berlin

Browsing Posts published in July, 2009

The obvious way to get the IP-Address of your device simply doesn’t work on Android.

The first thing I tried was using the WifiInfo.

1
2
3
WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
WifiInfo wifiInfo = wifiManager.getConnectionInfo();
int ipAddress = wifiInfo.getIpAddress();

But wait: ipAddress is an integer? Of course not. I also did the math but couldn’t find a way to get the IP out of this integer. So thats not the right way.
continue reading…

Share

You are new to this series? Please start with the first part.

In our last part of this series, I will present a mini “game” based on the very famous game “Rock, Paper, Scissors”.
The follow features are fully implemented:

  • Add a rock, paper or scissors by touching the screen
  • Define speed and direction by touch-drag-release
  • On collision the loser explodes
  • There’s a sound on explosion

continue reading…

Share
Powered by WordPress Web Design by SRS Solutions © 2012 Android Development Design by SRS Solutions