Giter Club home page Giter Club logo

part3---android-schoolwork-entertainment-app-imitating-wechat's Introduction

广东东软学院安卓实验报告三:“数据存储”

Android schoolwork entertainment app: imitating wechat

Software tips: for learning only. The phone number in the software is not my own number. If you think the software source code is useful, don’t forget to light up star for me

仅供学习交流使用, 软件内电话号码非本人号码。 如果你觉得该软件源码有用,不要忘记帮我点亮star✨

源:广东东软学院安卓实验报告三

软件设计的内容不一定全都是参照实验三的内容

©️ ChuanyangChen 传扬

Source code usage reminder ⏰: Remember to change more!! not too much like my version of the software!

源代码使用提醒⏰:记得改多点,不要太像我这个版本的软件

How can I download the software source code?

我该如何下载软件源码?

Github下载直通车⏬ :https://github.com/Ulrich2003/Part3---Android-schoolwork-entertainment-app-imitating-wechat

image-20211127001234414

1.创建一个工程(本实验在实验二基础上加以改进)

实验二下载直通车⏬:https://blog.csdn.net/weixin_45525653/article/details/121574111?spm=1001.2014.3001.5501

image-20211220202742248

2.在注册Activity中将用户各种信息收录到SQLite中,并且将必要信息存入SharedPreferences中,实现「记住用户注册信息」,在登录页面中实现信息自动填充以便注册完成后快速登录。

image-20211220204314775

SQLite数据的存入

在用户「注册成功」的时候,将注册数据存入SQLite数据库,其中包含用户的账号和密码,是「登录页面」数据比对的重要数据。

image-20211220204949771

image-20211220205311914

SQLite数据的读取

用户在「登录页面」输入完信息点击登录后,系统会从SQLite数据库中查询存在的账号密码,并一一进行比对,如果存在对应的账号及密码,则登录成功,否则提示用户登录失败。

image-20211220205625677

image-20211220204704049

在AndroidStudio中可以看到数据库文件在设备中的位置:

image-20211220205857899

3.通过SharedPreference实现注册后的用户快速登录

image-20211220212829034

SharedPreferences在手机中存放的位置:

image-20211220213155101

关键代码:

image-20211220213244372

4.使用文件存取数据

使用文件方式完成数据的存入

在本实验中,我利用了文件存取来确保App首页的名称是最新登录的用户名名称,当然如果是首次使用,仅会显示一串电话号码

首次使用的效果:

image-20211220210329381

登录新建的账号:

image-20211220210646796

退出App重新进入主页面的样子:

image-20211220210736336

关键代码:

image-20211220210936455

使用文件方式完成数据的读取

image-20211220211048695

关键代码:

image-20211220210957607

在AndroidStudio中可以看到文件在设备中的位置,并文件中的内容:

image-20211220211221045

part3---android-schoolwork-entertainment-app-imitating-wechat's People

Contributors

ulrich2003 avatar

Stargazers

Zihan Zhou avatar

Watchers

 avatar

part3---android-schoolwork-entertainment-app-imitating-wechat's Issues

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.