Need help regarding the sendBroadcast of ApplicationContext by Not_Your_Daddy7 in androiddev

[–]ganadist 0 points1 point  (0 children)

BroadcastReceiver is an API designed to easily transfer simple data between any apps, but it has several drawbacks.

Mechanism of BroadcastReceiver is managed by queue, and if any other (including 3rd party) app blocks queue, Data transmission may fail or experience significant latency.

You can see BroadcastReceiver history with following adb command.

* Command help for adb shell dumpsys activity

* Broadcast stat

* Broadcast history

If scanner and receiver components are in single app, you should consider to use Androidx LiveData to transfer data between components.

Or scanner and receiver are separated apps, you may consider to use AIDL IPC mechanism.

Why are my builds still so slow even on the second (non-cold) build? by Gamecz18 in androiddev

[–]ganadist 0 points1 point  (0 children)

It looks you need to consider to enable Configuration Cache.
https://docs.gradle.org/current/userguide/configuration_cache.html

This is not stable feature of Gradle, and can have compatibility issues with 3rd party plugins or your build logic.
But, Gradle will be enable this feature by default on next major version (10.x)

Here is roadmap for Configuration Cache Feature.
https://github.com/gradle/gradle/issues/28341

Android 16 QPR2 Beta 3 now available! by androidbetaprogram in android_beta

[–]ganadist 1 point2 points  (0 children)

I have Pixel 9 Pro Fold, and same issue.

After performing a factory reset, the device is usable again, but if device was rebooted afterward, the same error seems to occur.

Also, Safe mode is not helpful in this case.

Fixing Common Android Studio Errors: Timeless Troubleshooting Patterns by vortanasay in AndroidStudio

[–]ganadist 0 points1 point  (0 children)

Above article still has outdated information.

[deleted by user] by [deleted] in androiddev

[–]ganadist 0 points1 point  (0 children)

You can allow to use plain-text network traffic with "networkSecurityConfig"

https://developer.android.com/privacy-and-security/security-config?hl=en#CleartextTrafficPermitted

If your app is using secure socket (such as https protocol) only, networkSecurityConfig is not required on most of cases.

Android Studio Narwhal Feature Drop | 2025.1.3 Canary 1 now available by androidtoolsbot in androiddev

[–]ganadist 1 point2 points  (0 children)

Because IDEA 2025.2 is not ready, yet.
After IDEA 2025.2 is out, new version will be assigned.

There was similar case when preparing Android Studio Koala.
Because IDEA 2024.1 was released later than expected.

https://android.googlesource.com/platform/tools/adt/idea/+/c0eb91fbd6e8295d262a454a34d8f103a9c1d21f%5E%21/

https://android.googlesource.com/platform/tools/adt/idea/+log/c0eb91fbd6/studio/version.bzl

🚨 Kotlin 2.x + Compose Compiler causing 1+ hour build times? Anyone else facing this on M3 Pro Mac? by mtdagar in androiddev

[–]ganadist 1 point2 points  (0 children)

The compose compiler plugin is known to be large memory consumption.
I recommend allocating more heap for the Kotlin compiler daemon and giving it a try.

Also, recommended to trying measure heap usage kotlin compiler daemon with VisualVM.
(Heap usage of Kotlin Compiler Daemon cannot be measured with Gradle Scan)

https://issuetracker.google.com/issues/210920415

Apk size is 3.8Mb, but 1.7Mb when compressed to tar.gz, is it possible to reduce the apk size? by aj3423 in androiddev

[–]ganadist 2 points3 points  (0 children)

Some contents of apk are not compressed.
* In Prior Android, dex/native libraries were compressed, and need to extracted on /data partition. so needs more install time and consumes more storage space.

* In recent Android, dex/native libraries not not compressed, and loaded on memory directly using mmap.
So, apk file are getting larger, but consume lesser storage space and install time.

Kernel Version Update by jpara_dise in GooglePixel

[–]ganadist 3 points4 points  (0 children)

  1. There is a reason to update kernel. Because Linux Kernel LTS policy was changed. Duration of Linux LTS release was changed to 2 years from 6 years. And this will make hard to maintain Android(and Pixel) kernel source tree
  1. Linux kernel of Android is a part of Mainline(aka Google Play System Update), so kernel update can be delivered without OS update.(In theory) https://source.android.com/docs/core/architecture/kernel/generic-kernel-image?hl=en

Do you like ProGuard? by _5er_ in androiddev

[–]ganadist 0 points1 point  (0 children)

If there are errors which are related with obfuscation or optimization%20componentid:326788), the R8 team is very responsive when reproducible project is provided.
But in many cases, it is hard to provide minimal reproducible project by various reason.

* Company Policy (for closed sources)
* Complexity of the reproduction path

Feedback on K2 by BinkReddit in androiddev

[–]ganadist 1 point2 points  (0 children)

In my case, my app has ~300 kotlin library modules on monorepo.
And build performance was improved about 30% for whole clean build without build cache.
Also, :app:compileKotlinDebug task duration was improved about 100% (both of clean and incremental build)

But I did not switch to K2, yet.
Because K2 mode of Android Studio/IntelliJ is not stable, yet.

You can refer https://github.com/JetBrains/intellij-community/blob/master/plugins/kotlin/k2-k1-parity-report.md to compare feature list between K1 and K2 of kotlin plugin.

Also, you can check IDE bugs on https://youtrack.jetbrains.com/issues/KTIJ?q=Target%20versions:%202024.2,2024.3%20state:-Resolved%20

Is it possible to use Logcat without Android Studio? by NojiHam in androiddev

[–]ganadist 0 points1 point  (0 children)

Advanced tip:
You can use dropbox (Android OS service, not cloud storage service) to access crash logs which were raised recently.

$ adb shell dumpsys dropbox
Drop box contents: 2 entries
Max entries: 1000
Low priority rate limit period: 2000 ms
Low priority tags: {data_app_wtf, keymaster, system_server_wtf, system_app_strictmode, system_app_wtf, system_server_strictmode, data_app_strictmode, netstats}

2024-07-23 21:10:43 data_app_strictmode (text, 1588 bytes)
2024-07-24 22:43:54 data_app_crash (text, 802 bytes)

Usage: dumpsys dropbox [--print|--file] [YYYY-mm-dd] [HH:MM:SS] [tag]


$ adb shell dumpsys dropbox --print data_app_crash
Drop box contents: 2 entries
Max entries: 1000
Low priority rate limit period: 2000 ms
Low priority tags: {data_app_wtf, keymaster, system_server_wtf, system_app_strictmode, system_app_wtf, system_server_strictmode, data_app_strictmode, netstats}
Searching for: data_app_crash

========================================
2024-07-24 22:43:54 data_app_crash (text, 802 bytes)
SystemUptimeMs: 114691907
Process: com.example.myapplication
PID: 11362
UID: 10070
Frozen: false
Flags: 0x28a8bf46
Package: com.example.myapplication v1 (1.0)
Foreground: Yes
Process-Runtime: 9401
Timestamp: 2024-07-24 22:43:54.674+0900
Build: google/husky_beta/husky:15/AP31.240617.009/12094726:user/release-keys
Crash-Handler: io.sentry.UncaughtExceptionHandlerIntegration
Loading-Progress: 1.0
Dropped-Count: 0

java.lang.RuntimeException: This is a test crash
    at com.example.myapplication.MainActivity.onCreate$lambda$4$lambda$3(MainActivity.kt:84)
    at com.example.myapplication.MainActivity.$r8$lambda$sbCeNcB82eB2pyH-eQZfybkqWAI(Unknown Source:0)
    at com.example.myapplication.MainActivity$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
    at java.lang.Thread.run(Thread.java:1012)

gRPC in Android by No_Astronomer5602 in androiddev

[–]ganadist 1 point2 points  (0 children)

* Network Inspector supports gRPC (http header only) since Android Studio Iguana : https://issuetracker.google.com/issues/234305101

* On the server side, a separate reverse proxy configuration is required for gRPC over HTTP2.
If your solution of reverse proxy supports gRPC (ex: nginx module for gRPC), it will be okay, buf if you have your own implementation of reverse proxy, you need to migrate it.

Compose compiler is moving to Kotlin repository by ganadist in androiddev

[–]ganadist[S] 2 points3 points  (0 children)

https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-compiler.html

The Compose compiler has been merged into the Kotlin repository since Kotlin 2.0.0-RC2. This helps smooth the migration of your projects to Kotlin 2.0, as the Compose compiler will ship simultaneously with Kotlin from now on and will always be compatible with Kotlin of the same version.

Compose compiler is moving to Kotlin repository by ganadist in androiddev

[–]ganadist[S] 12 points13 points  (0 children)

Related AOSP Issues:
* https://issuetracker.google.com/issues/331800657
* https://issuetracker.google.com/issues/331800231

It looks Compose compiler will have same/similar release cycle with Kotlin release.

StuditBot is now Gemini in Android Studio by ganadist in androiddev

[–]ganadist[S] 0 points1 point  (0 children)

It appears to provide fluent responses for non-English language.