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:
- Scaling deep retrieval with TensorFlow Recommenders and Vertex AI Matching Engine May 1, 2023
- Unleash your Google Cloud data with ThoughtSpot, Looker, and BigQuery May 1, 2023
- Track, Trace and Triumph: How Utah Division of Wildlife Resources is harnessing Google Cloud to… May 1, 2023
- Seeing the World: Vertex AI Vision Developer Toolkit May 1, 2023
- BBC: Keeping up with a busy news day with an end-to-end serverless architecture May 1, 2023
- Scalable electronic trading on Google Cloud: A business case with BidFX May 1, 2023
- Google Cloud and Equinix: Building Excellence in ML Operations (MLOps) May 1, 2023
- Google Docs can make a table of contents for you — here’s how May 1, 2023