Тёмный

Schedule Local Notifications Android Studio Kotlin Tutorial 

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

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

 

5 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 93   
@seriousinjaehun
@seriousinjaehun Год назад
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.
@SAYKINGSEE
@SAYKINGSEE Год назад
Hi Jaehun, I had the same situation like you, the notification did not come out, but I don't know how to solve it
@ugursener1709
@ugursener1709 2 года назад
I've jus discovere this channel and i loved so so much. Please keep continue to make tutorials. Some of us really need. Loves...
@ugursener1709
@ugursener1709 2 года назад
I will recommend this channel anyone i know interesting in programming.
@CodeWithCal
@CodeWithCal 2 года назад
Thanks for the kinds word. I'm glad you like the channel. I have been uploading less than I have in the past but I am no means done uploading videos.
@NiklasB16
@NiklasB16 2 года назад
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!
@CodeWithCal
@CodeWithCal 2 года назад
Thanks for the feedback. I am trying to scale it back a bit :)
@hacktooth1
@hacktooth1 Год назад
Thanks for the Tutorial Cal. I was planning on using WorkerManager but happened upon your video. Great solution!
@dreadmanhua9552
@dreadmanhua9552 2 года назад
Java version?
@rojaskent
@rojaskent 2 года назад
Excellent tutorial. Question. How can I get the pending notifications generated by the application and delete them?
@riakmawut8354
@riakmawut8354 14 дней назад
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!
@eunicefoo6820
@eunicefoo6820 Год назад
The tutorial is simple and easy to understand. Thank you❤😊
@nabarunchakraborty6419
@nabarunchakraborty6419 Месяц назад
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
@HandsOnKnowledge
@HandsOnKnowledge 2 года назад
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
@CodeWithCal
@CodeWithCal 2 года назад
Glad it was helpful! Thanks for kind words.
@pablitolamas9098
@pablitolamas9098 Год назад
Hi, Thanks for the great Tutorial, do you have any tutorial for repeating alarms? Thanks!
@aparecidoserrano
@aparecidoserrano 3 месяца назад
Excellent tutorial
@윤힘찬-o1k
@윤힘찬-o1k 11 месяцев назад
Thanks for the great lecture If I set it at 1:00 and then 1:05 the alarm will only go off at 1:05. How can I set the alarm to go off multiple times?
@gvshishkin
@gvshishkin 2 года назад
Wow! Good, thats, what I need for my project!
@esatsatan8934
@esatsatan8934 2 года назад
its working even app closed !! you're awesome buddy ,keep on :))
@Glib-gl7vo
@Glib-gl7vo Год назад
Great. So we can use some date / time has been stored in the database and reuse it for alert
@CodeWithCal
@CodeWithCal Год назад
I dont see why not
@beautygallery1680
@beautygallery1680 6 месяцев назад
thank u, this tut is very helful. but i wonder that, by this method how we can set it push daily notification.
@scheiwerbung6669
@scheiwerbung6669 2 года назад
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
@CodeWithCal
@CodeWithCal 2 года назад
02:15 when we enable view binding here. Then we access to activityMainBinding. medium.com/androiddevelopers/use-view-binding-to-replace-findviewbyid-c83942471fc
@scheiwerbung6669
@scheiwerbung6669 2 года назад
@@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 ?
@scheiwerbung6669
@scheiwerbung6669 2 года назад
call requires API level 26 this is the error
@turtlecode
@turtlecode 2 года назад
Very useful tutorial. Thanks 😁
@adasblabla
@adasblabla Год назад
Hi how can I open notifications to make it move me to a new tab?
@ShivamVermaokdone
@ShivamVermaokdone 9 месяцев назад
you are giving an example of peractly managed codes
@chhatrapatikumar
@chhatrapatikumar 9 месяцев назад
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 !!.
@GIULI4994
@GIULI4994 Год назад
hi! thank you for the tutorial. I was wondering, how can the user delete the notification?
@pequenaasa
@pequenaasa Год назад
Excellent tutorial, but when I restart the iphone the notifications are not shown, any solution?
@idocohen1819
@idocohen1819 4 месяца назад
Works for me
@phongngo315
@phongngo315 Год назад
Hello. Thanks for your video, it help me a lot But I want to show head up notification and cancel it. How can I do that? Thanks
@ammadsarwarcheema5307
@ammadsarwarcheema5307 2 года назад
great video thank you for your help and can you tell us how to open activity from these notifications
@ITSADREX
@ITSADREX 5 месяцев назад
For some reason the the notification isn't coming in fir me any help??
@firexrwt594
@firexrwt594 2 года назад
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?
@CodeWithCal
@CodeWithCal 2 года назад
What does Google say about the different versions of Android? Maybe they want us to do it a different way now? I'm not sure..
@firexrwt594
@firexrwt594 2 года назад
@@CodeWithCallooks like it. I'm trying to figure it out now. If I can figure it out, I'll write.
@ammadsarwarcheema5307
@ammadsarwarcheema5307 2 года назад
this code is working when I am using in Main Activity but when I use this in other activity it did not work even there is no error in code
@buraksimsek2471
@buraksimsek2471 2 года назад
Did you solve the problem?
@hacktooth1
@hacktooth1 Год назад
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.
@hacktooth1
@hacktooth1 Год назад
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.
@giogajishvili4448
@giogajishvili4448 2 года назад
This boy is superhero ❣
@Khushi-m8h
@Khushi-m8h Год назад
hey i used your notification logic but i get my notifs late not as per scheduled
@hinazubair1623
@hinazubair1623 Год назад
This is only working for api level 23 and above. What about less than 23?
@firexrwt594
@firexrwt594 2 года назад
Awesome tutorial, but i have one question. Is there any way to do the same thing on Java?
@CodeWithCal
@CodeWithCal 2 года назад
Absolutely, you could do this in Java :)
@firexrwt594
@firexrwt594 2 года назад
@@CodeWithCal yeah, my bad, I forgot, that there is an integrated Kotlin to Java converter in Android Studio :D
@firexrwt594
@firexrwt594 2 года назад
@@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?
@er.prajwalgujar1062
@er.prajwalgujar1062 2 года назад
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
@David-zb8br
@David-zb8br Год назад
Man, is it possible to schedule local notifications with days apart?
@Yunes948
@Yunes948 Год назад
How can i make this code to also show a heads-up notification
@ChannelKepo1
@ChannelKepo1 11 месяцев назад
Hello, Can this notification also send schedules to other people or not?
@taouichaimaa4355
@taouichaimaa4355 2 года назад
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
@CodeWithCal 2 года назад
I think all you would need to change is set a repeating alarm :)
@dawidwitkowski2111
@dawidwitkowski2111 2 года назад
@@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
@imadkhallouk6998 2 года назад
@@dawidwitkowski2111 And what are you recomed to use to do what @Taoui Chaimaa said?
@dawidciubak9493
@dawidciubak9493 2 года назад
@@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)
@imadkhallouk6998
@imadkhallouk6998 2 года назад
@@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 ?
@agustinagallo3215
@agustinagallo3215 2 года назад
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?
@CodeWithCal
@CodeWithCal 2 года назад
Yes it is possible, did you find a solution?
@johancha99
@johancha99 Год назад
@@CodeWithCal Could you show how to do it please?
@minetusiu3419
@minetusiu3419 2 года назад
Do you know why notifications do not work for me when I close the application? And if I set 2 notifications, only the latter shows up :(
@CodeWithCal
@CodeWithCal 2 года назад
Ahh hard to debug without seeing the code, good luck!
@techach3490
@techach3490 2 года назад
wow amazing, but how did you learn all that?
@CodeWithCal
@CodeWithCal 2 года назад
😋
@deepali-e6f
@deepali-e6f 2 года назад
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 ?
@CodeWithCal
@CodeWithCal 2 года назад
I don't know any way of the top of my head. What does Google / Stack overflow say on the matter?
@adamsaleh11
@adamsaleh11 2 года назад
Hi when I try to run my app, it keeps saying the emulator was terminated. I’ve verified all proper sdk tools are setup, not sure what my problem is.
@CodeWithCal
@CodeWithCal 2 года назад
I'm not sure either. Did you figure it out?
@raveenranadewa3175
@raveenranadewa3175 2 года назад
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...
@CodeWithCal
@CodeWithCal Год назад
You can convert it to java its absolutely possible, Im not going to do it specifically for you though.
@jonatas370
@jonatas370 Год назад
Oi, amigo. Não funcionou de um dia para o outro.
@akiferenertugrul8168
@akiferenertugrul8168 2 года назад
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
@CodeWithCal
@CodeWithCal 2 года назад
I think you just want import java.util.Calendar; or import java.util.*;
@doanvu7685
@doanvu7685 Год назад
sorry, how to push notification interval day with time set
@CodeWithCal
@CodeWithCal Год назад
www.pubnub.com/tutorials/push-notifications-android-kotlin/
@doanvu7685
@doanvu7685 Год назад
@@CodeWithCal thanks
@fadlinaufalrahman3232
@fadlinaufalrahman3232 2 года назад
Unresolved reference: ActivityMainBinding , Any solutions ?
@CodeWithCal
@CodeWithCal 2 года назад
02:15 have you enabled view binding and a gradle sync?
@lucywatanabeforreal
@lucywatanabeforreal Год назад
Unresolved reference: submitButton, can you help me with that?
@CodeWithCal
@CodeWithCal Год назад
Sounds like an issue with some dependencies
@nickshv8727
@nickshv8727 Год назад
API level < 21???
@CodeWithCal
@CodeWithCal Год назад
Why would you be making an app in 2023 which such a low API?
@u_nknown4O4
@u_nknown4O4 4 месяца назад
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.
@ogsneakybot1368
@ogsneakybot1368 Год назад
way too fast for anyone to follow.
@CodeWithCal
@CodeWithCal Год назад
:P
@dirkyh8384
@dirkyh8384 5 месяцев назад
Waste of time
@Omer-es7wo
@Omer-es7wo 2 года назад
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
Далее
NOTIFICATIONS - Android Fundamentals
15:39
Просмотров 46 тыс.
Women’s Goalkeepers + Men’s 🤯🧤
00:20
Просмотров 898 тыс.
@ItsMamix учу делать сигму😎
00:12
Просмотров 404 тыс.
Alarm Manager Explained in Android
16:29
Просмотров 1,3 тыс.
No Code App Development is a Trap
9:31
Просмотров 262 тыс.
I Remade YouTube From Scratch Using Just Bash
17:51
Просмотров 22 тыс.
Web API Android Studio Kotlin Tutorial | REST
10:23
Просмотров 20 тыс.
Women’s Goalkeepers + Men’s 🤯🧤
00:20
Просмотров 898 тыс.