Android :: Programmatically Uninstall A Package In Droid?
May 21, 2009Can a package uninstall itself? Can a package uninstall another package if they share the same userId and signature?

Can a package uninstall itself? Can a package uninstall another package if they share the same userId and signature?
We can delete package by following steps below: Uri uri = Uri.fromParts("package", strPackageName, null);
Intent it = new Intent(Intent.ACTION_DELETE, uri);
startActivity(it);
But in that way, Applications Manager's UI will display, my question is how to delete packages silently (without Applications Manager's UI showing).
i work on custom Application Manager and try to get the disk usage of installed package. So PackageManager.getpackageSizeInfo was removed from SDK on 0.9->1.0 update android.content.pm. PackageStats(String pkgName)(cacheSize, codeSize, dataSize) returns always "0" Size of phys. file (java.io.File) in "/data/app" seems wrong/not completely. Has anybody any solution to get the total disc space used by an installed package?
View 4 Replies View RelatedI'm attempting to override an Android View class to tweak the functionality just slightly. But I need to modify a field that does not have a setter method. I've placed the subclass in a package called android.widget. Why can't I access any of the package-private member fields? I notice that the compiler says they "cannot be resolved," rather than not being accessible. Does this have something to do with how Android.jar is built?
View 2 Replies View RelatedI have some resources in my app that are going to be loaded optionally for different brands. I don't want to set up entirely different projects each time we re-brand the app so I want to know if the resources that are not used will be always packaged in and if there is a way to avoid this.
View 1 Replies View RelatedI have developed my java library package & I want to use this package from other Android applications such as Gallery and Music. so I've put this package under framework/base/core/java/com/<package name> also made entry of AIDL files in Android.mk file located at framework/ base folder , but java files in above locations are not getting compiled. But if i put my package under framework/base/core/java/android folder then my package is build successfully. But I do not want to change the name of my package so I'm putting my package under com folder. Pls suggest a way to solve above problem.
View 2 Replies View RelatedI see a few "uninstall apps" on the market and I am wondering why there are such applications. Uninstalling an app from the phone is not that complicated and it is quite fast. Maybe my question is silly but I am very new to Android. I know that Windows for example does not uninstall programs properly, and one needs often a third party program to really make a clean uninstall. Is that the same with Android, or do these apps just make it faster to uninstall an app (with the same result that one will get with a "uninstall" process through the apps manager)?
View 3 Replies View RelatedI have an Android project created in eclipse.I want to modify the package name and application of the project.How to do that in eclipse?
View 3 Replies View RelatedI'm wondering if it is possible to uninstall a couple applications that came pre-installed on my Droid.
Apps such as Footprints and MOffice are just a waste of space and could do w/o.
Code...
Doing something like this, but can't get notification.Reference said :
public static final String ACTION_PACKAGE_REMOVED
Since: API Level 1
Broadcast Action: An existing application package has been removed from the device. The data contains the name of the package. The package that is being installed does not receive this Intent
A need this intent to set uninstall password. Any suggestions?
I am trying to uninstall Facebook for Android. I have tried several ways in doing this and each time is says uninstall not successful. How do I uninstall it? Should I delete it using Titanium Backup? If I do this, can I re-install it through the market place at a later date if I wanted to?
View 1 Replies View RelatedHow to backup app programmatically on android?
View 1 Replies View RelatedI'm looking for a way to calculate the size of an installed Android application/package. I can't find this information in neither ApplicationInfo nor PackageInfo objects. From the ApplicationInfo I can get the path for the data and the app itself. Data is a directory structure, but when attempting to read it recursivly I get a nullpointer. Is there any better way of doing it? Any sample code?
View 1 Replies View RelatedI'm creating a mobile website that will include a page from which people can download relevant apps that we recommend. I've found instructions for creating the links to launch the Market but this assumes that you are the developer of the app in question and know the exact package name.
Is there any way to get the package name, other than just contacting the developers and asking?
Also, it turns out that those instructions don't really work for creating web hyperlinks. They only give you a URI to reference in a string of Java code in another Android app. Our site is in Drupal, so Java is not going to work.
For the iPhone, I found easy instructions for getting the URL/link style I need from the iTunes store, so I'm looking for info like that.
I don't find package com.android.providers.googleapps on my internal memory. I use cupcake emulator.
View 7 Replies View RelatedDoes anyone know how to programmatically send a MMS via the Android SDK? Any version of the SDK will do, just need to know where to get started. I know how to send / receive SMS, I now need to add a picture to the message before sending.
View 8 Replies View RelatedIs there any way to run terminal commands on my application and then access the data on my UI? Specifically top.
View 4 Replies View RelatedHow to get the screen density programmatically in android?
I mean How to find the screen dpi of the current device?
Is there a way to programmatically set a proxy server in my Android App?
I'm writing an Android App that uses some WebViews. Is there a way to set a proxy server for all network connections in my app, i.e. all content that is shown in the WebViews should be routed through the proxy?
All other Apps on the device should not be affected by this proxy settings.
I'm developing a little program which syncs some of the users data from my app on the cloud (just a load of strings, but that's not the point).
To help identify each device uniquely I would like to use the IMEI (or ESN number for CDMA devices) ...so here is the question, does anyone know how to access this programmatically?
How can i get the current android sdk version (1.5, 1.6, 2.0, etc.) programmatically
View 2 Replies View RelatedI need programming help to answer the calls in android.
View 2 Replies View RelatedI'm looking for the Java equivalent to the XML assignment for assignments such as 'android:id="@android:id/tabcontent"'.
View 1 Replies View RelatedI'm trying to write an app that has to manipulate my inbox and my sent messages without sending or receiving a message.
This tutorial shows me how i can send messages, but i want my phone to think that i sent one, without actually sending one.
I've searched in the Android References and i think i need to use:
SMS Manager
SMS Message
How can i do this?
I am working on a remote automated test framework for Android based on JUnit (tests run outside android, interacting with code inside it). It's all working fairly well, but one issue I have is that when I automatically start a fresh emulator, the screen starts out locked. This appears to affect my tests being able to run, plus, I want to watch the tests run (buttons clicked, text typed, etc.). If I manually start an emulator and unlock its screen, all works well.
Is there a way to programmatically unlock the screen in Android? A Java API, a command line or shell command, etc. would all be fine. Barring that, perhaps there is a way to start an emulator unlocked?
If you have a handle to a Spinner object in an Android activity, can you programmatically pop open the spinner options - thereby forcing the user to choose an option even though they did not click on the spinner themselves?
View 1 Replies View RelatedI want to generate Key Keypresses programmatically in android. i had gone through sample codes but they are using ServiceManager and IWindowManager which are removed from present SDK.
can any one suggest me how to do it or post sample code..
I'm trying to programmatically scroll a WebView to the location of a particular element in the DOM tree. But so far I haven't been able to get the WebView to respond to scroll requests. I've tried calling JavaScript that uses window.scrollTo(...), but the WebView doesn't respond. On the Java side, I've tried calling the WebView.flingScroll(...) method. WebView will respond to flingScroll, but what I need is a scrollTo(...) capability. Any ideas?
View 3 Replies View RelatedI want to reboot targeted phone by SMS. Is it possible? How can we implement this?
View 4 Replies View RelatedI want to set MaxLenght of TextView Through programming i cannot see Set function related to MaxLenght can any one guide me how to achieve this?
i don't want hard code in layout.