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

preview_player
Показать описание
In this video you will learn How to create a simple notification for our app.
We have created Notification channel which support Android Version above OREO also.
So this tutorial will teach you how to create a notification in android studio.
Just follow the steps in the video.
More videos about Android Application Development will uploaded so get in touch with the channel.
So you are no more far.You can be developer.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ACCESS THIS IMPORTANT PLAYLIST
---------------------------------------------------------------------------------------------------------------

If you have any queries or doubt Comment below,I will reply.
And Dont forget to Subscribe for more Stuffs.

------------------------------------------------------------------------------------------------------------------------------------------------------
Like Our Facebook Page for regular Updates:
------------------------------------------------------------------------------------------------------------------------------------------------------
#notification #android Also follow us on instagram :
Рекомендации по теме
Комментарии
Автор

Thanks man,

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

rvs
Автор

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

henryy
Автор

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

valeriagranillo
Автор

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

fatimaiqra
Автор

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

aradhyaambole
Автор

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

Vadim
Автор

Thank you so much. It works like a charm.

vishnuprasad
Автор

short and easy to understand thanks a lot

programming_hut
Автор

Awesome! Thank you so much👍👍👍 Really helped

pavelkrucek
Автор

you well explained it. thank you so much.

gauravkumar-bspf
Автор

Thank you alot, this was really helpful

bonfaceosuka
Автор

solved my issue, great video bro
keep going!

prodiptasenamartya
Автор

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

saltondirlys
Автор

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

thadhasneemnooriya
Автор

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

Tridez
Автор

Thank you soo much dude.It was very helpful

sambotsector
Автор

This is just What I Want Thanks Again: )

manashharshvardhan
Автор

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

xmanohar
visit shbcf.ru