Supporting Kotlin Google Maps Platform Developers
Ever since Google announced support for Kotlin on Android, Android developers are increasingly adopting Kotlin as their programming language of choice. Developers love Kotlin for how expressive it is, how it enables defensible programming through nullability support, and how it interoperates with Java. In fact, the recent State of Kotlin on Android survey shows that 50 percent of developers are more likely to be satisfied with Kotlin, 60 percent of pro-Android developers use Kotlin, and 70 percent of the top 1,000 apps in Google Play contain Kotlin code.
In support of this changing landscape of Android developers, we’ve launched Kotlin extension (KTX) libraries, Kotlin snippets throughout Google Maps Platform documentation, and Kotlin sample code on GitHub.
KTX libraries enable you to write concise code that is more natural and familiar to the Kotlin programming language. The set of KTX libraries wrap existing Google Maps Platform Android SDKs so that you can use several Kotlin-only features such as extension functions, lambdas, named parameters, and coroutines.
Currently, the KTX libraries we have available are the Places KTX library, which offers extensions for the Places SDK for Android. And the Maps KTX library, which offers extensions for the Maps SDK for Android and our Android Utility Library. These libraries are optional integrations that enable you to use the same libraries you know and love while taking advantage of Kotlin-specific features.
Kotlin code snippets in Google Maps Platform documentation
Quality and functional code snippets are key to providing a good developer experience with our SDKs. As such, we’ve finished adding Kotlin snippets, alongside Java, throughout the Maps and Places SDK for Android documentation. Now whenever a code snippet is presented, you should see both Java and Kotlin tabs so you can select the most relevant to your development needs.
Moving forward, you can expect new Google Maps Platform code samples in our docs to always contain both Kotlin and Java snippets.
Kotlin samples on GitHub
Last but not least, we also provide Kotlin sample applications that demonstrate common scenarios using Google Maps Platform SDKs. These samples are available on GitHub (Places, Maps), which you can clone directly to your machine. Since these are open source projects, feel free to open issues for anything you’d like to see.
To stay up-to-date with our latest language support, make sure to follow us on Twitter. We’re excited to see what you build with Kotlin.
For more information on Google Maps Platform, visit our website.
Related Google News:
- Albertsons and Google are making grocery shopping easier with cloud technology March 30, 2021
- Google and the National Science Foundation expand access to cloud resources March 29, 2021
- Student applications for Google Summer of Code 2021 are now open! March 29, 2021
- The ABCs of spelling in Google Search March 29, 2021
- A Matter of Impact: March updates from Google.org March 26, 2021
- Discover the best products for everything on Google March 26, 2021
- Run a transformed supply chain – see how at Google’s Digital Supply Chain summit March 25, 2021
- TELUS International migrates key customer experience app to Google Cloud March 25, 2021