简体   繁体   中英

How can data be stored in Android device while app is offline?

I have created an Android app (in Java) that ultimately receives/sends data from/to a MySQL database. The app needs to have "offline" capabilities. What would be the best approach to storing the data temporarily in the device to then manually send it to the database when the user has access to the inte.net?

Thanks!

There are multiple ways to store data on an Android device.

  1. The obvious way: in a file
  2. Inside a SharedPreference
  3. Inside a SQLite database

There are a lot of other tutorials for these ways to store data. Just look it up.

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