Hi, Cal! Thanks for your tutorial. I'd like to add a few things for beginners like me. From now, android ask POST_NOTIFICATIONS permission, you should add it on your manifest file. Notification didn't work on my emulator, so I tried many things. I added Log right after manager.notify() on Notification class, then I could find it's already working! Just allow notification of your app from settings on your emulator.
Thanks man, excellent job! The code is working perfectly! Just as a feedback, you are talking and coding/clicking really fast. I had to put you on 0.75 speed and sometimes still had to stop the video to see what exactly you were doing. In comparison for other youtubers I often have to speed up the video to 1.25 or 1.5. So maybe for your future videos try to slow down a bit. Otherwise keep up the greate work!
Great video! Could you please make a tutorial on how to add an ai OCR (Optical Character Recognition) feature to an Android app built Kotlin in Android Studio? It would be really helpful for my current project. Thanks!
Great tutorial, but i have a question do you know how to increase the number of notifications that can be sent? In my case only the latest notification that is scheduled always replaces the earlier notifications
What a wonderful tutorial, thank you for posting it and thank you for being fast and u explained everything really well. Short concise and to the point, love it. Liked and subscribed instantly, keep making more and if I could request something maybe make a quick tutorial for a recyclerview with a header. Cheers
Hey your vid is very good. much appreciate it. but can you show us or upload the ActivityMainBinding class please? the class is not on your github and you didn't show it as well in your vid. thank you so much
02:15 when we enable view binding here. Then we access to activityMainBinding. medium.com/androiddevelopers/use-view-binding-to-replace-findviewbyid-c83942471fc
@@CodeWithCal ah alrigh thank you so much. by the way , it seems like NotificationChannel requires android 8.0 to run. is there any alternative solution to use notificationChannel below android 8.0 ?
This is fine in XML, but can anyone help me to create this datetime picker local scheduled notification with jetpack compose? Rarely jetpack compose has tutorials, and finding this topic with compose is impossible as of now !!.
This is not my first comment that I leave, but again I will say that the tutorial is really cool. But i still have one more question: as I understand it, you tested the code on the 8th version of android, but now on the 12th android this code works only in one case: if the application is open in the background, so when you close an application in recent apps, then there are no notifications.(the code is exactly the same as in the video) Is there a way to fix this, maybe using a Service or something like that?
This is about 6 months old but...I am trying to incorporate local notifications into one of my apps. I have the schedule notiification functionality in another class outside of MainActivity also. All works for me except I am not getting the intent extras. I either need to hard code them or they come in as null/empty string. I am not sure what the issue is but I am thinking it may have to do with the context I use from my class. I don't have application Context in my class. If you don't have a solution I can show you how I have it working.
Update...I figured out my issue....my request code in schedule Notification was a different number than the notification Id. once I set these to the same value it all worked.
@@CodeWithCal one more small question: as I understand it, you tested the code on the 8th version of android, but now on the 12th android this code works only in one case: if the application is open in the background. Is there a way to fix this, maybe using a Service or something like that?
if I want to schedule multiple notifications then how we can do it for ex first at 1 pm and second at 1.10 pm then it only shows for 1.10 pm, not for 1 pm
Hi, thank you for this tutorial. Can you maybe explain how we can get the notification to repeatedly popup every Monday and Tuesday every week at 8 am for example?
@@CodeWithCal I'm not sure it would be that easy, 'cause it (as far as I am concerned) would not survive device reboots and also "Android might decide to shut down a process/app at some point, when memory is low and required by other processes that are more immediately serving the user. Application components running in the process that's killed are consequently destroyed. A process is started again for those components when there's again work for them to do. When deciding which processes to kill, the Android system weighs their relative importance to the user. For example, it more readily shuts down a process hosting activities that are no longer visible on screen, compared to a process hosting visible activities. The decision whether to terminate a process, therefore, depends on the state of the components running in that process."
@@imadkhallouk6998 I suppose scheduling a notification for next month or even a year isn't really a good idea, because android (as an OS) can put your task into sleep or even cancel your request (If the OS will require more processing power or memory) which will either delay your notification or it simply won't appear! There is also the issue with rebooting, safe modes etc. Based on my experience: the best way to schedule a long running notification is to schedule it every time the user opens the app (and of course cancel the previous notification request if it still exists)
@@dawidciubak9493 but if a want to make for example a reminder that every two days remember me that i need to watering a plant? how i suppose to do it ?
Hey, thanks for this tutorial, it was very useful. Just one question, is it possible to add an action (eg redirect to a certain app activity) when the user clicks the notification?
Hey can you suggest me how can I cancel the notification before it is live. Actually I am creating task manager in which user can schedule a notification for a task but if the user completes that task before the notification is shown then I need to cancel the it. So is there any way ?
Buddy is there any way that I can convert this into JAVA? It's really hard to do that. I need JAVA code for my project and no video on the internet works. Please help me...
I cant import android.text.format.DateFormat.getLongDateFormat i wrote on import part but it says its unused. val dateFormat = DateFormat.getLongDateFormat(applicationContext) val timeFormat = TimeFormat.getLongDateFormat(applicationContext) this part gives error cuz of it and this part is gives error, when you hover over set text val calendar = Calendar.getInstance() calendar.!!!!!set!!!!!(year, day, hour, minute) i added exclamation marks to show you the part im talking about return calendar.timeInMillis on error it says None of the following functions can be called with the arguments supplied what can i do pls help
Waste of time. If any one find anything about like that which actually work, please let me know. I want to show notification at a selected time,app is closed or open no matter.
shows error public constructor Builder(p0: Context, p1: Notification) defined in androidx.core.app.NotificationCompat.Builder public constructor Builder(p0: Context, p1: String) defined in androidx.core.app.NotificationCompat.Builder