[android-developers] Re: android:allowClearUserData=false

2011-08-01 Thread Priyank
Thanks for the reply.
I wanted to do something similar. I wanted to save some information on
the phone, but when the user selects Clear Data, the information
needs to persist. I dont mind the information getting deleted if the
user uninstalls the application.
I tried saving the information in a file in the internal memory (data/
data/com.test/files/FILENAME using openFileOutput(FILENAME,
Context.MODE_PRIVATE)) but still the file gets deleted on pressing
Clear Data. I do not want to save the file in the SD card.
Is there any way I can do that.

Any help would be appreciated.

Thanks,
Priyank

On Jul 26, 1:24 pm, Chris Stratton cs07...@gmail.com wrote:
 On Tuesday, July 26, 2011 1:17:42 PM UTC-4, Priyank wrote:

  I saw a few posts which said that even though we add this line in the
  manifest file, we are not able to disable the Clear Data button for an
  application.
  I tried it in 2.2, 2.3 and 3.0 and was not able to disable that
  button. Am I doing anything wrong or is there any other method to do
  this.

 Apparently that was only ever available for system applications, and is also
 broken in some versions.  This would be consistent with the android design
 goal of not letting 3rd party apps make semi-permanent changes to the
 device.  Even if it did work, removing and re-installing the application
 would get around it.

 See:https://groups.google.com/d/msg/android-developers/sQkfGQ9zVrc/AT98os...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: android:allowClearUserData=false

2011-08-01 Thread Dianne Hackborn
You can't do this, and it is very much a feature that you can't do this.

On Mon, Aug 1, 2011 at 10:41 AM, Priyank priyankvma...@gmail.com wrote:

 Thanks for the reply.
 I wanted to do something similar. I wanted to save some information on
 the phone, but when the user selects Clear Data, the information
 needs to persist. I dont mind the information getting deleted if the
 user uninstalls the application.
 I tried saving the information in a file in the internal memory (data/
 data/com.test/files/FILENAME using openFileOutput(FILENAME,
 Context.MODE_PRIVATE)) but still the file gets deleted on pressing
 Clear Data. I do not want to save the file in the SD card.
 Is there any way I can do that.

 Any help would be appreciated.

 Thanks,
 Priyank

 On Jul 26, 1:24 pm, Chris Stratton cs07...@gmail.com wrote:
  On Tuesday, July 26, 2011 1:17:42 PM UTC-4, Priyank wrote:
 
   I saw a few posts which said that even though we add this line in the
   manifest file, we are not able to disable the Clear Data button for an
   application.
   I tried it in 2.2, 2.3 and 3.0 and was not able to disable that
   button. Am I doing anything wrong or is there any other method to do
   this.
 
  Apparently that was only ever available for system applications, and is
 also
  broken in some versions.  This would be consistent with the android
 design
  goal of not letting 3rd party apps make semi-permanent changes to the
  device.  Even if it did work, removing and re-installing the application
  would get around it.
 
  See:
 https://groups.google.com/d/msg/android-developers/sQkfGQ9zVrc/AT98os...

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: android:allowClearUserData=false

2011-07-26 Thread Chris Stratton
On Tuesday, July 26, 2011 1:17:42 PM UTC-4, Priyank wrote:

 I saw a few posts which said that even though we add this line in the 
 manifest file, we are not able to disable the Clear Data button for an 
 application. 
 I tried it in 2.2, 2.3 and 3.0 and was not able to disable that 
 button. Am I doing anything wrong or is there any other method to do 
 this. 


Apparently that was only ever available for system applications, and is also 
broken in some versions.  This would be consistent with the android design 
goal of not letting 3rd party apps make semi-permanent changes to the 
device.  Even if it did work, removing and re-installing the application 
would get around it.

See: 
https://groups.google.com/d/msg/android-developers/sQkfGQ9zVrc/AT98os1ZjYAJ 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en