<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Android-app-using-Kotlin%2FC3%2FURL-Request%2FEnglish-timed</id>
		<title>Android-app-using-Kotlin/C3/URL-Request/English-timed - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Android-app-using-Kotlin%2FC3%2FURL-Request%2FEnglish-timed"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Android-app-using-Kotlin/C3/URL-Request/English-timed&amp;action=history"/>
		<updated>2026-06-01T21:42:31Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Android-app-using-Kotlin/C3/URL-Request/English-timed&amp;diff=54016&amp;oldid=prev</id>
		<title>PoojaMoolya: Created page with &quot; {| border=1 |  &lt;center&gt;'''Time'''&lt;/center&gt; | &lt;center&gt;'''Narration'''&lt;/center&gt; |- | 00:01 | Welcome to the''' Spoken Tutorial''' on''' URL Request.'''  |- | 00:06 | In this tu...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Android-app-using-Kotlin/C3/URL-Request/English-timed&amp;diff=54016&amp;oldid=prev"/>
				<updated>2020-10-13T10:38:31Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot; {| border=1 |  &amp;lt;center&amp;gt;&amp;#039;&amp;#039;&amp;#039;Time&amp;#039;&amp;#039;&amp;#039;&amp;lt;/center&amp;gt; | &amp;lt;center&amp;gt;&amp;#039;&amp;#039;&amp;#039;Narration&amp;#039;&amp;#039;&amp;#039;&amp;lt;/center&amp;gt; |- | 00:01 | Welcome to the&amp;#039;&amp;#039;&amp;#039; Spoken Tutorial&amp;#039;&amp;#039;&amp;#039; on&amp;#039;&amp;#039;&amp;#039; URL Request.&amp;#039;&amp;#039;&amp;#039;  |- | 00:06 | In this tu...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
{| border=1&lt;br /&gt;
|  &amp;lt;center&amp;gt;'''Time'''&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 00:01&lt;br /&gt;
| Welcome to the''' Spoken Tutorial''' on''' URL Request.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:06&lt;br /&gt;
| In this tutorial we will learn to&lt;br /&gt;
&lt;br /&gt;
Pass the '''Foss''' and '''Language ids''' to the '''URL''' of '''Spoken Tutorial'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:15&lt;br /&gt;
|  Parse the '''response JSON data'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:18&lt;br /&gt;
|  Run the '''Kotlin''' '''App '''and  Display the fetched '''data'''&lt;br /&gt;
|-&lt;br /&gt;
| 00:23&lt;br /&gt;
| To record  this tutorial, I am using&lt;br /&gt;
&lt;br /&gt;
'''Ubuntu Linux 16.04''' operating system &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:30&lt;br /&gt;
|  '''Android Studio''' version 3.x and&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:34&lt;br /&gt;
|  '''Android Phone '''with minimum of '''Android''' OS version '''4.03'''&lt;br /&gt;
|-&lt;br /&gt;
| 00:40&lt;br /&gt;
| To follow this tutorial, you should have basic knowledge of&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:44&lt;br /&gt;
|  '''Java programming language '''and  '''Android Studio '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:49&lt;br /&gt;
| If not, then go through the relevant tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:54&lt;br /&gt;
|  '''Spoken Tutorial project''' has a '''server''' which has an '''API''' made for a specific purpose.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:01&lt;br /&gt;
|  It helps to fetch the video tutorials of a '''FOSS''' in a particular language.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:07&lt;br /&gt;
|  Specific '''ids''' of a '''FOSS''' and language are passed to the '''server,''' to fetch the exact video.&lt;br /&gt;
|-&lt;br /&gt;
| 01:15&lt;br /&gt;
|  '''API''' means '''Application Programming Interface'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:19&lt;br /&gt;
|  An''' API '''is the messenger that allows two software programs to communicate with each other&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:27 &lt;br /&gt;
|  It delivers the '''request''' to the provider and then delivers the '''response''' back to us&lt;br /&gt;
|-&lt;br /&gt;
| 01:34&lt;br /&gt;
| '''Spoken Tutorial URL format''' is shown below:&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:39&lt;br /&gt;
| In this '''URL''', instead of '''variables fossID''' and '''languageID''' we have to pass the actual '''ids'''.&lt;br /&gt;
|-&lt;br /&gt;
| 01;48&lt;br /&gt;
| How to make a request to the URL?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:51&lt;br /&gt;
|  '''Google''' provides '''Volley library''' which makes requesting a '''URL''' easy and faster.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:58&lt;br /&gt;
| '''Volley''' is an '''HTTP library''' that makes '''networking''' for '''Android Apps''' easier.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:05&lt;br /&gt;
|  '''It''' is an external '''library'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:08&lt;br /&gt;
|  We need to add to our '''Android studio project''' so that necessary files are downloaded.&lt;br /&gt;
|-&lt;br /&gt;
| 02:14&lt;br /&gt;
| Let us open '''Android Studio'''.&lt;br /&gt;
|-&lt;br /&gt;
| 02:18&lt;br /&gt;
| Open the '''project ST Search.'''&lt;br /&gt;
|-&lt;br /&gt;
| 02:22&lt;br /&gt;
| In the left panel, under '''Project''', click on the small triangle to open '''Gradle Scripts.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:29&lt;br /&gt;
| Double-click on '''build dot gradle within brackets Module colon app'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:36&lt;br /&gt;
| A new window opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:39&lt;br /&gt;
| In the '''dependencies''' block we will add a new '''dependency'''.&lt;br /&gt;
|-&lt;br /&gt;
|02:43&lt;br /&gt;
| At the end of the block, add a new line as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:48&lt;br /&gt;
| We have now added the '''Volley library''' to our '''project'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:53&lt;br /&gt;
| Next we will add the '''dependency''' of '''Picasso,''' as we will display images at a later stage.&lt;br /&gt;
|-&lt;br /&gt;
| 03:00&lt;br /&gt;
| So add a new line for the '''dependency''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:04&lt;br /&gt;
| This is to display the thumbnail of the '''spoken tutorial''' videos.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:09&lt;br /&gt;
| A '''Sync Now '''message appears at the top right corner of the '''IDE'''.&lt;br /&gt;
&lt;br /&gt;
Click on it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:16&lt;br /&gt;
| Wait for the '''gradle build''' to complete which is shown at the bottom of the screen.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:22&lt;br /&gt;
| To request a '''URL''', we need '''Internet connection.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:26&lt;br /&gt;
| So let us add code to get '''Internet''' permission for the '''app'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:31&lt;br /&gt;
| In the left panel, go to '''app  manifests  '''and double click on''' AndroidManifest dot xml'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:40&lt;br /&gt;
| Add the below code above the '''application''' '''tag'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:44&lt;br /&gt;
| Without this line of code, our '''App''' cannot request any information from the '''Internet'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:51&lt;br /&gt;
| Now, go to '''SecondActivity dot kt'''&lt;br /&gt;
|-&lt;br /&gt;
| 03:57&lt;br /&gt;
| In '''onCreate method''', we will add the code''' '''as shown to create a new''' request queue'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:04&lt;br /&gt;
| This will use the '''newRequestQueue method''' of '''volley library'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:09&lt;br /&gt;
| Next declare a '''variable url '''and assign the '''string''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:14&lt;br /&gt;
| Here the '''URL''' is dynamic as we have to concatenate the '''FOSS''' and '''language ids''' received in '''intent'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:24&lt;br /&gt;
| So every time a different '''FOSS''' and language are selected, the '''URL''' will be different.&lt;br /&gt;
|-&lt;br /&gt;
| 04:31&lt;br /&gt;
| We will try to invoke the above '''URL''' in any''' web browser'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:36&lt;br /&gt;
| I’ll open '''Firefox web browser'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:40&lt;br /&gt;
| Type the following '''URL''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:44&lt;br /&gt;
| Here, 10 specifies the '''FOSS id''' for '''Java''' and 22 specifies the language '''id''' for '''English'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:54&lt;br /&gt;
| We can''' '''see the '''json data''' that is displayed on the '''web page. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:59&lt;br /&gt;
| It is in readable format. For other '''browsers''', it may look different.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:09&lt;br /&gt;
| Let us try for some other '''FOSS id''' and '''language id '''combination.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:12&lt;br /&gt;
| Change the '''FOSS id''' to 26 and '''language id to 22''' and press Enter&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:18&lt;br /&gt;
| This '''URL''' gives the videos of '''Python''' in '''English.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:23&lt;br /&gt;
| Now let’s change the id to 26 and 18.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:28&lt;br /&gt;
| This '''URL''' returns empty data which indicates that there are no videos for this combination of '''ids'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:37&lt;br /&gt;
|  '''JSON '''stands for''' JavaScript Object Notation.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:42&lt;br /&gt;
|  '''JSON''' is easy to read and write.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:46&lt;br /&gt;
|  It is used to transmit '''data''' between a '''server''' and '''web application'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:51&lt;br /&gt;
|  It is an alternative to '''XML'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:54&lt;br /&gt;
| Let us go back to '''SecondActivity dot kt'''&lt;br /&gt;
|-&lt;br /&gt;
| 05:58&lt;br /&gt;
| Now the next step is to make a '''string request'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:02&lt;br /&gt;
| Write the below code after '''val url''' line, in the '''oncreate method''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:10 &lt;br /&gt;
| If you see your code highlighted in red color, press '''Alt+Enter '''keys.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:17&lt;br /&gt;
| Select the appropriate option to quick fix the error.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:23&lt;br /&gt;
| In '''string request''' we specify four '''arguments''':&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:27&lt;br /&gt;
| '''Request dot Method''', '''url''', '''Response dot Listener''' and '''Response dot ErrorListener'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:36&lt;br /&gt;
| '''Response dot Listener''' specifies what to do when the '''response''' is received.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:42&lt;br /&gt;
| '''Response dot ErrorListener''' specifies what to do when there is an error.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:48&lt;br /&gt;
| '''extractJsonData '''is a '''method''' which we will create later, to parse the '''JSON data''' that we have received.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:55&lt;br /&gt;
| We have commented this line of code as of now.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:59&lt;br /&gt;
| Once we create the '''method''', we will call it from the '''Response dot Listener '''&lt;br /&gt;
|-&lt;br /&gt;
| 07:04&lt;br /&gt;
| Write the code as shown after the '''StringRequest method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:11&lt;br /&gt;
| This message  “'''Contacting server…”''' indicates that still processing is going on.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:18&lt;br /&gt;
| Add the code in the next line as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:23&lt;br /&gt;
| When the '''request''' is put in queue, the '''request''' is executed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:28&lt;br /&gt;
| The '''Volley''' code which is required to '''request''' the '''URL''' to fetch '''data,''' is ready.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:33&lt;br /&gt;
| Run the '''app'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:38&lt;br /&gt;
| Search for a specific '''FOSS''' and language and press the '''Search '''button.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:43&lt;br /&gt;
| If you receive a '''toast '''message''' “Received server response!”,'''  then your code is running fine.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:50&lt;br /&gt;
| As an assignment, do the following:&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:53&lt;br /&gt;
|  Disconnect the''' Internet/Wifi'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:57&lt;br /&gt;
|  Now run the '''app''' and search for the FOSS and language. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:02&lt;br /&gt;
|  Observe the error output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:05&lt;br /&gt;
| We checked in the demonstration that we got the '''response''' from the '''server'''. Now we need to '''parse''' it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:13&lt;br /&gt;
| '''Parsing''' means '''extracting '''useful information.&lt;br /&gt;
&lt;br /&gt;
Let us go back to the '''browser''', to see the '''JSON format data.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:21&lt;br /&gt;
| Change the '''FOSS id''' and '''Language Id''' to 26 and 22.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:27&lt;br /&gt;
| The '''data''' in '''JSON''' is '''key-value pairs'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:31&lt;br /&gt;
|We will use the '''tutorial  underscore name, video underscore id''' and '''tutorial underscore level '''fields present in the '''JSON data'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:42&lt;br /&gt;
| Switch back to''' Android studio''' interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:46&lt;br /&gt;
| On the top left panel, under '''project''', go to&lt;br /&gt;
&lt;br /&gt;
'''app  java ''' '''com dot example dot spoken dot stsearch'''&lt;br /&gt;
|-&lt;br /&gt;
| 08:57&lt;br /&gt;
| Right-click on it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:59&lt;br /&gt;
|Select''' New  Kotlin File or Class'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:05&lt;br /&gt;
|Type a name as '''VideoItem''' and press '''OK.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:10&lt;br /&gt;
|A new file '''VideoItem dot kt''' is created below''' SecondActivity.'''&lt;br /&gt;
|-&lt;br /&gt;
| 09:16&lt;br /&gt;
| Type this code in '''VideoItem dot kt.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:20&lt;br /&gt;
|Here we have created a '''class''' named as '''data class''' in '''Kotlin'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:25&lt;br /&gt;
|When '''data class '''is created, the '''getters''' and '''setters method''' are created while compiling.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:32&lt;br /&gt;
|So when we save the details of videos, we will make an '''object''' of this '''class''' for each video.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:40&lt;br /&gt;
|Here, video level specifies the '''basic, intermediate''' or '''advance''' level of spoken tutorials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:48&lt;br /&gt;
| Now go to '''SecondActivity dot kt'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:52&lt;br /&gt;
| Here we will create our '''method extractJsonData'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:56&lt;br /&gt;
|So write the code after the '''onCreate method:''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:02&lt;br /&gt;
|In the '''method''' we take the '''response''' received as '''arguments'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:07&lt;br /&gt;
|As we know how the '''JSON data''' will look, we can start parsing it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|10:12&lt;br /&gt;
| First we obtain the '''array''' from '''response''':&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:16&lt;br /&gt;
|Write the code for it in '''extractJsonData method '''as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:22&lt;br /&gt;
|Here we convert the '''response''' into '''JSONArray'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:26&lt;br /&gt;
|Now we know that inside this '''array''' there are many '''JSON objects''' of different videos.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:32&lt;br /&gt;
| So we declare a '''variable''' for storing '''objects''' one by one as shown here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:40&lt;br /&gt;
| After that we need an '''object''' for '''VideoItem class''' in which we store the '''data'''.&lt;br /&gt;
&lt;br /&gt;
Write the code as shown:&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:49&lt;br /&gt;
| Next we require a '''ArrayList''' for '''VideoItem class'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:54&lt;br /&gt;
|Declare a '''global ArrayList '''as shown above the '''onCreate method''' and inside the '''class'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:01&lt;br /&gt;
|In this '''ArrayList''' all the video '''data''' will be saved.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:05&lt;br /&gt;
|So that it will be accessible to both '''onCreate '''and '''extractJsonData methods'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:12&lt;br /&gt;
|In this '''ArrayList''' we have declared the '''type''' as '''VideoItem'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:17&lt;br /&gt;
|That means it will have '''objects''' of '''VideoItem class''' as '''data'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:23&lt;br /&gt;
| Now we go to '''extractJsonData method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:27&lt;br /&gt;
| Type the code as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:34&lt;br /&gt;
|'''while loop '''is to iterate all the '''objects''' in '''JSON array:'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:39&lt;br /&gt;
|In this '''loop''' we first obtain the '''json object''' in '''singleVideoJsonObject'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:46&lt;br /&gt;
| This line extracts all the information and makes an '''object''' of '''VideoItem''' in '''singleVideoItem variable.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:54&lt;br /&gt;
|Here we make an '''object''' of '''VideoItem '''and pass all the values from the '''JSON object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:01&lt;br /&gt;
|The loop will extract '''data''' of all videos received and store it in our '''arraylist'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:08&lt;br /&gt;
| So after the '''while block''' we will write the code to print the '''items''' of '''finalResultsArrayList:'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:16&lt;br /&gt;
|'''forEach method''' loops through all the '''elements''' of the '''array list.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:21&lt;br /&gt;
|The''' it variable''' in the''' println() statement''' points to one '''item''' in every '''loop'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:28&lt;br /&gt;
| Now in '''Request dot Listener''' of '''stringRequest '''code we had the '''method''' which is commented.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:05&lt;br /&gt;
|'''Un-comment''' the code, so that '''extractJsonData '''will be '''called''' from there.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:41&lt;br /&gt;
| So this''' array list '''will contain many '''objects''' of our '''class type VideoItem'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:48&lt;br /&gt;
|When we take any one '''item''' from the '''array list''', we get a '''object''' of '''VideoItem'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:53&lt;br /&gt;
|We can access the values for this '''object''' such as''' videoId, videoTitle, videoLevel.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 13:00&lt;br /&gt;
|So in this way '''JSON''' parsing is done.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|13:04&lt;br /&gt;
| Let us now run the '''App'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 13:08&lt;br /&gt;
| Search for a specific '''FOSS''' and language and press the '''Search '''button.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 13:15&lt;br /&gt;
| Click the '''Logcat '''section at the bottom of the '''IDE'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 13:20&lt;br /&gt;
|Here we can see the output of '''println statement.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 13:25&lt;br /&gt;
|To find our output, search for '''video''' in '''search box.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 13:30&lt;br /&gt;
|Here we can see all the '''VideoItems '''shown one after the other.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 13:39&lt;br /&gt;
| This brings us to the end of this tutorial. Let us summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|13:44&lt;br /&gt;
| In this tutorial we learnt to&lt;br /&gt;
&lt;br /&gt;
Pass the '''Foss''' and '''Language ids''' to the '''URL''' of '''Spoken Tutorial'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 13:53&lt;br /&gt;
| Parse the '''response JSON data'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 13:56&lt;br /&gt;
| Run the '''Kotlin''' '''App '''and  Display the fetched '''data'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 14:01&lt;br /&gt;
| The video at the following link summarises the Spoken Tutorial project.Please download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 14:08&lt;br /&gt;
| The Spoken Tutorial Project Team conducts workshops and gives certificates on passing online tests.&lt;br /&gt;
&lt;br /&gt;
For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 14:18&lt;br /&gt;
| Please post your timed queries in this forum. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 14:22&lt;br /&gt;
| Spoken Tutorial project is funded by NMEICT, MHRD, Government of India.&lt;br /&gt;
&lt;br /&gt;
More information on this mission is available at this link.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 14:34&lt;br /&gt;
| The '''Android app '''and the script for this tutorial was contributed by Abhishek Shah.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 14:40&lt;br /&gt;
| And this is Nirmala Venkat along with the Spoken Tutorial team from IIT Bombay, signing off. &lt;br /&gt;
&lt;br /&gt;
Thanks for watching.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>PoojaMoolya</name></author>	</entry>

	</feed>