Select to view content in your preferred language

Compression of a bitmap is slow

368
1
01-27-2025 09:58 AM
dev4567
Emerging Contributor

`StrictMode` policy indicates that `LocationDisplay` loads a bitmap in the Main thread and it's slow:

`android.os.strictmode.CustomViolation: Compression of a bitmap is slow`

dev4567_0-1738000533061.png

the policy is being setup in the Application by simply:

StrictMode.setThreadPolicy(
Builder()
.detectAll()
.penaltyLog()
.build()
)
Tags (2)
0 Kudos
1 Reply
Shubham_Sharma
Esri Contributor

Thank you @dev4567 for reaching out regarding this issue. I can confirm this would be a warning displayed when constructing the LocationDisplay with StrictMode enabled. We have logged this issue and will provide a fix in a future release.

Meanwhile, if you're looking for a way to resolve the warning currently, I would recommend creating the LocationDisplay while in a coroutine scope and not on the main thread.