[Q] removing app content from SD on uninstall - Android Software Development

So I've been searching and searching ... but haven't found anything regarding this.
I've got a considerable amount of content on the SD card ... let's call these "shared pictures" ... storing these on the device memory is a real douchy move because it'll take up a lot of space that the user would want for their apps.
This data is currently stored on the SDCard, but here's the problem: What do I do with this data when the app gets uninstalled?
None of it is protected and it doesn't really matter if it's left on the SD, but why leave clutter behind?
I've been searching for either:
- an uninstall hook: Andy tells me when my app is being uninstalled and I delete my junk
- I register my folder with Andy and when Andy is uninstalling my app, it also deletes the folder.
Is there a standard way to accomplish this on Android?
Thanks.

I am not sure if I understand what you are trying to do. I assume the following:
You have an installed application with it's data in your phone.
You uninstall the app.
Then you are reinstall it and you want your data back.
If this is the situation then you can see this and with little further research you will accomplish it!

Edit: I was incorrect, it depends on the SDK/API level and where you store the data.
See SimonVT's link below

removed

I assume you are NOT refering to the App2SD feature. I haven't found anything that deletes the cached files off the SD card when an app is uninstalled (or even prompts you to for that matter).
But, I know what you mean. I had tried a couple podcast apps and they left HUGE files on my SD without asking me if I wanted to remove them.
I found out because they kept popping up in my Gallery app.
Sent from my EVO using XDApremium. (Support XDA)

removed

To clear things up, I'm writing an app and am mainly wondering if there's a way to know when my app is being uninstalled so I can clean up my app's files.
Sent from my LG-P999 using XDA App

Related

Storage Memory is Critically Low Popup Message

I am receiving the current message on my hd2 and would like to know how i can repair the problem as it keeps popping up on the screen all the time
'Storage memory is critically low. If the storage memory is not increased, other programs may not be able to start. Use File Explorer to delete files that are no longer needed or move some files to a storage card'
Any advice please?
Simple advice- you've got too much installed or saved to internal memory rather than the storage card.
Common culprits are browser caches for PIE and Opera, the HTC Album cache, media files like videos, music and pictures etc.
Use File Explorer to look in all the sub folders of My Documents as a starting point. Try moving all the big files over the the storage card.
Download Treeview from Microsoft Marketplace- it's free and can show you where all the storage memory is going.
should i do this through the phone direct or the pc?
khush10 said:
should i do this through the phone direct or the pc?
Click to expand...
Click to collapse
You can do either- as long as you connect using ActiveSync rather than Disk Drive mode.
Using the PC is probably a slightly easier experience as Windows Explorer is more informative than the mobile version!
NeilM said:
Download Treeview from Microsoft Marketplace- it's free and can show you where all the storage memory is going.
Click to expand...
Click to collapse
no such app
i cannot get marketplace to work, it says that theres no data connection detected, but its on and my wi-fi is on too?
So i keep on retrying but still no joy!
...Read the post
http://forum.xda-developers.com/showthread.php?t=600578
...I use a program for clean memory: SKTOOLS and it works ok
...there are other programs like cleanram...but i haven´t experience with them
...good luck
to be honest, i did not think i will have to go through all this, i thought that the phone would have been more simple to use rather than the link suggested, install this and edit that, i would have thought that the phone would already be setup correctly, instead my phone has become another job itself!
khush10 said:
to be honest, i did not think i will have to go through all this, i thought that the phone would have been more simple to use rather than the link suggested, install this and edit that, i would have thought that the phone would already be setup correctly, instead my phone has become another job itself!
Click to expand...
Click to collapse
Welcome to the world of Windows Mobile
khush10 said:
to be honest, i did not think i will have to go through all this, i thought that the phone would have been more simple to use rather than the link suggested, install this and edit that, i would have thought that the phone would already be setup correctly, instead my phone has become another job itself!
Click to expand...
Click to collapse
You don't have to do all that. It works great out of the box as well. Those are just possibilities, to customize it and tweak it.
Uninstall everything you have installed on your phone and reinstall it to the storage card. Always install applications to the storage card. That should fix your 'problem'.
Additionally, open the File Explorer, go to \Windows and delete the folder YouTube. That gives you additional free space but the folder comes back when you watch YouTube videos, so you can do this from time to time.
can i drag and drop my applications folder into the storage card via the pc?
Yes, but then the links in the start menu won't work anymore. Think of what happens when you move the Program Files folder on your PC. It's the same here.
can someone give me a step by step guide for doing this task please.
Go to Settings, Manage Applications, Uninstall Applications. There, uninstall all the applications you have installed to teh main memory.
Then reinstall them, this time to the storage card.
And delete the YouTube cache from time to time.
When we're speaking of free storage memory, how much memory do you all have free?
Mine is around 20 mb, is it to small?
Beacuse when i watched a video on youtube i got the same message as in the first post.
freyberry said:
Go to Settings, Manage Applications, Uninstall Applications. There, uninstall all the applications you have installed to teh main memory.
Then reinstall them, this time to the storage card.
And delete the YouTube cache from time to time.
Click to expand...
Click to collapse
All i have in the remove programs section is 'MarketPlace' and no other applications?
khush10 said:
All i have in the remove programs section is 'MarketPlace' and no other applications?
Click to expand...
Click to collapse
As I suggested in the earlier post, this is nothing to do with installed programs- most of those are pretty small and are unlikely to be grabbing the majority of your memory.
It is most likely that you have allowed some large files to be stored in the main memory. By default the phone DOES store most big user files like photos and videos on a storage card, but perhaps that has been altered somewhere?
You need to use a file finding utility to sort this- if Treesize is not available in your locality via Marketplace (or you can't access Marketplace) then you can try Spacefinder, a tiny, free program that will sort your files and folders in order of size, giving a hint as to where the memory may have gone. You can also download Treesize Mobile direct from Jam Software
Stuff like CleanRAM, SKTools etc is OK for clearing RAM but has no effect on Storage Memory apart from clearing some caches, though this can help a lot.
One other tip- as has been suggested, try and install programs onto a storage card, but not if they are system programs like Today plug-ins or keyboards etc. These must go into device memory otherwise you may get some startup errors.
This baffles me. I have just got an HD2 to replace my HD - I started to put exactly the same programs onto the HD2 as I had previously installed on my HD (I install all programs on the device). I got the low memory warning long before I put all the programmes on - on a brand new device with no internet browsing/video/music on device itself.
My HD has more memory than my HD2 - how is that possible?
None of these explanations seem to explain how this happens on my HD2 but not my old HD. I have NEVER had a low memory warning on my HD despite having used it for over a year and having installed more on it than I have managed on the HD2.
I have recently found the pre-installed Google Maps created a cache folder in device memory and pumped it up to 25 Megs. Deleted it of course.
blackrat62 said:
This baffles me. I have just got an HD2 to replace my HD - I started to put exactly the same programs onto the HD2 as I had previously installed on my HD (I install all programs on the device). I got the low memory warning long before I put all the programmes on - on a brand new device with no internet browsing/video/music on device itself.
My HD has more memory than my HD2 - how is that possible?
None of these explanations seem to explain how this happens on my HD2 but not my old HD. I have NEVER had a low memory warning on my HD despite having used it for over a year and having installed more on it than I have managed on the HD2.
Click to expand...
Click to collapse
The HD2 has more memory (ROM) but a huge chunk (150MB) is taken up by all the HTC Sense gubbins, leaving a relatively smaller amount free to the user. Ultra light cooked ROMs give about 150MB more ROM, and light ROMs about 100MB more than the default ROM.
It also seems that a lot of caching is going on- Album, Googlemaps, Browsers etc eating up ROM.

Uninstalling apps - anything left behind?

Hi,
I am about to buy my first Android device (HTC Desire), and being a programmer I will of course want to write apps for it.
In the beginning I will naturally test a lot of apps created by others, and I will probably uninstall a lot of them for various reasons (lack of space being one of them).
Now to the question: Will uninstalling an app remove it cleanly and leave no traces behind? I'm not thinking about files possibly generated by the application and stored on the memory card (since that will be manually deletable), but things like settings and possibly files created in inaccessible locations on the device itself.
There is a SQLITE database in the Android system that apps (content providers) can store stuff in. This database obviously takes up space, and the question is if misbehaving applications could store stuff there that would remain after uninstall, effectively leaving garbage behind.
I realize that a hard reset would work to clean everything, but that is a drastic measure.
Assuming no root access, what is the answer to these questions? Please bear with me if these questions are dumb or too basic...
Regards
-Øyvind
To my understanding, apps are spread throughout 4 locations in filesystem.
/data/app - folder for storing apk's
/data/app-private - folder for storing protected apk's
/data/data/{appname} - app storage, settings, db's and so on
/data/dalvik-cache - folder for storing dalvik cache file for an app
From my experience, uninstalling removes all traces of an app from these locations in addition to market link from Market app db. Also with rooted phones manual uninstalling of an app is possible by removing associated content from those 4 locations. Link can also be removed, but that requires a little bit of knowledge of SQL.
If there's something to add to all of this, or if something is wrong, please someone correct me.

Doing a clean uninstal of apps

Galaxy S is my first Android device, so please excuse my noob-question:
I just try alot of apps and most of them will be uninstalled by me a few days later. Does Android do a "clean" uninstall, or are there still bits and pieces in something like a registry (yes I am a windows-user ;-)). Or does that depend on the uninstall-method which is provided by the individual app-developer?
Due to the fact that there is no "General Android" - Forum I will post my question in this forum which at least corrsesponds to my current device.
Thanks for your insight.
quicky
This is funny because I also wonder everytime I delete if there are registry pieces missing lool. but I'm sure that doesn't matter.. There are however SOMETIMES folders IN the SD card or the external Drive of a phone (like the 8gb/16gb partition of the Galaxy).
All android phones are like that, sometimes they leave a folder with settings or sometimes empty folders, and sometimes no folders at all.
I think it's just to keep cache or settings.. you can simply delete those when you enter your sd card.
In Android, every app has his own "sandbox". This is like a exclusive folder for the app, where it stores everything and other apps can't access.
When you remove an app from the phone, android removes this "folder" so there is nothing left behind.
There is just one exception to this: the SD card. Some programs will store some information (for example heavy games store maps, voices,...) to a folder in the SD card. So when uninstalling just look if your SD card contains some folder with the app name and safely remove it too (unless you plan reinstalling the app later!).

[Q] 4.2 multiuser+app data in sdcard (i.e.Games)

So far my understanding is that if user 1 downloads/installs an app, and then user 2 goes "hmm you know what I want that app too" - it doesn't re download it just gives user 2 access to the already installed app. Which is cool, cuz apps are in /data/app.
But some apps, mostly games and so on, download extra data onto the sdcard. Now currently I assume none of them work cuz they look for the non existing /sdcard instead of /mnt/sdcard/0 or something; my question is how is this SUPPOSED to work? If user 1 download GTA3, downloads the data onto his folder in sdcard, then user 2 does the same thing, will i have to redownload all that data and thus use up twice the space? do they have another system for data saved in sdcard and multiuser?
TjPhysicist said:
So far my understanding is that if user 1 downloads/installs an app, and then user 2 goes "hmm you know what I want that app too" - it doesn't re download it just gives user 2 access to the already installed app. Which is cool, cuz apps are in /data/app.
But some apps, mostly games and so on, download extra data onto the sdcard. Now currently I assume none of them work cuz they look for the non existing /sdcard instead of /mnt/sdcard/0 or something; my question is how is this SUPPOSED to work? If user 1 download GTA3, downloads the data onto his folder in sdcard, then user 2 does the same thing, will i have to redownload all that data and thus use up twice the space? do they have another system for data saved in sdcard and multiuser?
Click to expand...
Click to collapse
Found this and the answer looks promising
http://blogs.computerworld.com/android/21327/android-42-multiuser-support
"With apps, the system is intelligent: If one user goes into the Play Store and installs an app that another user has already downloaded onto the tablet, Android will "install" the app for the user -- basically making it available to her -- but won't actually redownload it. And that user's app-specific data and settings will remain separate from other users' information; when a new user opens the app, it's as if the app is being opened for the first time. I tested this with a handful of apps, including third-party programs like Facebook, and it worked flawlessly."
I haven't tried it myself but its something I wanted to understand too.
TimmyUK said:
Found this and the answer looks promising
http://blogs.computerworld.com/android/21327/android-42-multiuser-support
"With apps, the system is intelligent: If one user goes into the Play Store and installs an app that another user has already downloaded onto the tablet, Android will "install" the app for the user -- basically making it available to her -- but won't actually redownload it. And that user's app-specific data and settings will remain separate from other users' information; when a new user opens the app, it's as if the app is being opened for the first time. I tested this with a handful of apps, including third-party programs like Facebook, and it worked flawlessly."
I haven't tried it myself but its something I wanted to understand too.
Click to expand...
Click to collapse
The thing is unlike stuff like "facebook details" or smthg, game data is NOT private or user specific. duplicating serves no purpose. The only way to change i spose is to get all extra game data etc to go into /data/<whatever> instead of in an sdcard folder. .

Enabling moce apps to sd help

Hello xda forums, I want to ask you about moving apps2sd card. By a little research I have found out that moving apps to sd card is a thing. Now I want to do it but I wont seem to be able to get the option "move app to external drive/usb device" or whatever option. I just want to know how to enable it.. A way of not requiring any computers just doing all by my phone would be great..
Also, if you are going to say "oh, why are you moving your apps to sd card" or anything similar like that, please just dont.. say that to google, not me, I don't care, I have lots of big apps and my storage is full...
Thanks...
Sent from my GT-I9500 using xda app-developers app
1) Open Play Store.
2) Search for Folder Mount.
3) Install app.
4) Upgrade to pro.
5) Use it to move large app data to your external SD and create a symlink in the original location.
I realize that you're actually asking about the native apps to sd ”feature,” but I don't think you quite understand what it actually is and is not. It does move apps to your SD, and that is it- only the .apk is moved. The data, which is why those apps and games are so big, remains on your internal. As such, it does not save you any appreciable space. To do that, you're going to have to use a third party app.
Sent from my Nexus 7 using Tapatalk 4
Folder mount didn't really help. What I got to do is to move the whole app, the apk of the app, that can be done using system right? I feel like I should be able to enable it somehow.. Any ideas?
(What I need to do is to move the apk that can be reached via Root Browser, theee are many apks with the size between 30-100 mbs, eventually taking up too much space)
Sent from my GT-I9500 using xda app-developers app

Categories

Resources