Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Deploy APK with CLEAR DATA to Google Play Store


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: May 3, 2017 5:36 PM Last Post By: Douglas Rudd
Xavi Pallicera

Posts: 2
Registered: 11/18/01
Deploy APK with CLEAR DATA to Google Play Store  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 21, 2016 8:17 AM
Hi,

Embarcadero wiki explains that when place in parameters into RUN menu -cleaninstall all data and cache is deleted from device and makes a clear install. It works perfect. I'va place this code in release and Debug Android options. With my computer and device there aren't any problem. How can I translate this option when I deploy my App. I've deplout a new APK to Google Play Sotore? When people UPDATE my app they continious using old BBDD and my app crash.

Any advice?

Best

Xavi Palliciera
Jan Kučera

Posts: 13
Registered: 10/27/14
Re: Deploy APK with CLEAR DATA to Google Play Store  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 2, 2017 4:18 AM   in response to: Xavi Pallicera in response to: Xavi Pallicera
Xavi Pallicera wrote:
Hi,

Embarcadero wiki explains that when place in parameters into RUN menu -cleaninstall all data and cache is deleted from device and makes a clear install. It works perfect. I'va place this code in release and Debug Android options. With my computer and device there aren't any problem. How can I translate this option when I deploy my App. I've deplout a new APK to Google Play Sotore? When people UPDATE my app they continious using old BBDD and my app crash.

Any advice?

Best

Xavi Palliciera

I think that in principle you can not install a clean app update on google play. User data must be maintained.
I also solved it. It would do it by some code after the application start at the given update.
Douglas Rudd

Posts: 314
Registered: 5/16/97
Re: Deploy APK with CLEAR DATA to Google Play Store  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 3, 2017 5:36 PM   in response to: Xavi Pallicera in response to: Xavi Pallicera
You would have to code it yourself - after update check to see if files are older, if they are, delete them and replace them with new ones.

Initial install or Update will put on new doc2.txt
If it is newer then doc1.txt (or doc1.txt doesnt exist) then delete doc1.txt and rename doc2.txt to doc1.txt.
Delete doc2.txt.
doc1.txt is the data file you will use.

Or change System.StartUpCopy.pas because it skips files that already exist:
  if not FileExists(Dst+SearchRec.Name) then
   begin
          TFile.Copy(Src+SearchRec.Name, Dst+SearchRec.Name, False); // copy without overwriting.
    end
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02