GithubHelp home page GithubHelp logo

minhtuannb287 / savedata Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jimseker/savedata

0.0 0.0 0.0 3.56 MB

Android examples for saving data, sqlite, file system, and Preferences

License: Apache License 2.0

Java 100.00%

savedata's Introduction

Save data Examples

eclipse/ has the example in the eclipse format (no longer updated). otherwise all examples are using Android Studio.

legacy/ these are examples that are no longer updated. May still be useful, since they deal with android 2.3.3

PerferenceDemo uses the preference fragments to save user preference data. Note, there are no support libraries used for fragment or preferences. Also, this is for API 16+, for older versions, see the legacy directory example.

SupportPerferenceDemo uses the androidx.prefernces. It's similar to perferencedemo, using similar preferences and using live updates as well.

saveDataDemo shows an example of using the instance bundle and the shared preference system to store data.

ContentProDemo shows how to create a simple context provider and how to access it Also has an example of accessing the contacts provider.

fileSystemDemo shows how to read/write to local private and public directory. The external has been removed, since it won't work in API 30 (see legacy). A new example will be needed for the sdcard, when I can find documentation that actually works (I looking at you google/android, poor documentation).

sqliteDBDemo an SupportSQLiteDatabase is created and used. The data is displayed via a recyclerview. While the code has insert, update, delete, and query. Only the query and insert methods are called by this example.

sqliteDemo creates a supportSQLitedatabase and content provider

sqliteDemo2 uses the content provider from sqlitedemo, also shows how to use a loader.

sqliteDemo3 uses the content provider from sqlitedemo and recyclerview. Uses a custom cursoradapter for it and a loader as well.

sqliteDemo4 uses the content provider from sqlitedemo and recyclerview. Uses a custom LiveData, plus a modelview to replace the deprecated Loaders.

lvCursorDemo show how to use cursoradapters with listview and explistview.

These are example code for University of Wyoming, Cosc 4730 Mobile Programming course. All examples are for Android.

savedata's People

Contributors

jimseker avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.