So as you can see here this is the effort that I actually pasted here.
These are the lines of code that I actually pasted here.
And as you can see the Axis modifier of the Smurfit is public.
The return type of this method is actually map and the name of this method is get beat map from you
r l.
OK so if you want to we want to actually get an image from the u r l that we passed to this method.
OK.
And the type of that image is going to be bitmap.
This is very important.
So as you can see here this if it actually accepts an argument of type strange and the name of this
argument is strange u r l and inside the Smurfette.
So now we are inside of this Meffert.
OK.
So in line 74 I created an object of type bitmap and that as you can see the name of this object is
bitmap.
And then I assign the value null to this object.
And as you can see here we have this try catch block here.
So inside the try block as you can see I have these lines of code in order to actually download the
image from the internet and assign that image to this bitmap object.
So here a line 74 77 I created an object of type u r l and the name of this object is you are an assignment
operator new u r l and the past is of value.
This string value as an argument to the constructor as you can see here to this class string you are
ill.
And we are actually assigning that value to this object.
OK.
So now we have that u r l here.
And in light 78 as you can see here I created an object of the input stream and the name of this object
is input stream.
Assignment operator.
So here I referred to the name of this you are an object that open stream.
So here it is very important that you call this method open stream in order because you want to download
the image from this model.
Here we need to call this method open stream on this object you are in.
OK.
And then we are assigning that value to the input stream object.
So now we initialized this input stream object and line 79 as you can see.
Now I want to initialize this bitmap object so bitmap assignment operator bitmap factory that D-CT stream.
So this is actually a static method inside this bitmap vector the class in order to decode in order
to decode the stream input stream.
OK so this is how we actually download the image from the Internet and we assign that to the bitmap
object.
So as you can see here I initialize this bitmap object he had and as scientist value to this bitmap
object.
OK.
And then we have this catch block here.
So in case we cannot actually download the image from the Internet or the internet connection is actually
there is no internet connection and it's going to actually catch those errors and it's going to output
those letters to the lug that pre-date stack trace.
And here we have this written bitmap.
OK.
We could actually put this written bitmap inside this tripe like.
OK.
But we can actually put it outside of this trope like it doesn't really matter.
OK.
So I mean it is enough for this class.
And now let's actually go inside our main activity of a fight here and then let's actually declare some
user interface components here as you can see so inside our activity underline minute exam and as you
can see here we have type artist name collection name rank name and kind.
OK.
So let's actually put those objects here inside that main activity class.
So now I'm going to paste in some lines of code here and then I'm going to explain to you what's going
on here.
So here as you can see I declared these objects and these are the lines of code that I actually put
put inside the main activity class.
So the first object is takes UTX the artist name takes to type as you can see here takes the kind takes
the collection name DHT track name as you can see here.
I m g art.
So let's go back to our right to beauty and alignment.
I mean that is I mean that's actually double click on this image here for the ID just type it just as
assigned a value.
AMG art and then present Enter key on your keyboard.
So let's go back to our main activity class as you can see here.
And here I have this variable strange IMJ RL.
OK I will put reduce this value later and in line 21 as you can see I declared an object of type button.
So the name of this button is bitti and retrieve info.
So let's go back to an activity underline that it may not examine as you can see here.
Let's double click on the spot in here as you can see the idea of the spot it is BT and get data.
So I can change the name the name of this button that I declared in my main activity class to PTEN get
the data PTEN get data.
And in line 22 I declared another takes.
So we don't need this object here.
And as you can see here we have actually declared this object of type bitmap.
OK so now let's actually initialize these objects that we actually declared inside our main activity
class.
So the first object is going to be the artist name.
OK so the artist name assignment operator.
So now let's cast this object to a text view object find view by ID or that Id dot asks the artist name.
So now let's actually put a semicolon at the end of our statement.
So then the next object that we want to instantiate here inside uncreate if it is going to be the type.
So it takes the type that assignment operator is BTC type assignment operator.
So now let's test this object to a taste object find view by id artist Id dot X the type and then let's
actually put a semicolon at the end of our statement.
And now let's actually initialize this takes the kind.
So I just need to refer to the name of this object the kind assignment operator.
So now let's cast this object to a taste view object find view by id artist Id that takes the kind.
As you can see here.
So let's actually put a semicolon at the end of her statement and then let's actually initialize this
takes the collection name.
So takes the th the collection name assignment operator.
So now let's cast this object to it takes a view object find view by id art that ID that takes the collection
name and then lets actually put a semi-colon at the end of our statement here.
And then let's actually instantiate this takes the Tracht name.
So th the throuch name assignment operator.
So now this has recast this object to a Takes view object find view by id r that ID that takes the training
and then they actually put a semicolon at the end of our statement.
And then let's actually initialize this image view here IMT art.
So I just need to revert to the name of this object.
I m g art assignment operator.
And then let's actually test this object to a image object find view by id r that ID that m g r.
And then let's actually put a semicolon at the end of our statement.
So then let's actually initialize this beauty and get data object.
So PTEN get the assignment operator and then essentially cast this object to a button object find view
by ID or that ID that PTEN get data.
And then let's actually put a semicolon at the end of our statement.
And now inside our main activity class.
So after the end in brace of this uncreate method inside our main activity class we need to actually
create an inner class to do the job to do the asynchronous jobs.
OK.
Because we don't want to actually block the user interface Fred.
OK we don't want to plug the main thread of our application.
We want to actually put the job of downloading that stuff or that image from the internet in the background
for it Fred.
OK.
We don't want to actually block or actually put heavy jobs on the main flight.
It's very bad.
OK.
We need to actually do their job of downloading the stuff or downloading the image from Twitter from
the internet in the background for it.
So in order to do that we need to actually create an entire class in order to do that job for us.
So inside the main activity class I'm going to actually pay that class here and then I'm going to explain
to you what's going on here.
So as you can see here I pasted this class here inside our main activity class and now I'm going to
explain to you what's going on here.
So this is the class OK these are the lines of code that I actually pasted here and now I'm going I
try to explain to you what is this class and what does this class do.
So in 947 as you can see here the axis modifier of this class is private and it is actually a class
as you can see.
And as you can see here the name of our class is Jason right.
Hume's stuff Pasch.
OK this is the task of actually downloading this stuff and the image from the Internet.
So if you need to put this task in the background for it.
So it is going to be an asynchronous task.
OK.
So this class extends from this async task.
And as you can see here we need to pass three arguments to this class.
The first one is going to be the input.
So remember that we want to actually get the data from an u r l.
OK we actually assign a u r l and then B we actually get the data from the Internet to some stuff.
The RL is going to be of types three past that you are.
Which is strange here.
And this void here the second argument is going to actual return to us the units of progress if you
want to actually know how much of the contents is actually maynt.
And we can actually get those data here as well as the second argument.
So here for our specific application we get we don't want to get those data.
So we pass the value voyde with Capitol V and for the first argument this is going to be the output
the output that is going to be returned from this class.
We want to get the items stuff we want to get the data that is inside the iTunes service and we want
to put those data into our application.
OK.
So the past that you are ill which is off the street.
And if you get those data that is actually of type items stuff the information that is inside of the
items we have service.
So this is going to be the output this is input this is output remember and here as you can see inside
this class like actually declared an object of type context.
As you can see here and the name of this object is context.
And here again I actually declared an object of type Procrustes dialogue in order to show to the user
that something is actually downloading from the Internet.
So I need to actually declare this object here.
And then I created a constructor for this class so public Dayton's Jason iTunes stuff Pasch.
So remember the name of the constructor must be the same as the name of the class Dasen items stuff
ask.
And this class this is constructed actually to access an argument of type context.
So as you can see here the name of this argument is context as you can see here at inside the constructor
here.
I am actually initializing this context object so does that context assignment operator context.
So here I am actually passing this context that I actually receive as an argument from the constructor.
What does this context here that is inside of my class.
This day use stuff past class.
OK.
See here I am actually initialising this object and then 11:57 I am actually initialising this progress.
They lack insight this constructor's of progress they lag assignment operator new progress dialog and
then have to pass the context.
OK so here that I actually initialized this context.
Now I am actually passing this context that we receive as an argument of this const constructor here.
OK.
And then in in lines fretty free free for two sixty nine.
We have this on the execute method.
So this if it is going to be executed right before the task of downloading the data from the Internet.
OK.
So Henri.
And then we need to actually call this faith superba execute.
So it can actually call the supervision version of this Meffert on pre execute and then in line sixty
six I've referred to the name of this object progress dialog.
That said title downloading info from iTunes.
Please wait.
So it is going to actually set the title for this progress.
De-lurk and it inline 6:54.
I am calling the Shoma of it on progress they like so progress they like that show.
So it's going to show the user the progress they like.
OK.