The way Anonymous users gets difference data from DB in mobile app.

Thank you always your help.

Please give me some advice.


Does there exist the way Anonymous users gets only difference data from DB in mobile app.

I think OfflineDataSync won't work without login. Is this understanding of mine correct?

So If any way exists, I want to know how to set them.


Best Regard.

Hi Yumiko,

Yes, you only need to remove/comment the validation bellow:

After that you can get data from server.


Regards

Hello Paulo.Thanks your responding.

Yes, I thought same as your advice, and I tried that.But I can't get Local Data.

Would you think what is wrong...?

Hello Yumiko.

The default sync actions assume you need to login first because each user will get different data.

Probably your GetData actions are also filtering and without a UserId, there's not much they can get.


Hello Nuno. Thanks your responding.

When I have to need Login, I have set filter in "Getalluserdatas" by UserId.
But now, I changed Server Data Sync and other Server Actions in "OfflineDataSync" like this picture because I don't need Login.And I removed the filter on Aggregate.


I didn't change another settings about OfflineDataSync.

Would you have any ideas to solve this issue?

Thank you.

Yes, if there are no filters it should work.

Can you show the query? It can have some filter by date.

And test to be sure that there is data. 

Hi Yumiko Ueyama,

The OfflineDataSync client action is not getting called (or introduced) within any action flow, could you try to place the OfflineDataSync client action within the OnApplicationReady System Event action flow as shown below.

Note: Within the OnApplicationReady System Event action flow, It is not a good practice to call any Actions that take long time to execute. (Just give it a try.... point here is that you will have to explicitly call the OfflineDataSync or TriggerOfflineDataSync (to invoke OfflineDataSync asynchronously) client action to initiate the Offline Data Sync activities)

Hope this helps you!


Regards,

Benjith Sam

Nuno Reis wrote:

Yes, if there are no filters it should work.

Can you show the query? It can have some filter by date.

And test to be sure that there is data. 

Thanks your help.

I set only one ClientAction showed you before to OfflineDataSync.And there are no filter in Aggregate.

I might be wrong but...there are not enough any settings other Action or Block?


Best Regard.

Benjith Sam wrote:

Hi Yumiko Ueyama,

The OfflineDataSync client action is not getting called (or introduced) within any action flow, could you try to place the OfflineDataSync client action within the OnApplicationReady System Event action flow as shown below.

Note: Within the OnApplicationReady System Event action flow, It is not a good practice to call any Actions that take long time to execute. (Just give it a try.... point here is that you will have to explicitly call the OfflineDataSync or TriggerOfflineDataSync (to invoke OfflineDataSync asynchronously) client action to initiate the Offline Data Sync activities)

Hope this helps you!


Regards,

Benjith Sam

Thanks your help.

I set OfflineDataSync to OnApplicationReady followed your advise.
And I was able to get the sync data from DB to Local!

This result seems OfflineDataSyncAction can't be called not automatically in mobile apps on setting without Login.
Is it right?


Best Regard.

Solution

Hi Yumiko Ueyama,

Yes, I also think the same because, if you observe the application default Login action flow, it also does have the OfflineDataSync client action, called explicitly

I did a small POC regarding this case and what I observed is that even though the SyncOnOnline Configuration parameter is set to True,  you still have to either call TriggerOfflineDataSync (to invoke OfflineDataSync asynchronously) or OfflineDataSync (to invoke OfflineDataSync instantly) client action to initiate the offline data Sync activity.

Check this: DemoApp/SyncData


Hope this helps you!


Regards,

Benjith Sam

Solution

Benjith Sam wrote:

Hi Yumiko Ueyama,

Yes, I also think the same because, if you observe the application default Login action flow, it also does have the OfflineDataSync client action, called explicitly

I did a small POC regarding this case and what I observed is that even though the SyncOnOnline Configuration parameter is set to True,  you still have to either call TriggerOfflineDataSync (to invoke OfflineDataSync asynchronously) or OfflineDataSync (to invoke OfflineDataSync instantly) client action to initiate the offline data Sync activity.

Check this: DemoApp/SyncData


Hope this helps you!


Regards,

Benjith Sam

Hello Benjith.

I was able to figure out clearly thanks for your picture and POC!

It seems I need to look for the way to sync LocalEntity other than OfflineDataSync, or set OfflineDataSync to On ApplicationReady.

Thank you very much.

Yumiko Ueyama wrote:

Hello Benjith.

I was able to figure out clearly thanks for your picture and POC!

It seems I need to look for the way to sync LocalEntity other than OfflineDataSync, or set OfflineDataSync to On ApplicationReady.

Thank you very much.

You're welcome, Yumiko :)

Glad I could be of help!


Regards,

Benjith Sam