Android app using Kotlin

From Script | Spoken-Tutorial
Jump to: navigation, search

Android is an open source and Linux-based Operating System for mobile devices such as smartphones and tablet computers.

Android Studio is the official IDE for android application development. App development on Android was almost exclusively done using the Java programming language.

Kotlin is a new open source programming language built by JetBrains, known for IntelliJ IDEA (Android Studio is based on IntelliJ IDEA). Kotlin is a language that runs on the JVM (Java Virtual Machine).

Google has announced Kotlin as an official language on Android. Kotlin, is a statically typed programming language for the JVM, Android and the browser. It’s deep interoperability with Java, which attracts more Java developers. It is tools-friendly as IDE gives suggestions for Kotlin code, can convert Java code to Kotlin code. It is expressive to make your code more readable and understandable.

The Android app, source code and the content for this tutorial was contributed by Abhishek Shah, a FOSSEE intern of the Spoken-Tutorial Project from Birla Vishvakarma Mahavidyalaya Engineering College, Gujarat.

The Spoken Tutorial Effort for Android app using Kotlin has been contributed by Nirmala Venkat from Spoken Tutorials.


Basic Level

  1. Installation of Android Studio
    • System prerequisites for installation
    • Demonstration on how to install Android Studio on Ubuntu Linux OS
    • Download from https://developer.android.com/studio/
    • Steps to follow to do the installation
    • How to start the Android Studio from the terminal
    • Android Studio setup wizard
    • Welcome page of Android Studio
  2. Getting started with Hello World App
    • Launch the Android studio
    • Create a new Android Studio project
    • Steps for creating a new Application
    • How to create a new activity?
    • Explore the Android Studio interface
    • Steps to enable USB debugging on Android Phone
    • Run the default Hello world App
    • Change the position of the default TextView
    • Change the default text property during run time
    • Run the App to see the output in an Android phone
  3. Creating a simple registration form
    • How to use tools such as TextView, Plain Text and Buttons?
    • Add a TextView and set the attributes
    • How to align and resize a view in ConstraintLayout?
    • How to delete a constraint?
    • Add a EditText and set the attributes
    • Add a Button and set the attributes
    • Quick fix the errors and warnings
    • SetOnClickListener method
    • Send data from one activity to another activity
    • Show the registration form output in an Android phone
  4. Adding Radio Buttons
    • Why we need Radio Group?
    • How to add Radio Group?
    • Set the attributes for Radio Group
    • How to add Radio button?
    • Set the text attribute for Radio button
    • Declaring variables in Kotlin
    • Code for Radio button selection
    • Launch the App in the phone
    • Run the App to see the output in the Android phone
  5. Adding Spinner and Image
    • How to add Spinner?
    • Set the attributes for spinner
    • Add list of items to spinner through kotlin code
    • Create an array adapter
    • Source code for selecting an item from the spinner
    • How to add a built-in image?
    • How to add a custom image?
    • Launch the app in the phone
    • Run the App to see the output in the Android phone


Intermediate Level

  1. Creating a Search App
    • Data identification in Spoken tutorial server
    • Design the App with Text views, Spinner and Search button
    • How to store the FOSS and Language IDs in HashMap data structure?
    • How to declare Array list to store Languages of a particular FOSS?
    • Use of Mutable list
    • Create adapter for FOSS and Language spinner
    • Source code for selecting an item from the spinner
    • Launch the app in the phone
    • Run the App to see the selected FOSS ID and Language ID as output in the Android phone
  2. URL Request
    • About Spoken tutorial server
    • How API works?
    • Spoken Tutorial URL format
    • How to make a request to the URL?
    • Add the dependency of Volley library and Picasso.
    • Add the required code to get Internet permission for the app
    • Display json data for various foss id of spoken tutorials
    • How JSON works?
    • Write Volley code required to request the URL to fetch data
    • Pass the Foss and Language ids to the URL of Spoken Tutorial
    • Run the Kotlin App and display the fetched data
  3. Display Search Result
    • About RecyclerView
    • Add RecyclerView and set its attributes
    • Create a custom layout
    • Add ImageView to display the thumbnail of videos
    • Add TextView to display the video title and video level
    • Create an adapter to populate the custom layout in RecyclerView
    • Source code to get the thumbnail from a specific spoken tutorial YouTube URL
    • Implement the required methods
    • Pass the Foss and Language ids to the URL of Spoken Tutorial
    • Run the Kotlin App and display the thumbnails
  4. Playing video using YouTube API
    • Create a new project in Google cloud
    • Generate the API key and save it
    • Enable the YouTube API
    • How to use YouTubePlayerView provided by YouTube
    • Initialize the view to play a video from YouTube, by giving the video ID
    • Download the YouTubeAndroidPlayerApi.jar file from the developers website
    • Copy the above file in the Android Studio project
    • Source code for YouTube player
    • Run the Kotlin App and play the video

Contributors and Content Editors

Nirmala Venkat