Re: [PhoneGap] Is there a way to get an uninstall event?

496 views
Skip to first unread message

Simon MacDonald

unread,
Nov 13, 2012, 8:28:49 PM11/13/12
to phonegap
What platform?

Simon Mac Donald
http://hi.im/simonmacdonald


On Tue, Nov 13, 2012 at 7:00 PM, Mark Sanford <markts...@gmail.com> wrote:
My app uses the File API to store downloaded files on the device.   Is there some way for my javascript code to get notified when a user uninstalls the app, so that it can clean up the files it has written?   Or is there some other way to deal with this issue?

Thank you.

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
 
 

Mark Sanford

unread,
Nov 14, 2012, 12:06:10 PM11/14/12
to phon...@googlegroups.com
Android and iOS.

Mark Sanford

unread,
Nov 14, 2012, 12:21:18 PM11/14/12
to phon...@googlegroups.com

I see there is a discussion of how to do this on Android:

If you want to make sure the files are deleted when the application is
uninstalled you would want to store them in:
/data/data/{package name}
/sdcard/Android/data/{package_name}/files/
as those directories is cleaned up when app is uninstalled.


.

I'm not very familiar with iOS, but I'm guessing there is a similar convention, or better yet the app is sandboxed and all files are automatically removed?

Simon MacDonald

unread,
Nov 14, 2012, 12:27:54 PM11/14/12
to phonegap
Great you saved me finding my old post on Android. To the best of my knowledge on iOS the files are in the sandbox so when the app is uninstalled the files are removed as well.

Simon Mac Donald
http://hi.im/simonmacdonald


--

Srinu vass

unread,
May 11, 2015, 1:50:13 PM5/11/15
to phon...@googlegroups.com, markts...@gmail.com


Is there any way to get an uninstall event, because Actual reason I have build my own apk, the user goes to uninstallation , I have to display an alert to the user, so please help me ..

Kerri Shotts

unread,
May 11, 2015, 2:56:44 PM5/11/15
to phon...@googlegroups.com, munn...@gmail.com, markts...@gmail.com
Why do you have to display an alert to the user?

Your app should /never/ interfere in its own removal.
Reply all
Reply to author
Forward
0 new messages