Move data between Apps

Hello,

I have 2 apps made with Corona SDK and I want to move user data, stats, high scores from one to anonther. I am building for Android now, but later I plan to go on iOS too.

What are my best and easiest options to do it?

This is the funciton I use to save data:

function saveValue(strFilename, strValue)
    
    local theFile = strFilename
    local theValue = strValue
    local path = system.pathForFile( theFile, system.DocumentsDirectory )
    
    local file = io.open( path, “w+” )
    if file then
     file:write(theValue)
     io.close(file).
     return true
    end
end

Hi @a1331a,

For clarity, you want the end user (customer who downloads both apps) to be able to receive the data from one app and load it into the other? Or vice-versa?

Brent

@ Brent

Yes, from one into the other is enogh for me right now. For example I have lite and a pro version of the app and I want the user`s stats copied into the pro from the lite. I only need a one time transfer of the data between the two.

Hi @a1331a,

Since apps are “sandboxed”, you can’t just directly move data between them. So, you’d have to upload the data somewhere, then from the other app, download it and save the file to some place where the receiving app can read it.

Best regards,

Brent

Ok, thank you!

Can I use google play cloud for that?

Hi @a1331a,

You may actually want to consider the free Coronium service for this. Please see the following page which contains a link to their website.

http://coronalabs.com/resources/3rd-party-tools-and-services/

Best regards,

Brent

Hi @a1331a,

For clarity, you want the end user (customer who downloads both apps) to be able to receive the data from one app and load it into the other? Or vice-versa?

Brent

@ Brent

Yes, from one into the other is enogh for me right now. For example I have lite and a pro version of the app and I want the user`s stats copied into the pro from the lite. I only need a one time transfer of the data between the two.

Hi @a1331a,

Since apps are “sandboxed”, you can’t just directly move data between them. So, you’d have to upload the data somewhere, then from the other app, download it and save the file to some place where the receiving app can read it.

Best regards,

Brent

Ok, thank you!

Can I use google play cloud for that?

Hi @a1331a,

You may actually want to consider the free Coronium service for this. Please see the following page which contains a link to their website.

http://coronalabs.com/resources/3rd-party-tools-and-services/

Best regards,

Brent