Saturday, October 22, 2011

Uninstall Apps from device using Intent.

You can uninstall App from device using following code.

Uri packageURI = Uri.parse("package:com.any.app");
startActivity(new Intent(Intent.ACTION_DELETE, packageURI));



Monday, October 17, 2011

Android Screencast for displaying device screen on computer

Android screen cast can display my Android device (phone or tablet) on a computer screen . It works on my HTC Legend running Android 2.2 .

The screencast will display the device screen on the computer. For rooted ROM, you can also use the computer keyboard and mouse to control the device.It doesn’t handle device screen rotation at all. So phone will display in portrait mode only and tablet in landscape mode only.

Apart from the above, it is a great tool when doing presentation with Android devices. Plug and USB cable and run the software and your audience will be able to see your device screen. No more messy setup of a separate overhead projection unit. And the display quality is way better.

You can Download the Screen Cast from Here.




Wednesday, September 28, 2011

How to get your MD5 Fingerprint for Android using Eclipse Keytool Plugin

If you're looking for easier ways to get your MD5 fingerprint without using the command line or terminal, then might as well follow this tutorial.

Get MD5 Fingureprint for Google Map.



Thursday, September 22, 2011

How To Enable the Android Market in the Google Android Emulator

If you want to enable the android market in android emulator then please follow the below link . There you can find great tutorial about android market on emulator.

Install Android Market on Emulator.

Saturday, September 17, 2011

Check Airplane Mode

Below function checks weather your device is in Airplane Mode or Not
*******************************************************************

public boolean isAirplaneMode(Context context)
{
int settingValue;
try
{
settingValue = Settings.System.getInt(context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON);
return settingValue != 0;
} catch (SettingNotFoundException e)
{
return false;
}
}

Get Ip Address of device

Below function returns the Ip Address of Android Device
*******************************************************

public String getLocalIpAddress() {
try {
for (Enumeration en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) {
NetworkInterface intf = en.nextElement();
for (Enumeration enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) {
InetAddress inetAddress = enumIpAddr.nextElement();
if (!inetAddress.isLoopbackAddress()) {
return inetAddress.getHostAddress().toString();
}
}
}
} catch (SocketException ex) {
Log.e(LOG_TAG, ex.toString());
}
return null;
}

Show all running Service in android

Below Code shows all the running service .

ActivityManager am = (ActivityManager)this.getSystemService(ACTIVITY_SERVICE);
List rs = am.getRunningServices(50);

for (int i=0; i {
ActivityManager.RunningServiceInfo
rsi = rs.get(i);
Log.i("Service", "Process " + rsi.process + " with component " + rsi.service.getClassName());
}