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

  Рет қаралды 44,081

Code With Cal

Code With Cal

Күн бұрын

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

Пікірлер: 80
@captainbucket3397
@captainbucket3397 Жыл бұрын
Probably one of the best Android tutorials out there, great job!
@khrisulmer8533
@khrisulmer8533 5 ай бұрын
Thanks for the help broooo!!!
@imtiazzihad3998
@imtiazzihad3998 5 ай бұрын
bro u do it?
@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 :)
@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 3 ай бұрын
actually that would be 0.75 or 75% 🤓
@brendenbonker7636
@brendenbonker7636 3 ай бұрын
@@monotyc6085 dead right 😅
@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 7 ай бұрын
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 3 ай бұрын
Hi make sure youre created on activity class the method saveNote. May be it helps.
@juncinthlumanog1140
@juncinthlumanog1140 2 жыл бұрын
Thank you, Pal
@CodeWithCal
@CodeWithCal 2 жыл бұрын
🎉
@kingjiealdwinlee9189
@kingjiealdwinlee9189 2 жыл бұрын
great tutorial i hope you could make a tutorial where you use firebase to do the same thing as the video
@ahmedamer2340
@ahmedamer2340 7 ай бұрын
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: kzfaq.info/get/bejne/g51jiciUltXNlYE.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 :)
@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?
@abdessamedben4090
@abdessamedben4090 Жыл бұрын
thanks so much. I have checked Playback speed, it is still Normal
@techtrash9138
@techtrash9138 3 жыл бұрын
please make more tutorials on android with java
@_juniormastermind_
@_juniormastermind_ 3 жыл бұрын
Yes please
@sleep-zzz5120
@sleep-zzz5120 2 жыл бұрын
How can i add api json data to sqlite database and how update, edit and delete it?
@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
@leandrocruz6621
@leandrocruz6621 2 жыл бұрын
Perfeito
@aanshi8189
@aanshi8189 10 ай бұрын
Hey ! Can you make an application that uses both Android and dbms . A small company app that contains details of employees and company
@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 💡
@stephensagarinojr.4170
@stephensagarinojr.4170 Жыл бұрын
Hi, is it possible to add an image?
@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?
@rodrigoleitefonseca341
@rodrigoleitefonseca341 8 ай бұрын
Good night friend. Do know how can i copy a database SQLITE from the assets directory to a APK? In kotlin.
@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
@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 2 жыл бұрын
What's the error you are getting?
@glaubenskraft31
@glaubenskraft31 2 жыл бұрын
@@CodeWithCal It was about my table name, I fixed it but thank you for the answer
@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
@prismalakai
@prismalakai 2 жыл бұрын
My Application say this "process system isnt reponding" and "myapp" keeps stopping can someone help me?. ;)
@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 🍀
@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?
@_juniormastermind_
@_juniormastermind_ 3 жыл бұрын
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 3 жыл бұрын
Have you seen this one? kzfaq.info/get/bejne/aM6De8qm082ze30.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_ 3 жыл бұрын
@@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 😊
@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 Жыл бұрын
@@MaxDiegardo I have the same problem and can't figure out the solution. Could you give me some pointers?
@mohiuddeenkhan2355
@mohiuddeenkhan2355 2 жыл бұрын
Its great but its very very fast.
@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.
@mickelhaj6158
@mickelhaj6158 2 жыл бұрын
when 6:50 i click save the note doesnot shows
@imtiazzihad3998
@imtiazzihad3998 5 ай бұрын
same here
@blauornuo7060
@blauornuo7060 10 ай бұрын
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
@microhandsltd
@microhandsltd 2 ай бұрын
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?
@mustplay8932
@mustplay8932 2 жыл бұрын
hey slow down
@CodeWithCal
@CodeWithCal 2 жыл бұрын
👌
@EricBalcon
@EricBalcon Жыл бұрын
Nice but way way too fast for me...
@jeffreyriggs1911
@jeffreyriggs1911 10 ай бұрын
seems to be a nice tutorial, but way too fast. I cant keep up, got to keep rewinding, etc...
@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 2 жыл бұрын
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 3 ай бұрын
@@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 3 ай бұрын
@@debrunynha4958please do us a favor and be quiet
@mikefrank2643
@mikefrank2643 2 жыл бұрын
It was preferable that you had done it in kotlin
@monotyc6085
@monotyc6085 3 ай бұрын
please slow down a bit this is inhuman
SQLite Database for Android - Full Course
1:28:22
freeCodeCamp.org
Рет қаралды 246 М.
RecyclerView | Everything You Need to Know
25:07
Practical Coding
Рет қаралды 130 М.
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 54 МЛН
Calendar App Example Android Studio Tutorial
9:32
Code With Cal
Рет қаралды 109 М.
Android SQLite Database Tutorial - Build Note Taking App
1:34:28
Master Coding
Рет қаралды 15 М.
Weekly Calendar Android Studio Tutorial | Daily Events List
14:10
Code With Cal
Рет қаралды 72 М.
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 54 МЛН