简体   繁体   中英

Reading large .csv file in android

For my android application, I am using an AutoCompleteTextView. I want it so that the user types in a few letters of a city and there will be a popup showing the cities that match those letters. But, in order to do this, I need the list of all the city names. I have a .csv file and a .sql file containing all the data of the cities in the world. However, I do not know how to read such a large file effeciently. The file is approximetely 50 MB. Can someone please help me read or store this file so I can use it in my AutocompleteTextview? Thank you in advance!

You can't create android app greater than 50 mb, or you must use APK extension files .

With raw csv "cities" file with size of 50 mb or more, data base will be too big anyway. For you needs better solution will be access to online data base, store data online and read it from your app. I am sure, you can use some google API for it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM