cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronize device with the Unwired Server

0 Kudos

Hi experts,

I'm developing an offline native application in Android, but i have one question about this scenario.

When i'm working on-line I make the follow

     1.-  SUP101DB.createdatabase()

     2.-  SUP101DB.synchronize()

So, when i'm working with the local database, previously i get the values from the EIS for example:

        EIS                                                local database

    Customer                                             Customer

Michael   Devlin                                    Michael  Devlin

Now, i'll change the data from the device: "Devlin" for "Devlin2". But simultaneously i changed in the EIS

"Michael" to "MichaelNew".

Finally, i'm trying to do the follow SUP101DB.beginSynchronize(sgs, "", uploadOnly)

How ever, it didn't refresh the data in the EIS.

PS: If i omit the step of : change in the EIS "Michael" to "MichaelNew", it works fine.

I don't if someone could explain to me what's happening or provide me some document.

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

midhun_vp
Active Contributor
0 Kudos

Hi Hugo,

You asked a very good question.

Here is the answer:

Once the device synchronize for the first time it will store the value "Michael   Devlin" in the device DB.

Then once you change the value from " Michael   Devlin" for " Michael   Devlin2" in the DB and try to sync what the SUP will do it that it will check whether the old value in your device "Michael   Devlin" is same as the value in the EIS.

If the values are mismatching it won't update the new value from the device " Michael   Devlin2".

In your case since the value in EIS you are changing and you are trying to sync from the device there will a mismatch between the old data in the device and the value in EIS. Hence it is not updating the value from device.

In more detail:

Lets say same app is there in two devices both the users are trying to change the same data in the in EIS. The person who changed the value in first will take the effect  and the 2nd user has to get the updated value to his device which is updated the first user if he want to change the value.

I think it would helps you.

Regards

Midhun



0 Kudos

Thanks Midhun VP,

It help me a lot to understand that.

Now my question is this, is there a way to control that scenario.

Regards

Answers (0)