简体   繁体   English

我应该在Android应用程序上使用哪种数据存储方式?

[英]What kind of data storage should i use on my android app?

I am making an android app that calculates somne routes between different places in a town and returns to the user several ways to get there (by some buses, walking etc). 我正在制作一个Android应用程序,该程序可计算城镇中不同地点之间的深层路线,并向用户返回几种到达那里的方式(通过公交,步行等方式)。 For that, i need to store some coordinates, places names, buses so that this data can be accessed and used in the program, but cannot be modify or seen by the user. 为此,我需要存储一些坐标,地名,公共汽车,以便可以在程序中访问和使用此数据,但用户无法对其进行修改或查看。 And i want somenthing that is easy to manipulate, because i'm new on this. 我想要一些易于操作的东西,因为我对此很陌生。 What kind of storage should i use? 我应该使用哪种存储方式?

There are 4 Storages options 1.SQLite 2.External Storage 3.Internal Storage 4.Shared Preferences 有4个存储选项1.SQLite 2.外部存储3.内部存储4.共享首选项

Storage Options 储存选项

the link will show you examples and storage options supported by Android.. my Suggestion is Shared Pref its the most easy one. 该链接将向您显示Android支持的示例和存储选项。我的建议是Shared Pref,这是最简单的建议。

just remember when the user clear Cache all of the Storage Options will be deleted. 只需记住,当用户清除“缓存”时,所有“存储选项”将被删除。

You can get the route between any two places in XML or JSON format(recommended). 您可以采用XML或JSON格式(推荐)获取任意两个地方之间的路线。

From JSON Object you can get 'legs' array which containts information about waypoints between two places. 从JSON Object中,您可以获取“ legs”数组,其中包含有关两个地方之间的航路点的信息。

Details for Different traveling modes can also be fetched by specifying 'mode' attribute. 也可以通过指定“ mode”属性来获取不同行驶模式的详细信息。

you can use sharedpreference's to save the above details and can be used later 您可以使用sharedpreference保存上面的详细信息,以后可以使用

For more details see this documentation 有关更多详细信息,请参阅此文档

Here is a good tutorial which may be useful for you 是一个很好的教程,可能对您有用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我应该为我的android应用使用哪种图像 - What kind of images should i use for my android app 我应该使用什么数据存储来存储我的应用程序中的歌词? - What data storage should I use for storing lyrics in my app? 我应该在Android应用程序中使用哪种简单的数据存储区? - What kind of simple datastore should I use in my android application? 我应该使用外部存储空间来存储我的应用独有的数据吗 - Should I use external storage for data exclusive to my app? 我应该在Android中使用哪种类型的数据存储? - What type of data storage should I use in Android? 我应该在Android应用程序中使用哪种图像格式? - What kind of image formats should I use in an Android application? 我应该在Android中使用哪种适配器用于JSON? - What kind of Adapter should I use for JSON in Android? 我的Android Chromecast应用程序游戏应使用哪个ControlCategory? - What ControlCategory should I use for my android Chromecast app game? 我应该使用什么在我的android应用上显示流式URL? - What should i use to display a streaming url on my android app? 我应该使用哪种服务在后台访问传感器数据? - What kind of services should I use for accessing sensors data in background?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM