
Originally Posted by
littleguy77
I'll have to check into what it would take to add an uninstall feature
From the code side, something like this should work: (ICS and later, which isn't a problem since this is specifically for the OUYA)
Code:
Uri uri = Uri.parse( "package:paulscode.android.mupen64plusae" );
Intent uninstallIntent = new Intent( Intent.ACTION_UNINSTALL_PACKAGE, uri );
startActivity( uninstallIntent );
Also, for getting a list of installed packages, you can use the PackageManager:
Code:
PackageManager packageManager = getPackageManager();
List<ApplicationInfo> packages = packageManager.getInstalledApplications( PackageManager.GET_META_DATA );
for( ApplicationInfo packageInfo : packages )
{
// Do whatever. For example, package name is in packageInfo.packageName, get launch intent with packageManager.getLaunchIntentForPackage( packageInfo.packageName ), etc.
}
Bookmarks