Posts

Showing posts from February, 2021

Kotlin Insight Privacy Policy

  Kotlin  Insight is Application that provides Basic Android app development instruction and examples using kotlin language . For Make Demo Examples We Require Some Permission from User. This privacy policy will help you to which types of Permission We collect from User and also Why we collect. So we hope, You Will Spend Time to read this Privacy Policy. We ensure about Our Application Do not contain any types of Malware and other Personal Informatio n. Which types of Permission Require from User : Location-Permission  For get Current location. Call and SMS Permission  To make Call For Send SMS and Receive SMS. Why We  require  Uses -Permission from User? We required permission from the user for various demo examples and the only purpose for such permission is to demonstrate the user how does the demo examples will work we will not be collecting any data from the granted permission.

What is Retrofit ?

Retrofit is type-safe REST client for Android and Java. Retrofit is a REST Client for Java and Android. It makes it relatively easy to retrieve and upload JSON (or other structured data)  Retrofit automatically serializes the JSON response  In Retrofit you configure which converter is used for the data serialization. It is used to display or get data that stores on  Server and to get API data.

When Statement in Kotlin

 In  Kotlin, when replaces the switch operator of other languages like Java In Kotlin, when can be used in two ways: when as a statement. when as an expression. When Example:- fun main(args: Array<String>){       var number = 4       when(number) {           1 -> println("One")           2 -> println("Two")           3 -> println("Three")           4 -> println("Four")           5 -> println("Five")           else -> println("invalid number")       }   }   output:- Four

Require dependency for Kotlin example

      //dependencies for google map  implementation 'com.google.android.gms:play-services-maps:17.0.0'  implementation 'com.google.android.gms:play-services-location:17.1.0' //dependencies for Retrofit,gson and gson converter implementation 'com.squareup.retrofit2:retrofit:2.4.0' implementation 'com.google.code.gson:gson:2.8.6' implementation 'com.squareup.retrofit2:converter-gson:2.4.0' // dependency for picasso  implementation 'com.squareup.picasso:picasso:2.71828'  // dependency for facebook shimmer  implementation 'com.facebook.shimmer:shimmer:0.5.0'    // dependency for material design  implementation 'com.google.android.material:material:1.3.0-beta01'