开发者

Which is the best approach to manage data of an Android AR app?

I'm developing and Augmented Reality app for my school where there will be two types of points of interest(POI):

  • The first ones are provided by me, and hence, they will remain always the same. There will be circa 200 of these ones, together with their jpg or png images.

  • Users could add POI's they wish to share with other users. Therefore I cannot know how many POI's can I expect.

I have set up a MySQL DB on a remote server that can keep all the mentioned POI's. Which of these options will be best for managing the data in the android app for the given scenario?

  1. Fetch everything from the remote DB and don't store a开发者_高级运维nything. While in the app, use some data structure other than a DB.
  2. Fetch everything from the remote DB and store it in an SQLite DB while it is used, and remove it when closing the app.
  3. Fetch just the info that is going to be displayed in that moment, although this would imply lots of requests to the remote DB.
  4. Set up a SQLite DB in the app that holds the POI's provided by me(arround 200) and initialize it off-line (with all the data already on a script) the first time you run the app.
  5. Same as 4 but fetching the data from the server the first time.
  6. Same as 4 and 5 but storing just the data, not the image related to each POI.

If some you come up with a better option propose it please! It would be good to make the app as light as possible and avoid as many not needed requests to the remo DB as possible.


Try putting them in little clusters: Think similarly to Zooming in on Google Maps. If your far away it shows a zoomed out picture of everything, but as you zoom in you get more detail. With this method you can perhaps have POI clusters, while the user is looking around. If they stop in one place for a while you can have it begin loading the values in that cluster. Calculating this all on the server by sending the users location and direction as a query.

Consider letting the user save POI that get loaded. This way your not saving everything you have downloaded from the server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜