Skip to main content

Posts

Showing posts with the label apk

install / uninstall APKs programmatically (PackageManager vs Intents)

My application installs other applications, and it needs to keep track of what applications it has installed. Of course, this could be achieved by simply keeping a list of installed applications. But this should not be necessary! It should be the responsibility of the PackageManager to maintain the installedBy(a, b) relationship. In fact, according to the API it is: public abstract String getInstallerPackageName (String packageName) - Retrieve the package name of the application that installed a package. This identifies which market the package came from. The current approach Install APK using Intent Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(apkUri, "application/vnd.android.package-archive"); startActivity(intent); Uninstall APK using Intent: Intent intent = new Intent(Intent.ACTION_DELETE, Uri.fromParts("package", getPackageManager().getPackageArchiveInfo(apkUri.getPath(), 0).packageName,null)); startActivity(intent); This i

Who can I create a Share Android App to send to my clients or colleagues? Like iOS AdHoc

I'm over an Android App for a client, eventually I want to show him some demo, but he doesn't have the IDE, so I'm thinking to send him an APK ... In iOS it's pretty easy through AdHoc and the Mobile ID... I just want to send him an APK for him to install in his phone... (Not Android Market YET) How can I do this on Android? Thanks!

Who can I create a Share Android App to send to my clients or colleagues? Like iOS AdHoc

I'm over an Android App for a client, eventually I want to show him some demo, but he doesn't have the IDE, so I'm thinking to send him an APK ... In iOS it's pretty easy through AdHoc and the Mobile ID... I just want to send him an APK for him to install in his phone... (Not Android Market YET) How can I do this on Android? Thanks!

Android Packaging: Error generating final archive resources.ap_

I'm currently trying to build a PhoneGap project I've been working on in Eclipse. However, when I try to build and run the project on the Android Emulator, I get the following error... Error generating final archive: Failed to add /Users/me/Projects/MyApp/bin/resources.ap_ Unknown Android Packaging Problem I've cleaned the project several times, removed the resources.ap_ file, as well as the contents of the gen directory. Anything else I can try? Much appreciated. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="my.app.android" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" /> <supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:res