<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/sources/pand/best-of/2024/07" -->

---
title: Best ProAndroidDev posts — July 2024 | daily.dev
description: The most upvoted ProAndroidDev posts from July 2024, curated by the daily.dev community.
canonical: https://daily.dev/sources/pand/best-of/2024/07
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:url: https://daily.dev/sources/pand/best-of/2024/07
og:type: website
og:site_name: daily.dev
og:title: Best ProAndroidDev posts — July 2024 | daily.dev
og:description: The most upvoted ProAndroidDev posts from July 2024, curated by the daily.dev community.
og:image: https://media.daily.dev/image/upload/s--VAY5ToZt--/f_auto/v1724209435/public/daily.dev%20-%20open%20graph
---

# Best of ProAndroidDev — July 2024

1. 1  
[](https://daily.dev/posts/stop-throwing-exceptions--tjrssfzj0 "Stop throwing exceptions!")  
Article  
![Avatar of pand](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/656c1eb1f1ef4f91936e86fc16545114)ProAndroidDev · 2y  
Stop throwing exceptions!  
In Kotlin, it's recommended to avoid throwing exceptions and instead handle error scenarios using try/catch expressions, result objects, and functional programming paradigms. The default usage of try/catch is criticized for reducing readability and maintainability. The post suggests Kotlin's built-in Result class for better error handling, providing examples of how to wrap operations in Result objects and handle errors more effectively. This approach promotes cleaner, more testable code without relying on exceptions.  
52  
7
2. 2  
[](https://daily.dev/posts/convert-your-native-project-to-kotlin-multiplatform-why-when-and-how-xlezo6c4u "Convert Your Native Project to Kotlin Multiplatform: Why, When and How")  
Article  
![Avatar of pand](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/656c1eb1f1ef4f91936e86fc16545114)ProAndroidDev · 2y  
Convert Your Native Project to Kotlin Multiplatform: Why, When and How  
Kotlin Multiplatform (KMP) enables a new approach to cross-platform development without the need to rewrite existing native applications. KMP allows sharing code between Android and iOS while retaining native performance and user experience. This guide highlights the advantages of migrating to KMP, such as gradual migration, maintaining native functionality, faster feature delivery, and improved team collaboration. The migration process typically involves setting up a multiplatform module, migrating models, data sources, and business logic in an iterative manner.  
25
3. 3  
[](https://daily.dev/posts/kotlin-lazy-vs-lateinit-explained-lj6kzinhv "Kotlin Lazy vs Lateinit Explained")  
Article  
![Avatar of pand](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/656c1eb1f1ef4f91936e86fc16545114)ProAndroidDev · 2y  
Kotlin Lazy vs Lateinit Explained  
Explore ways to initialize properties in Kotlin using lazy and lateinit keywords. Lazy is used for immutable properties and initializes the value upon first use, promoting better resource management. Lateinit is for mutable properties, allowing initialization to occur later, but requires careful handling to avoid crashes. For primitive types, use Delegates.notNull to achieve similar functionality.  
23  
1
4. 4  
[](https://daily.dev/posts/jetpack-compose-previews-delving-deep-into-their-inner-workings-9bkoh6idr "Jetpack Compose Previews: Delving Deep Into Their Inner Workings")  
Article  
![Avatar of pand](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/656c1eb1f1ef4f91936e86fc16545114)ProAndroidDev · 2y  
Jetpack Compose Previews: Delving Deep Into Their Inner Workings  
Jetpack Compose Previews enable rapid UI design iterations and can be run using \`adb\` without Android Studio. Understanding \`PreviewActivity\` and its role in hosting composables, as well as how to customize previews in multi-modular projects, can greatly enhance the development process. The guide provides detailed steps on generating and running instrumented APKs for previews and customizing preview behavior and appearance.  
15
5. 5  
[](https://daily.dev/posts/kotlin-reified-explained-no-more-type-erasure--ayvu3z9cr "Kotlin reified Explained (no more type erasure)")  
Article  
![Avatar of pand](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/656c1eb1f1ef4f91936e86fc16545114)ProAndroidDev · 2y  
Kotlin reified Explained (no more type erasure)  
Kotlin solves the problem of type erasure at runtime by introducing the 'reified' keyword, which preserves type information. This keyword works in conjunction with inline functions, allowing code to be moved to the call site and maintaining type information. This approach enables writing more generic and readable algorithms.  
14
6. 6  
[](https://daily.dev/posts/pdf-viewer-using-coil-5ig3pkeke "PDF Viewer using Coil")  
Article  
![Avatar of pand](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/656c1eb1f1ef4f91936e86fc16545114)ProAndroidDev · 2y  
PDF Viewer using Coil  
Learn how to integrate a PDF viewer into your Android app using Coil. This guide covers creating a custom PDF decoder, adding it to the Coil configuration, and displaying PDF pages in activities or with Jetpack Compose. The approach leverages Coil’s extensibility for handling non-standard image formats efficiently.  
12

[See all ProAndroidDev archives](/sources/pand/best-of)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@graph":[{"@type":"CollectionPage","@id":"https://daily.dev/sources/pand/best-of/2024/07#page","url":"https://daily.dev/sources/pand/best-of/2024/07","name":"Best ProAndroidDev Posts — July 2024","description":"The most upvoted ProAndroidDev posts from July 2024, curated by the daily.dev community.","isPartOf":{"@type":"WebSite","url":"https://daily.dev"}},{"@type":"ItemList","@id":"https://daily.dev/sources/pand/best-of/2024/07#items","numberOfItems":6,"itemListElement":[{"@type":"ListItem","position":1,"url":"https://daily.dev/posts/stop-throwing-exceptions--tjrssfzj0","name":"Stop throwing exceptions!"},{"@type":"ListItem","position":2,"url":"https://daily.dev/posts/convert-your-native-project-to-kotlin-multiplatform-why-when-and-how-xlezo6c4u","name":"Convert Your Native Project to Kotlin Multiplatform: Why, When and How"},{"@type":"ListItem","position":3,"url":"https://daily.dev/posts/kotlin-lazy-vs-lateinit-explained-lj6kzinhv","name":"Kotlin Lazy vs Lateinit Explained"},{"@type":"ListItem","position":4,"url":"https://daily.dev/posts/jetpack-compose-previews-delving-deep-into-their-inner-workings-9bkoh6idr","name":"Jetpack Compose Previews: Delving Deep Into Their Inner Workings"},{"@type":"ListItem","position":5,"url":"https://daily.dev/posts/kotlin-reified-explained-no-more-type-erasure--ayvu3z9cr","name":"Kotlin reified Explained (no more type erasure)"},{"@type":"ListItem","position":6,"url":"https://daily.dev/posts/pdf-viewer-using-coil-5ig3pkeke","name":"PDF Viewer using Coil"}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sources","item":"https://daily.dev/sources"},{"@type":"ListItem","position":3,"name":"ProAndroidDev","item":"https://daily.dev/sources/pand"},{"@type":"ListItem","position":4,"name":"Best of","item":"https://daily.dev/sources/pand/best-of"},{"@type":"ListItem","position":5,"name":"July 2024"}]}]}
```

