Giter VIP home page Giter VIP logo

android_kotlinsprintchallenge's Introduction

Kotlin Sprint Challenge

Objectives

Module 1 - Kotlin Part 1

  • write Kotlin functions
  • create Kotlin variables
  • use Kotlin String interpolation
  • use conditionals in Kotlin
  • create Kotlin classes
  • use Kotlin constants

Module 2 - Kotlin Part 2

  • work with Lists in Kotlin
  • use Loops in Kotlin
  • work with Interfaces, Abstract Classes and Inherited Classes in Kotlin
  • use special types of classes in Kotlin
  • work with Pairs and Maps in Kotlin
  • use Kotlin Extension Functions

Module 3 - Kotlin in Android

  • convert Java code to Kotlin
  • add Kotlin file to existing project
  • create a new app using Kotlin
  • use Interface callbacks with Kotlin
  • add the KotlinX Serialization library to an Android project
  • set up a class for Kotlin serialization
  • encode and decode JSON

Module 4 - Kotlin Coroutines

  • explain the advantage of Coroutines other Async patterns
  • set up app to work with coroutines
  • use annotations to ensure proper threading
  • prepare methods to be run on coroutines
  • spin up coroutine
  • move coroutine execution from one thread to another

Requirements

Build an app which uses the spacetelescope api to retrieve videos and then build a view player to play them.

  1. Use coroutines to execute network calls to the api

The documentation can be found here Be sure to add the android:usesCleartextTraffic="true" attribute to the application tag in your manifest to work with http urls (as opposed to https) return pair from http request method

  1. Use the serialization library to process the JSON response

You can use the @Optional tag and Json.nonstrict.parse to ignore non-necessary Json properties.

add extention function to video to get the desired video file url that is specified in a constant

  1. Write an extension function to the VideoData class (the one with the array of video_files) to return a video_file object based on a predetermined value which is stored as a constant in the VideoData class
  2. Add a VideoView, SeekBar, and Button to the layout and use them to play the video retrieved from the url
    1. Button - can play/pause the video
    2. VideoView - Video output
    3. SeekBar
      1. Follows progress of the video
      2. Secondary progress tracks the buffer progress
      3. User can tap and drag to seek to different locations

You can use the kotlin-android-extensions plugin that comes with your kotlin app to use the view ids as objects

android_kotlinsprintchallenge's People

Contributors

chancepayne avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.