Hire everyone in this theater all we're gonna go ahead and create another Android application.
So just click on this.
Start in your Android studio project here and then for the name of your application just step in here
app 54 and then click on next and here choose AP A16 Android 4.1 Jelly Bean for a minimum SDK and then
click on next and here choose empty activity here and then click on next and here click on finish.
So now as you can see here our project is actually created.
So it's actually double and it's a race folder here.
And then double double click on the layout for there and then return this activity underline minute
example.
So here first of all we want to actually design the user interface of our application.
So just select is hellova over the text view here and then press on delete key on your keyboard.
So first of all we need to actually write a linearly or two vertical into this relatively out here.
So just put this linearly out vertical at the center of this relatively here.
And then let's actually drag our textfield.
Let's actually select is a plain text here inside this text fields a folder just select it and put it
at the center of this linearly at vertical.
OK.
So WDTN this eddy takes here.
And for the ID just type in here it is the content.
It is the content title and and press on entelechy on your keyboard.
And then let's actually find the hint attribute that is actually related to this text field inside this
property section here as you can see this is the hint attribute.
OK.
So for the hand just type in here please enter the title of notification.
OK.
And that person entelechy on your keyboard.
So as you can see here this is the heat of this stakes field.
So let's actually and other textfield into this linearly at vertical.
So inside this it takes field folder.
Just select the plain text here and put it at the center of this linearly alphabetical double click
on it.
And for the ID just type in here EDT a content editing content text and in person Enter key on your
keyboard and let's actually assign a value to the hint of this edit takes.
So for the hand to step in here please enter the text of please enter the text of notification
and then person entelechy on your keyboard.
So let's actually select this one here.
This first textfield and for the Heyns just put this capital-T let me actually change this t to capital-T
title and then press on interview on your keyboard.
So now it's actually the right button here into this linearly aesthetical.
So as you can see here I have this button inside widgets folder.
Just select it and put it at the center of this linearly vertical and double click on it.
And for the text it's just typing here.
Notify notify me.
And for the ideas they've been here between notify and then present Enter key on your keyboard.
So let's actually go inside this main activity file here and now this actually declares some objects
inside this main activity class.
So first of all I need to actually declare an edit text object so EDT a content
title and then put a semi-colon at the end of your statement and again Eddie takes EDT content text.
And again I need to put a semi-colon at the end of my statement.
And here again I want to actually declare about a button.
So PTEN notify.
And then I need to put a semicolon at the end of my statement.
So again inside the uncreate Meffert we need to actually instantiate these objects that we declared
inside this in a computer class.
So first what you want to instantiate is then create this EDT content's titel assignment operator.
So here I need to cestus object to a it takes object find you by ID or that ID that EDT content title
and that I need to put a semicolon at the end of my statement and ADT cont'd text assignment operator.
And then here I need to cast this object to a detailed object find view by ID or ID that it is EDT content.
TEXT So a French dad of it didn't assign an ID to this second.
So I made a mistake inside this activity Underland minute exam and I assigned is city.
So I need to change the C to D.
OK.
And then I need to press on into the key on my keyboard.
So let's go back to our main activity that java file.
So is it the content or text.
Okay.
And then I need to put a semicolon at the end of my statement.
And here I need to again instantiate this PTEN notify object so notify assignment operator and that
he or I need to chastise object to a button object find view ID or that Id towards Pythian notify and
that I need to put a semicolon at the end of my statement.
And here I need to actually make the Spartan BT and notify our listener to the clicks of the user.
So here I can't just type in between not notify that sets unclick listener and that I need to pass the
context so the context is going to be my inactivity that this and here at the top I need to actually
implement this view that Uncle listener interface so views that unclick listener.
And then we need to actually override the ankle Comerford inside our main activity class.
So he had I had just been unclick and he and as you can see we are all in this uncle Mefford inside.
Our main activity class and as you can see here the errors are gone and our application is actually
compiling our codes are compiling now.
So now inside our main activity class I'm going to actually paste in a method here and then I'm going
to explain to you what's going on here.
So as you can see here these are the lines of code that actually pasted here.
So as you can see I have my foot here.
And the access modifier of this method is private's and the return type of this method is void.
And this means that this if it returns nothing.
OK.
And the name of this method is shown notification.
So you want to show a notification to the user.
OK.
So in line 44 in order to actually create on notification and in order to show notification to the user
first that what we need to actually create a notification compact that build that object.
So here as you can see I created this object Builder which is of type notification combat compact that
builder.
OK.
And here as you can see I am instantiating this object.
New notification compact that builder.
And here as an argument we need to pass the context so the context is main activity that is an inline
45 as you can see here.
I am actually specifying the icon of the notification that I am to show to the user.
So I refer to this builder here builder that set small icon as you can see here.
I want to set a small icon for this notification.
Arthur triable that image.
So on my desktop I have an image for this notification that I actually downloaded from the Internet.
So this is the image.
OK.
I just need to actually copy this image so I just need to right click on this image here and then click
on copy copy image that PMG and let's actually go to an android studio and here inside our project structure
inside this press folder just select this triable for rebel directory here as you can see right click
on it and then click on paste.
So now click on OK here.
So as you can see here now I have this image inside my drivable folder.
So let's go back to our main activity class and as you can see I am actually setting this image are
that triable that image for this small icon of thus far this small icon of this notification.
OK Bill that's a smile icon.
So as you can see here I am actually specifying the text of the of the notification that I want to show
to the user.
So Bill there that sit content text.
OK.
So the content taste is going to be the value of these are textfield of this I to go back to our activity
mainit example.
So here I just need to click on this clear cache.
So as you can see here for the notification content takes as you can see I just need to get this value
with the value of this text field here.
As you can see so sort of naturally DoubleClick and distasteful as you can see the idea is content takes.
Right.
So you want to get this value and put that as the value of the text of this notification.
OK.
So that content text.
So editing content text that text that was thrown.
As you can see here I want to actually get this value and convert it to a string value.
And then I can actually pass that value as the argument as the argument of this content text here.
As you can see and hear in line 47 I am specifying the title of the content sort of the title of the
notification that you want to show to the user.
So there that content to title edit content text that get text that 2st.
So here as you can see I need to change the EDT content text to EDT content title.
So you want to actually get the content to hightail it Itay content title.
So insight or activity under alignment affects them in here.
As you can see I have the added text here right.
Please enter the title of the notification.
So if Y.W.C.A. edit takes here as you can see the title is it its contents title.
So you want to get the text of this editor of this text field and when all you want to actually use
that as the title of the notification that you want to show to the user.
So as you can see here this is going to be the title EDT contents title that get text that was strange
and then I can actually pass that value as the argument of the Smurfette so content title of this bill
that object.
OK.
So here as you can see I have a comment.
I created a comment here.
So use it on click on notification so when the user clicks on the notification what it is going to happen.