Skip to main content

Posts

Showing posts from August, 2011

How to Uninstall the ANDROID App through Java Code...

We can uninstall an installed application on your  Android device. Steps- 1. Create an intent object with an action ACTION_DELETE. 2. Give the data as the package name.  and , // Code to uninstall the app Intent intent = new Intent(Intent.ACTION_DELETE); intent.setData(Uri.parse("package:com.package.Appname")); startActivity(intent);

Retrive Platform information for android device programatically

There are some useful methods to retrieve the platform related information of the device programmatic ally   Method to get the manufacturer of the device      /**      * Get the Manufacturer of the Device      * @return String      */     public String getManufacurer(){         return android.os.Build.MANUFACTURER;     }    Method to get the device model     /**      *  Get the Model of the Device      * @return String      */     public String getModel(){         return android.os.Build.MODEL;     }   Method  to get the OS build number      /**      * Get the Build Number of the OS      * @return String      */     public String getOSBuildNumber(){         return android.os.Build.DISPLAY;     }      Using Telephony Manager:- TelephonyManager mTelephonyMgr = null; You do not instantiate this class directly; you can retrieve a reference to an instance through mTelephonyMgr = (TelephonyManager) context.getSystemService(Context.