Android/Iphone device data distinction in web-application?

前端 未结 2 1148
无人及你
无人及你 2021-02-11 07:14

So, I am working on the database architecture of a web application which would have its android and iphone apps developed also.

And for that I want to create a column n

2条回答
  •  轮回少年
    2021-02-11 08:13

    You are on right track for Sync process.

    Device UDID (for iPhone) and Android_ID (for Android) is used for Push Notification only.

    You can achieve Sync process without this.

    For that, you need to follow below steps:

    1) When app opens first time in device (iPhone/Android) then pass blank ("") date on server. So it will give you all data.

    2) Store all data in local database for offline use. And also store server date locally.

    3) Now, when user will open app next time, then pass previously stored data on server and it will give only latest added/updated data.

    4) Make necessary changes add/edit in local database.

    5) This way, you will have same data in web and both apps (iPhone & Android).

    6) When user make changes in local data then set it's bit as "TRUE" in local database. So then when next sync perform, then check the SET bit and upload all data to server.

    7) So, all data will be up-to-date at all web, iphone and android.

    Hope you got an idea.

    Happy Coding.

    Cheers!

提交回复
热议问题