RUVIDEO
Поделитесь видео 🙏

Android Shared Preferences Database

📁 Лайфстайл 👁️ 18 📅 02.12.2023

Android Local Database Shared Preferences, to store light weight data

Hello friends, today we are going to work on Database:

Database: which store the information and we can also access our information.

There are two types on Database used in industries:

Local Database:-
The data which store only in mobile side is local database
live example: Phonebook, SMS book, Gallery

How many types of local database used in Android:

1. SharedPreferences: it's a very light weight database which store the data in key-value pair like HashMap
Live example: Normally we can do the login process in social media application only one time. Facebook login one time etc

2. Sqlite: it is android inbuilt database which store large information and size depend on the mobile internal storage.
Live example: Gallery, Phonebook etc

3. Realm: it is a very new local open source database which is cross platform. We can used in Android and Ios also has high capacity and better performance to store and provide the data.
Realm is 10 time fast compare to sqlite.
Realm is Nosql database, it is object oriented database


Server/Network/Cloud Database:-
The data which store in Server/network side is cloud database
Live example: Gmail mail, Facebook post etc

1. MySql: Server side database

2. Realtime: it comes under the firebase.

So guys I am going to make a playlist to explain these all five database.

We can start with SharedPreferences:-
How to use sharedpreferences in Android Application.
I going to make one LoginActivity and MainActivity
First time when I click on Application icon then LoginActivity will appear and after filling the username and password then I will jump to the MainActivity.

But in the next time, when I click on the application icon then I want to visit direct MainActivity like Facebook login, until i click on logout.

Step: Create New Android Application Name: Databasefun

No of Activity: 2- LoginActivity and MainActivity

In the LoginActivity: take 2 EditText for Username, Password and 1 Button for Login

Here we are working on constraintlayout
Now how to work on this layout just follow my steps:
design complete, now move to LoginActivity Java class

before going further I will explain the sharedpreferences logic

So, we are going to create SharedPreferences class and you will always use this class in your projects.

this code always same for your 1000000 projects

done next time you can see always MainActivity will lauch.
In next video i m going to work on Sqlitedatabase
don't miss that video.
if you like my video please subscribe like share my channel. thank you guys.

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Android Shared Preferences Database», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.