How to create Notification in Android | Android Studio | Beginners Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ธ.ค. 2024

ความคิดเห็น • 125

  • @aradhyaambole92
    @aradhyaambole92 2 ปีที่แล้ว +9

    0:00
    but what is going on guys welcome back
    0:02
    to the another Android application
    0:03
    tutorial in Android studio in this video
    0:06
    we are going to learn how to create a
    0:07
    simple notification so let's start I
    0:10
    have new Android studio project where
    0:12
    there is only a text hello world so I
    0:15
    will remove this hello world and create
    0:16
    a button over it I will give the name of
    0:23
    the button get notified I will match the
    0:30
    parent of the width and I will give the
    0:33
    ID notify button so I will go to the
    0:41
    main activity and create a reference of
    0:44
    that button and I will give the
    0:56
    reference notify button so on click up
    1:01
    this notify button we will create a
    1:03
    simple notification that's it notify
    1:05
    button that set onclicklistener
    1:06
    new onclicklistener so this method will
    1:10
    be called after the button is clicked we
    1:13
    will write the nutrition code here so
    1:19
    let's write the code first we have to
    1:21
    build the notification with the
    1:23
    notification compat dot builder
    1:25
    notification compat dot builder give the
    1:32
    name builder equal to new noticing
    1:35
    compare dot builder we have to pass over
    1:38
    here the context dot this and the
    1:45
    channel ID channel ID you can give
    1:47
    anything you want I am giving right now
    1:49
    my notification this is the channel ID
    1:53
    for now my notification and with the
    1:58
    help of this builder we have to build
    2:00
    the notification as we want let's say I
    2:03
    am setting the title set content title
    2:08
    notation title anything you want
    2:11
    my title you can also say it content
    2:18
    text the body so here you have to enter
    2:24
    the message you want to show to the user
    2:27
    hello from easy to tow this is a simple
    2:33
    notification and you have to set the
    2:39
    small icon for the notification I am
    2:43
    just passing now the drawable we already
    2:49
    have you can create any new drawable and
    2:52
    pass that as a small icon so I will also
    2:56
    set Auto cancel to true so that we can
    2:59
    swipe the notification so with the help
    3:04
    of this code we have created the Builder
    3:06
    and we have with the help of
    3:09
    notification manager compact manager
    3:14
    compact we will notify the user dot from
    3:21
    where does the context and this manager
    3:27
    will notify the user in the app so
    3:34
    manager compared to notify will notify
    3:36
    the user with the help of ID now you can
    3:39
    give anything I will give one or two
    3:41
    anything you can give and notification
    3:44
    that is builder dot build this builder
    3:49
    will give us notification and ID you can
    3:52
    pass any unique ID so this is the code
    3:55
    the nutation will be some if you are
    3:58
    running a rendered application on
    4:00
    version less than or you your code is
    4:03
    enough but if you want to run an or you
    4:06
    or greater than curio version you have
    4:09
    to create a notification channel so to
    4:11
    create notification channel go to on
    4:13
    create method over here just check if
    4:19
    build version is
    4:24
    greater than equal to version codes dot
    4:30
    or you that is o if it is greater than
    4:33
    equal to or Y we will create a new
    4:34
    tricks and channel otherwise we will not
    4:36
    create notation channel dip the name
    4:42
    channel so we have to pass the
    4:47
    parameters that is first one is ID I
    4:50
    will give my notification the channel ID
    4:53
    the same we have passed over here and
    4:56
    the channel name i will give the channel
    4:59
    name also my notification you can give
    5:03
    anything and the importance that the
    5:08
    importance of notification I will give
    5:09
    the default one that's it we have
    5:15
    created a night-vision channel and we
    5:17
    have to take the manager from system
    5:21
    service get system service nutrition
    5:28
    manager that class so we got the manager
    5:32
    and this manager will create
    5:34
    notification channel so create
    5:36
    motivation a method will create that
    5:37
    channel that's it we have created the
    5:40
    channel for only those Android phone or
    5:44
    devices which are greater than equal to
    5:47
    or you otherwise this code is enough so
    5:50
    we have also created the new tricks in
    5:52
    channel and created the notification so
    5:54
    it will run on any devices you want so
    5:57
    let's just run the application and check
    5:59
    whether it is working or not I will run
    6:03
    this on my phone
    6:10
    it will take some time to install my
    6:12
    application so my application I can see
    6:16
    my notification test and get notify
    6:18
    button
    6:18
    so there are notification over here I
    6:21
    will click on get notify and boom there
    6:25
    is a notification that is hello from
    6:28
    easy to tour this is a simple
    6:30
    notification so in this way we can
    6:34
    create our notification I hope you
    6:38
    learned something in from this video so
    6:41
    don't forget to click the subscribe
    6:42
    button and click the like button also if
    6:44
    you have any queries and doubts please
    6:47
    comment below I will reply see you in
    6:49
    the next video bye bye

  • @henryy1047
    @henryy1047 ปีที่แล้ว

    If I could like it a hundread time, I WOULD DO IT. Bruh, you saved me. Greetings from Brazil!

  • @fatimaiqra2169
    @fatimaiqra2169 2 ปีที่แล้ว

    i really need such tutorial👏👏👏....this is time saving video....thanks a lot.👍

  • @adarshshukla2055
    @adarshshukla2055 3 ปีที่แล้ว +1

    Bhai jindgi m kuch bhi jarurat ho yaad krna tumne isse ek jindgi bachha li tqq mere bhai ♥️

    • @gagansoni2946
      @gagansoni2946 3 ปีที่แล้ว

      bhai 2 hour se notification ke liye gradle file , activity , pending intent sb padh liye sala kuc nhi hua
      ab jakar bhai ka video se dekh kr smjha aur banaya
      kaam kr gya
      nhi to aaj raat bhar jagna pdta
      thank you bhai
      koi dikkat ho
      kisi ko thokna ho to jaroor yaad krna bhai
      tmhra bhai jb tk jinda h tb tk tmhre liye khada h
      Jai hind

    • @EasyTuto1
      @EasyTuto1  3 ปีที่แล้ว +1

      Arey bhai bhai bhai

    • @EasyTuto1
      @EasyTuto1  3 ปีที่แล้ว +1

      Jaroorr

  • @Tridez99
    @Tridez99 2 ปีที่แล้ว

    I was wondering why notifications in my project do not work at newer Android versions. Thank you so much for tutorial ❤

    • @EasyTuto1
      @EasyTuto1  ปีที่แล้ว

      You're welcome!

  • @thadhasneemnooriya
    @thadhasneemnooriya ปีที่แล้ว

    Fantastic! worked for me!....subscribed!

  • @rvs99
    @rvs99 3 ปีที่แล้ว +2

    Thanks man,
    I didn't provided same Channel ID to notification channel and notification itself, so was facing issues while notifying.
    Resolved it! :)

  • @prodiptasenamartya7027
    @prodiptasenamartya7027 3 ปีที่แล้ว

    solved my issue, great video bro
    keep going!

    • @EasyTuto1
      @EasyTuto1  3 ปีที่แล้ว

      Glad to hear that

  • @valeriagranillo8338
    @valeriagranillo8338 2 ปีที่แล้ว

    Thank youuu I wasn't able to get it to work, simple and easy to understand nicely done!

  • @V1337adim
    @V1337adim 2 ปีที่แล้ว

    This code is working, though I wrote it in Kotlin, but it works. Thanks.

  • @saltondirlys7926
    @saltondirlys7926 3 ปีที่แล้ว +5

    The best among the best in the best of tutorial ever!!!! Thank you !

    • @EasyTuto1
      @EasyTuto1  3 ปีที่แล้ว +1

      Gald you liked it.

  • @arshadaafaqd8636
    @arshadaafaqd8636 ปีที่แล้ว +1

    How to remember this for exam??

  • @jooryalhamed938
    @jooryalhamed938 2 ปีที่แล้ว

    It has worked perfectly! Thanks

  • @danielmwinzi9223
    @danielmwinzi9223 3 ปีที่แล้ว

    THIS IS THE BEST TUTORIAL EVERRRRRRR!!!!!

  • @joelherrerasalazar1378
    @joelherrerasalazar1378 3 ปีที่แล้ว

    THANKS MAN YOU ARE THE BEST

  • @charithanjana9147
    @charithanjana9147 3 ปีที่แล้ว +3

    Thank man, it was really helpful 🖤🔥

  • @QuangTùngNguyễn-y8w
    @QuangTùngNguyễn-y8w 8 หลายเดือนก่อน

    thanks , I really need such tutorial

    • @EasyTuto1
      @EasyTuto1  8 หลายเดือนก่อน

      You are welcome!

  • @ROHIT-ub7lt
    @ROHIT-ub7lt ปีที่แล้ว +1

    how to add any sound to notifications

  • @WorldOfCreativityMovieshub
    @WorldOfCreativityMovieshub ปีที่แล้ว

    There you go brother, Thank You 🔥

  • @Anxity.Z
    @Anxity.Z 3 ปีที่แล้ว

    Nice ASMR Voice ❤❤❤❤.

  • @abhirams7217
    @abhirams7217 3 ปีที่แล้ว +6

    I have typed according to wat u said but notification is not displaying

    • @erinwolf1563
      @erinwolf1563 3 ปีที่แล้ว

      same :)... notification is not displaying

    • @bhoomikask8767
      @bhoomikask8767 ปีที่แล้ว

      Please enable notification for that app in the settings, then notification will display

  • @sambotsector101
    @sambotsector101 3 ปีที่แล้ว

    Thank you soo much dude.It was very helpful

    • @EasyTuto1
      @EasyTuto1  3 ปีที่แล้ว

      Glad you liked it.

  • @bonfaceosuka
    @bonfaceosuka 2 ปีที่แล้ว

    Thank you alot , this was really helpful

  • @vishnuprasad8352
    @vishnuprasad8352 2 ปีที่แล้ว

    Thank you so much. It works like a charm.

  • @dareoanisa8584
    @dareoanisa8584 2 ปีที่แล้ว +1

    Explanation is simple and easily understandable, nice job 🫣

  • @alokeshnath4269
    @alokeshnath4269 2 ปีที่แล้ว

    You are great!!

  • @usmansoftwareengineer
    @usmansoftwareengineer 3 ปีที่แล้ว +1

    Bro I install oreo sdk version but notitication not show not any error . I click multiple times on notification button but notificatin not display

  • @shafinamfk9794
    @shafinamfk9794 2 ปีที่แล้ว +1

    Hi, it would be great if u can show how to schedule the notification. thank you!

    • @letsdwit
      @letsdwit 2 ปีที่แล้ว

      agreed

  • @drummmpaul
    @drummmpaul 3 ปีที่แล้ว

    Awesome! Thank you so much👍👍👍 Really helped

    • @EasyTuto1
      @EasyTuto1  3 ปีที่แล้ว +1

      Glad to hear it!

  • @xmanohar
    @xmanohar 3 ปีที่แล้ว

    Nice explanation👌. Can I implement this in my news app to get notifications of updated news?🧐

  • @gauravkumar-bs3pf
    @gauravkumar-bs3pf 3 ปีที่แล้ว +2

    you well explained it. thank you so much.

    • @EasyTuto1
      @EasyTuto1  3 ปีที่แล้ว

      Glad it was helpful!

  • @JjOng-ef9kf
    @JjOng-ef9kf 3 ปีที่แล้ว

    Thanks!! It workss

  • @danidan-d6q
    @danidan-d6q 3 ปีที่แล้ว

    it's work. thx you so much sir

  • @saber1981mm
    @saber1981mm 2 ปีที่แล้ว

    thanks alot dear

  • @programming_hut
    @programming_hut 3 ปีที่แล้ว

    short and easy to understand thanks a lot

  • @TheKarebekas
    @TheKarebekas 3 ปีที่แล้ว

    Does it work into an IntentService instead of an Activity?

  • @АртемБатьков-м6ю
    @АртемБатьков-м6ю 2 ปีที่แล้ว

    Hello. I don't have a notification at all. I'm doing as you but there's nothing. Please give me advice.

  • @adnag7117
    @adnag7117 2 ปีที่แล้ว

    Nice thank you

  • @nathanielnathan2012
    @nathanielnathan2012 3 ปีที่แล้ว

    Just what ive lookin for, nice job bro !

    • @EasyTuto1
      @EasyTuto1  3 ปีที่แล้ว

      Glad to hear it!

  • @juliusmoyi5485
    @juliusmoyi5485 8 หลายเดือนก่อน

    can you kindly create a notification based on the time set duration

  • @DUNIACARA
    @DUNIACARA 3 ปีที่แล้ว

    Thank you so much. Really helpful

    • @EasyTuto1
      @EasyTuto1  3 ปีที่แล้ว

      Glad to hear that!

  • @nick8292
    @nick8292 2 ปีที่แล้ว

    Thanks a lot. Nice and clear.

  • @prajalsharma7201
    @prajalsharma7201 4 ปีที่แล้ว

    Thanks .was looking for this

  • @rationibusstudio4679
    @rationibusstudio4679 3 ปีที่แล้ว

    I have a website and we post daily. I have made an app of the website but it doesn’t have the notification function. How do we show notification for new posts in my app?

  • @suvrodevhowlader1100
    @suvrodevhowlader1100 2 ปีที่แล้ว

    Thanks bro

  • @rishabhgupta655
    @rishabhgupta655 3 ปีที่แล้ว

    thank you very much 🙏🙏🙏

  • @nurkhatijahht9690
    @nurkhatijahht9690 2 ปีที่แล้ว

    Hello brother. can i request from you to do a sample to create a notification pop that uses timer. for example 10second timer then notification appear on top. tq

  • @manashharshvardhan5007
    @manashharshvardhan5007 3 ปีที่แล้ว

    This is just What I Want Thanks Again: )

  • @henriquer8453
    @henriquer8453 3 ปีที่แล้ว

    excellent!!!

  • @AniketKumar-hy5zo
    @AniketKumar-hy5zo 3 ปีที่แล้ว +1

    Thanks Bro you saved my day

  • @tanishasinha6337
    @tanishasinha6337 2 ปีที่แล้ว

    i am getting error as "failed to push notification on channel" wheather i"m creating the channel or not it is giving me same error.
    plzz help me

  • @guttembergalves3996
    @guttembergalves3996 2 ปีที่แล้ว +1

    Great video. Can you make the project source available for download?

  • @khushalpakisan3451
    @khushalpakisan3451 ปีที่แล้ว

    So this is not push notifcation, how to implement that?

  • @emandgarlbustillo3694
    @emandgarlbustillo3694 3 ปีที่แล้ว

    What if i want it to appear at specific date?

  • @mohitsaini6642
    @mohitsaini6642 3 ปีที่แล้ว

    Copy paste same code not working ?

  • @Divix67
    @Divix67 3 ปีที่แล้ว

    Thank you so much ! :)

  • @IskParlar97
    @IskParlar97 2 ปีที่แล้ว

    Thanks

  • @OpGamerz-qz4yz
    @OpGamerz-qz4yz 4 ปีที่แล้ว

    hey BRO! I HAVE WATCHED 3 VIDEOS and lets see if your video work and if your video worked! then i will subscribe you

  • @abdullahalfuad3141
    @abdullahalfuad3141 ปีที่แล้ว

    notification click open activity how to set up?

  • @gethmirupasinghe2826
    @gethmirupasinghe2826 3 ปีที่แล้ว

    Thank you..

  • @reshmadevikijai5630
    @reshmadevikijai5630 2 ปีที่แล้ว

    Change color of text and of background in notification

  • @sritikamanjrekar
    @sritikamanjrekar 4 ปีที่แล้ว

    working thank you

    • @EasyTuto1
      @EasyTuto1  3 ปีที่แล้ว

      You are welcome

  • @sk-saidulalam9698
    @sk-saidulalam9698 2 ปีที่แล้ว

    how to add new line in content text

  • @khonsamutmainnah3557
    @khonsamutmainnah3557 2 ปีที่แล้ว

    how to schedule the notification?

  • @BlackJames_
    @BlackJames_ 3 ปีที่แล้ว

    How to add onClick event on the notification ?

  • @valivetiswamynagasainivas6167
    @valivetiswamynagasainivas6167 3 ปีที่แล้ว

    Bro I am getting error like “developer warning see logs “

  • @marciopaulo1708
    @marciopaulo1708 3 ปีที่แล้ว

    What is the code to close the notification?

  • @rohanpattanayak2303
    @rohanpattanayak2303 3 ปีที่แล้ว

    Thankyou !!

  • @navjotsingh2457
    @navjotsingh2457 2 ปีที่แล้ว

    ty

  • @alansoftware
    @alansoftware 3 ปีที่แล้ว +1

    👍👍😀

  • @artiasawa2115
    @artiasawa2115 3 ปีที่แล้ว +1

    Notification is not Display

  • @rahul5573
    @rahul5573 2 ปีที่แล้ว +1

    ERROR: E/libc: Access denied finding property "ro.vendor.pref_scale_resolution"
    whenever i open the app in my phone. the app get closed within one se.
    plz help me

  • @yuukich00
    @yuukich00 4 ปีที่แล้ว +2

    いいね ありがとう ~

    • @tesla-pi9qk
      @tesla-pi9qk 4 ปีที่แล้ว

      ゆきさん これはあなたのために働いた ?

    • @yuukich00
      @yuukich00 4 ปีที่แล้ว +1

      @@tesla-pi9qk はい、それは本当に助けてくれました

    • @tesla-pi9qk
      @tesla-pi9qk 4 ปีที่แล้ว

      @@yuukich00 返事をありがとう。 私は小さな間違いを犯していました。 それを修正した後、うまくいきました。

  • @LionOfAbraham
    @LionOfAbraham 4 ปีที่แล้ว

    Bro i have subscribe your channel but make video on game development

  • @corubel
    @corubel 3 ปีที่แล้ว

    Thank youuuuuuuuu!!!!!!!11111

  • @Globalwalkin
    @Globalwalkin ปีที่แล้ว

    🙏🙏

  • @amilyabutan9420
    @amilyabutan9420 2 ปีที่แล้ว

    Can someone help me about this?

  • @38.s.ashwini43
    @38.s.ashwini43 3 ปีที่แล้ว

    I am not getting the output even I type the same code

    • @abhirams7217
      @abhirams7217 3 ปีที่แล้ว +2

      Even for me too.

    • @erinwolf1563
      @erinwolf1563 3 ปีที่แล้ว +1

      have u figured it out?

    • @38.s.ashwini43
      @38.s.ashwini43 3 ปีที่แล้ว

      Yes

    • @erinwolf1563
      @erinwolf1563 3 ปีที่แล้ว

      @@38.s.ashwini43 Great 🎉, can you share the solution

    • @38.s.ashwini43
      @38.s.ashwini43 3 ปีที่แล้ว

      @@erinwolf1563 yes. I will make a video on that and inform you soon

  • @chaduvukomacha
    @chaduvukomacha 2 ปีที่แล้ว

    CAN you please provide code

  • @aarifcakmak
    @aarifcakmak 3 ปีที่แล้ว

    Pls not working code :(

  • @videopapka1106
    @videopapka1106 3 ปีที่แล้ว

    fucking best tutorial! thank you so much! it works!

  • @maazmachkal3909
    @maazmachkal3909 3 ปีที่แล้ว

    Not working spam alert.

  • @anubhabchaudhury2913
    @anubhabchaudhury2913 3 ปีที่แล้ว

    ok

  • @hcfarelino399
    @hcfarelino399 2 ปีที่แล้ว

    GABISA WOI APAAN NI

  • @theaayushadhana
    @theaayushadhana 2 ปีที่แล้ว

    thoda bolna sikh le

  • @spencerwatts3569
    @spencerwatts3569 8 หลายเดือนก่อน

    USELESS

    • @EasyTuto1
      @EasyTuto1  7 หลายเดือนก่อน

      Okay

  • @MiguelRomero-wc5nb
    @MiguelRomero-wc5nb 3 ปีที่แล้ว

    Thank you!

  • @Stories33
    @Stories33 3 ปีที่แล้ว

    Thank you !!