Тёмный

SQLite Database Tutorial Android Studio | Note List View App with Persistent Data 

Code With Cal
Подписаться 10 тыс.
Просмотров 43 тыс.
50% 1

How to build a simple note taking app with persistent data using SQLite Database, Java and Android Studio. In this beginner friendly tutorial learn how to create an SQLite open helper java class to save, edit and delete persistent data. An excellent beginner Android App idea to follow along with to further your understanding of how to use list views and SQL Databases.
SQLite Tutorial Source Code:
github.com/codeWithCal/SQLite...
⏱️ TIMESTAMPS ⏱️
00:00 - Intro
00:53 - Note App XML
04:40 - List View Java
07:58 - SQLite Helper
13:36 - Save Data
14:25 - Edit Data
16:39 - Delete Data
#AndroidNoteApp #SQLiteAndroidStudio #AppDevelopment

Опубликовано:

 

1 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 80   
@captainbucket3397
@captainbucket3397 Год назад
Probably one of the best Android tutorials out there, great job!
@brendenbonker7636
@brendenbonker7636 2 года назад
play at 0.75%. Thank me later
@LucasAndrade-lx9sx
@LucasAndrade-lx9sx 2 года назад
I went beyond. Played at 0.50%, because I am beginner.
@monotyc6085
@monotyc6085 2 месяца назад
actually that would be 0.75 or 75% 🤓
@brendenbonker7636
@brendenbonker7636 2 месяца назад
@@monotyc6085 dead right 😅
@loup3176
@loup3176 Год назад
thanks for the good video But no matter how I look at it, I don't know how to link to the basic weekly list data storage. Can you give me some tips?
@ahmedamer2340
@ahmedamer2340 5 месяцев назад
hi Cal, thanks a lot for this amazing tutorial, I assuming i have the same app and i want to implement a button to share a note or some notes the user select to share them to an other device that has the app installed what is the best way to do that ? ... in short I am trying to share parts of the sqlite database how to do that ? waiting for your kind response and thanks in advance
@janettaylor260
@janettaylor260 2 года назад
Hi Cal, great tutorial. Would you be able to advise how to create a dialog of Yes / No before the delete? Also, to add a filter search for the notes. Thanks
@CodeWithCal
@CodeWithCal 2 года назад
Search and Filter tutorial: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-M73Vec1oieM.html&ab_channel=CodeWithCal Yes no alert dialog stackoverflow.com/questions/2478517/how-to-display-a-yes-no-dialog-box-on-android Hope this helps :)
@kingjiealdwinlee9189
@kingjiealdwinlee9189 2 года назад
great tutorial i hope you could make a tutorial where you use firebase to do the same thing as the video
@GoodGuyOlo
@GoodGuyOlo Год назад
Hi, first of all, great tutorial, but I do have some problems. At 7:42 when You start the app, and add notes, in Your case, after adding new notes, they show up after You click SAVE button. In my case, nothing shows up and I cant get it to work. I've tried and tried and probably redone whole project like 20 times and I still cant get my list to show up. Any ideas? Best regards
@mudkip2439
@mudkip2439 5 месяцев назад
Hi, I managed to fix it by using onResume() in MainActivity.java, simply add: @Override protected void onResume() { super.onResume(); setNoteAdapter(); } setNoteAdapter() updates the ListView and that made it work for me
@developerazcom
@developerazcom 2 месяца назад
Hi make sure youre created on activity class the method saveNote. May be it helps.
@PhilosephersStone1
@PhilosephersStone1 Год назад
Hey, I have an issue. I set a custom path for my Database, but when I uninstall and reinstall the app, it says I can't open the database (which has not been deleted). So if anyone has an answer DX
@khrisulmer8533
@khrisulmer8533 4 месяца назад
Thanks for the help broooo!!!
@imtiazzihad3998
@imtiazzihad3998 4 месяца назад
bro u do it?
@sleep-zzz5120
@sleep-zzz5120 2 года назад
How can i add api json data to sqlite database and how update, edit and delete it?
@aanshi8189
@aanshi8189 9 месяцев назад
Hey ! Can you make an application that uses both Android and dbms . A small company app that contains details of employees and company
@chigoziehenryike6208
@chigoziehenryike6208 3 года назад
I love your videos Man keep making more videos, Please make a login and registration video and a simple booking app..
@CodeWithCal
@CodeWithCal 3 года назад
Hey, thanks a lot. Firebase log in / real time DB is on the long term to do list :)
@abdessamedben4090
@abdessamedben4090 Год назад
thanks so much. I have checked Playback speed, it is still Normal
@rodrigoleitefonseca341
@rodrigoleitefonseca341 7 месяцев назад
Good night friend. Do know how can i copy a database SQLITE from the assets directory to a APK? In kotlin.
@juncinthlumanog1140
@juncinthlumanog1140 2 года назад
Thank you, Pal
@CodeWithCal
@CodeWithCal 2 года назад
🎉
@glaubenskraft31
@glaubenskraft31 2 года назад
Hey cal first of all ty for the vid. I'm having a problem with SQLite which is this quote on SQLiteManager.java: try (Cursor result = sqLiteDatabase.rawQuery("Select * from " + TABLE_NAME, null)) Can you help?
@CodeWithCal
@CodeWithCal Год назад
What's the error you are getting?
@glaubenskraft31
@glaubenskraft31 Год назад
@@CodeWithCal It was about my table name, I fixed it but thank you for the answer
@stephensagarinojr.4170
@stephensagarinojr.4170 Год назад
Hi, is it possible to add an image?
@techtrash9138
@techtrash9138 3 года назад
please make more tutorials on android with java
@_juniormastermind_
@_juniormastermind_ 2 года назад
Yes please
@maryannadelman4438
@maryannadelman4438 2 года назад
Would you happen to have a version of this same tutorial for Kotlin?
@CodeWithCal
@CodeWithCal 2 года назад
No I don't, I might do a persistent data tutorial in Kotlin. It's a good idea 💡
@Daily_SketchBook
@Daily_SketchBook 3 года назад
hi cal can u please tell me how I can add an image and get the date and time when the note is taken
@CodeWithCal
@CodeWithCal 3 года назад
Getting current time is as simple as Date today = new Date(); I would then convert to a string using a date formatter, then as long as you use the same date formatter you shouldn't have any trouble converting back to date from string. And give this a try for the image: stackoverflow.com/questions/9357668/how-to-store-image-in-sqlite-database
@gametech2331
@gametech2331 2 года назад
how to add one more option in listview?
@prismalakai
@prismalakai 2 года назад
My Application say this "process system isnt reponding" and "myapp" keeps stopping can someone help me?. ;)
@RoseColoredMew
@RoseColoredMew Год назад
I’m having issues deleting an item.. I select the button and it sends me back to the list view with the items still there. Any advice cal?
@CodeWithCal
@CodeWithCal Год назад
Are you filtering out deleted correctly?
@finvest01
@finvest01 2 года назад
Please help. I have created a database which containing name of a product and quantity of the product , again user enter the same product name but quantity in negative or it could be in positive, now I Want to update the product and it's available quantity by performing the calculation, if user entered quantity in positive than old quantity + this new quantity, same for subtraction. How do I do this please help ,make a video on this.
@CodeWithCal
@CodeWithCal 2 года назад
That's a very specific video request. I think you have the tools from this video to update your rows based on the user input. Good luck 🍀
@leandrocruz6621
@leandrocruz6621 2 года назад
Perfeito
@nipuniherath8639
@nipuniherath8639 2 года назад
Can this method create a Room Database? Or is this different ?
@CodeWithCal
@CodeWithCal 2 года назад
Room is different, but it looks good at mapping to objects with less conversion code The highlighted answer in this post does a great job explaining the difference. stackoverflow.com/questions/50650077/sqlite-database-vs-room-persistence-library
@girldoescode9240
@girldoescode9240 3 года назад
If i'm using fragments what should I use instead of intents?
@CodeWithCal
@CodeWithCal 3 года назад
I would use view pager developer.android.com/training/animation/screen-slide
@MaxDiegardo
@MaxDiegardo Год назад
thanks for the tutorial! in my emulator, the data isnt persistent. i close the app, and opened, the data isnt there.
@MaxDiegardo
@MaxDiegardo Год назад
nevermind! i forgot to add in the addtosql after appending to list
@Tr1xIx
@Tr1xIx 11 месяцев назад
@@MaxDiegardo I have the same problem and can't figure out the solution. Could you give me some pointers?
@_juniormastermind_
@_juniormastermind_ 2 года назад
Please make a tutorial how to make an advanced calculator with all the equations possible without any apis with the help of java in android stuido.Thanks
@CodeWithCal
@CodeWithCal 2 года назад
Have you seen this one? ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-2hSHgungOKI.html It's in Kotlin but you should be able to apply the principles to Java. Kotlin is based on Java the code structure is mostly the same just some slightly different Syntax :)
@_juniormastermind_
@_juniormastermind_ 2 года назад
@@CodeWithCal yes I have watched it,Thanks ,but I need to understand in java also
@roamingcelt
@roamingcelt 2 года назад
Maybe redo. Splitting the tutorial into 2 parts, so as not to be rushed.
@CodeWithCal
@CodeWithCal 2 года назад
Thanks for feedback 😊
@sanxd4840
@sanxd4840 3 года назад
When the app is closed and reopened after that the notes duplicate, is there any solution to that?
@CodeWithCal
@CodeWithCal 3 года назад
Oversight on my behalf, we need to make sure this is method loadFromDBToMemory() is only called once. Try creating global boolean variable firstLoad or something, then if(firstLoad) { loadFromDBToMemory(); firstLoad = false; }
@angelo4324
@angelo4324 2 года назад
I had same problem, finally I was able to fix it. 1st created a new javacclass. (public class FirstLoad { public static boolean firstLoad = true; }) 2nd. Add something to Main activity (public void load(){ if(FirstLoad.firstLoad){ loadFromDBtoMemory(); FirstLoad.firstLoad = false; }) @Code With Call, please tell me if this is correct.
@nemoelkristianalarcio3287
@nemoelkristianalarcio3287 2 года назад
@@CodeWithCal my problem is the data duplicates on the first load after I added it but it fixes when I close and reopen the app What can I do? Thank you in advance.
@rockfuerte
@rockfuerte 2 года назад
I have the same error, and i tried your codes for solve that and didn´t work, another solution?
@janettaylor260
@janettaylor260 2 года назад
@@rockfuerte Hi All, I had the same problem when using the back button the details were duplicated. The following is how I fixed it: private static boolean firstRun = true; private void loadFromDBToMemory() { if(firstRun) { SQLiteManager sqLiteManager = SQLiteManager.instanceOfDatabase(this); sqLiteManager.populateFilmListArray(); sqLiteManager.close(); finish(); } firstRun = false; } // private void loadFromDBToMemory() Hope this helps someone.
@microhandsltd
@microhandsltd 27 дней назад
Great video but you are too fast for me. As a beginner I would like to have time to follow each step. Play at 0.75% don’t know what that means. Is the speed?
@mohiuddeenkhan2355
@mohiuddeenkhan2355 2 года назад
Its great but its very very fast.
@mickelhaj6158
@mickelhaj6158 2 года назад
when 6:50 i click save the note doesnot shows
@imtiazzihad3998
@imtiazzihad3998 4 месяца назад
same here
@blauornuo7060
@blauornuo7060 9 месяцев назад
easy peasy lemon squeezy
@asmitajagadale5197
@asmitajagadale5197 2 года назад
Please can u share source code of this note app?
@CodeWithCal
@CodeWithCal 2 года назад
github.com/codeWithCal/SQLiteTutorial
@asmitajagadale5197
@asmitajagadale5197 2 года назад
@@CodeWithCal Thank you
@jeffreyriggs1911
@jeffreyriggs1911 8 месяцев назад
seems to be a nice tutorial, but way too fast. I cant keep up, got to keep rewinding, etc...
@EricBalcon
@EricBalcon Год назад
Nice but way way too fast for me...
@mustplay8932
@mustplay8932 2 года назад
hey slow down
@CodeWithCal
@CodeWithCal 2 года назад
👌
@notyoubussines145
@notyoubussines145 2 года назад
Sorry Cal... But this is not a tutorial, you just show us how you can do it if you know already all the steps....and then you do it so fast that nobody not already familiar can follow... Obviously just my opinion but it is a honest feedback.
@CodeWithCal
@CodeWithCal Год назад
I am assuming you have some knowledge of programming yes. I think this is a tutorial. It may not be a good tutorial. But It is a tutorial in my opinion 😆
@debrunynha4958
@debrunynha4958 Год назад
If you can't follow the tutorial, slow it down, i watched it on 0.5x, pausing, and got it, it's a great tutorial, but maybe you should learn how to program before watching it and criticizing a person who just wants to help
@monotyc6085
@monotyc6085 2 месяца назад
@@debrunynha4958it would be much easier if it was much slower. And that has nothing to do with the ability to program lil bro.
@monotyc6085
@monotyc6085 2 месяца назад
@@debrunynha4958please do us a favor and be quiet
@mikefrank2643
@mikefrank2643 2 года назад
It was preferable that you had done it in kotlin
@monotyc6085
@monotyc6085 2 месяца назад
please slow down a bit this is inhuman
Далее
RecyclerView | Everything You Need to Know
25:07
Просмотров 125 тыс.
SQLite Database for Android - Full Course
1:28:22
Просмотров 243 тыс.
ГЕНИИ МАРКЕТИНГА 😂
00:35
Просмотров 1,8 млн
КИТАЕЦ ЗА 24 МИЛЛИОНА / РАЗГОН
1:10:06
МАЛОЙ ШАНТАЖИСТ
00:34
Просмотров 78 тыс.
Calendar App Example Android Studio Tutorial
9:32
Просмотров 107 тыс.
Android SQLite Database Tutorial - Build Note Taking App
1:34:28
SQLite Database Tutorial for Android Studio
1:27:08
Просмотров 188 тыс.