Android每次加载大型JSON文件 Java

huangapple 未分类评论50阅读模式
英文:

Android Loading Large JSON file every time Java

问题

我正在尝试使用开放天气API制作一个安卓天气应用程序。

但有一件事让我困扰,那就是如何获取位置列表并允许用户添加新位置。

我从开放天气获得了一个JSON文件,但是这个文件相当大如果我每次用户启动应用时都读取该文件,至少需要5秒钟。

那么,是否有更好的方法来解决这个问题?

英文:

I am trying to make a android weather app with open weather API.

But one thing bugs me is how to get the location list and allow the user to add a new location

I found a json file from open weather, but the file is fairly large. If I read the file every time users start the app, it would take at least 5 seconds.

So, is there a better approach to solve this issue?

huangapple
  • 本文由 发表于 2020年7月26日 02:17:24
  • 转载请务必保留本文链接:https://java.coder-hub.com/63091917.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定