New answers tagged android
Score of 0
0
votes
Cross-compiling of C code for Android
The NDK gives you a fairly traditional command-line toolchain, with compiler, linker, librarian, headers and so on. It's available for Linux, Windows or macOS development hosts. It is not necessary to ...
Score of 0
0
votes
My Android app is reported to have a virus
Its normal.
You can choose go to shop phone for flash firmware by cable adaptable or order new samsung galaxy s22 for example with new android block bad app
Score of 0
0
votes
Android Studio Otter 2 Feature Drop | 2025.2.2 Lost "Android View"
Its a known bug. Temporary Solution is:
Don't delete entire .idea directory, delete only .idea/misc.xml, its temporarily restores the Android view.
set isMinifyEnabled = false
across your build....
Score of 0
0
votes
Why does deleting an item from keyboard clipboard history not remove it from paste (Android/iOS)?
For iOS, read up on the UIPasteboard and its services. The iOS pasteboard contains multiple entries for different underlying types, e.g. text, images (png), URLs, et cetera.
Without knowing anything ...
Score of 0
0
votes
Change the System Brightness Programmatically
This is very similar to the kotlin answer by rtsketo, but this creates a stand-alone function instead of an extension function.
/**
* Set brightness of the screen (window) of this app.
*
* @param ...
Score of 0
0
votes
Jetpack compose - How to do popBackStack with arguments?
My solution for popBack with arguments
Create a shared ViewModel once at the NavHost level and pass the same instance to nested navigation graphs.
@HiltViewModel
class NavHostViewModel @Inject ...
Score of 0
0
votes
MAUI Android target to version 16
These are two separate questions.
When I connect the phone to my laptop, Visual Studio doesn't show any local Android phone.
This has nothing to do with the targeted android framework. If you have USB ...
Score of 1
1
vote
Why does deleting an item from keyboard clipboard history not remove it from paste (Android/iOS)?
There is no name for whatever your keyboard is doing, because it's not an OS concept. There is no "Android keyboard". The keyboard is an app, and it can do anything a normal app can do. An ...
Score of 0
0
votes
How to fix android SDK file not found
I know its an old thread but, I had the same issue, F-Secure interfered grrrrrr with my setup.
Deinstal and reinstall via Android Studio did not help.
So I downloaded the platform tools https://...
Score of -1
-1
votes
Cannot add an event to the calendar in android
13 years later and this still happens... In my case all lights were green and my phone's google account was properly linked and everything, but I had to go deep in the settings : click the account ...
Score of 0
0
votes
Why do I suddenly get "Execution failed for task :app:configureCMakeDebug[arm64-v8a]" while building?
**Please try this it will be helfull solution.
Environment:**
React Native: 20.1.0
Java: 17.0.20
Gradle: 9.3.1
macOS: 26.5.2
Solution
The Gradle daemon was configured with:
toolchainVersion=25
while ...
Score of 1
1
vote
adb over Wi-Fi (Android 11+) on Windows: how to keep a fixed port or connect automatically?
Building upon previous answers, heres the solution that worked best for me without installing additional software.
Go to developer options in settings
Click "Quick settings developer tiles"...
Score of 0
0
votes
Zebra SDK execption RFID_API_COMMAND_TIMEOUT when trying to reconnect
The RFID_API_COMMAND_TIMEOUT error may also be caused by Zebra DataWedge working in background. Disabling (reconfiguring) DataWedge may require Android restart
Score of 0
0
votes
Firebase Phone Auth fails with error 17028 "Invalid app info in play_integrity_token" despite correctly registered SHA fingerprints
Mainly problem is old google-services.json, after adding new SHA-256, must re-download and rebuild app.
Also check Play Integrity API is properly Enabled in Google Cloud Console. And confirm exact &...
Score of 0
0
votes
Draw formatted text with libgdx
Years later, we have the TextraTypist library (https://github.com/tommyettinger/textratypist), which does a lot of stuff (probably more than you need) including italics/bold and scaling.
Score of 0
0
votes
Accepted
Capacitor+Vite: when including Filesystem plugin, get warning “Unable to read file at path public/plugins”, then fails on import
This all came from my misunderstanding of Vite’s “project root” and its input and output directory settings, and the webDir setting in capacitor.config.json. After I fixed those two as described below,...
Score of 0
0
votes
Scaffold vs Surface
Difference between Scaffold and Surface?
Scaffold: a structural screen-layout for Material UI. (e.g.: TopBar, BottomBar, FAB, Snackbar, Content insets/padding)
Surface: a visual/theming container. (e....
Score of 0
0
votes
How to get a result from fragment using Navigation Architecture Component?
You can call:
getArguments().getString("yourKeyName")
in the receiving fragment and save it to the appropriate variable.
Score of 2
2
votes
Accepted
Compose InputTransformation for Custom Keypad Validation
If I understand correctly, the following are your requirements:
You need the buffer of entered digits to be the source of truth, otherwise you cannot reliably add/remove digits.
You need a way to ...
Score of 2
2
votes
.NET Maui returns png header when expecting BMP
Ok following Nulls Response
i am adding this to the code. This should strip out the IDAT's and get what I hope this is just RGB data. This is just the outline so far, I know I need to add in BMP ...
Score of 0
0
votes
registerReceiver error hint " Must be one or more of type"
To those who are looking for the answer.
You must use the androidx.core.core instead of androidx.core.ktx
Score of 6
6
votes
.NET Maui returns png header when expecting BMP
Dissect the C# code
There are some lines in the code which have no effect to the result.
Let's remove the "noises" from the original code and focus on the image part.
This line tells MAUI ...
Score of 2
2
votes
Compose InputTransformation for Custom Keypad Validation
InputTransformation is a valid place to accept/reject edits. Just think about feedback- if I hit an invalid key and it just disappears, that doesn't feel right. Make sure to update some state to ...
Score of 1
1
vote
Accepted
MediaPlayer routes USAGE_MEDIA to the earpiece on moto g stylus 5G (Android 15) — every routing API returns success
Self answer for posterity.
Root cause
MediaPlayer.setPreferredDevice() is silently ignored on this device (and, as it turns out, on some other Android devices with quirky audio HALs) unless an ...
Score of 6
6
votes
Accepted
Cannot access 'RowColumnParentData.weight' - internal in file - Compose Foundation + Kotlin 2.2.10
The reason why you're getting that error is because you are importing an internal weight member from the RowColumnImpl.kt file that happens to be located in the same package:
// From Compose ...
Score of 0
0
votes
Android application Google/Firebase login integration not working
For me, the account picker was not opening, and yours is, so the following may or may not solve your issue.
If you go to the app signing page, you will see two keys: classical key and post quantum key....
Score of 0
0
votes
Android build failed for kotlin with ksp
Thanks @tyg
As per @tyg mention in the post I have update my code also providing another solution for another ksp related issue as below.
As explicit mention kotlin lib in root level build.gradle ...
Score of 3
3
votes
403 PERMISSION_DENIED: Firebase AI Logic has been deactivated in this project. To resume using Firebase AI Logic, you must enforce Firebase App Check
This is part of a change introduced for Firebase AI Logic in August 2026.
Projects with no recent usage of Firebase AI Logic are marked as "inactive" and will get this 403 error when trying ...
Score of 0
0
votes
Jetpack Compose (KMP) WindowInsets.navigationBars returns 0.dp on first composition and updates later — why does padding recompute twice?
This is expected behavior in Jetpack Compose due to how the lifecycle and Recomposition work.
When setContent is called, the Composable hierarchy is already built, but not yet attached to the window. ...
Score of 1
1
vote
Accepted
Flutter Google Sign-In works in release APK but fails in Google Play Internal Testing with [16] Account reauth failed
Two things fixed it for us, after ruling out the usual causes (SHA-1 mismatch, wrong package name, wrong serverClientId) one by one:
Add your test Google account to the OAuth consent screen's Test ...
Score of 5
5
votes
Android build failed for kotlin with ksp
You try to use the Kotlin Android Plugin org.jetbrains.kotlin.android with AGP 9, which is incompatible.
AGP 9 has Kotlin support now built-in, so you probably doesn't even need a replacement, just ...
Score of 0
0
votes
What is the best way to handle adaptive layouts in Compose Multiplatform?
I was facing a similar issue recently while working with Kotlin Multiplatform and Compose Multiplatform, especially when trying to handle different screen sizes, tablets, and orientation changes ...
Score of 0
0
votes
my UI functions randomly stopped working when I created a new project
Man, both these answers are really good.
I genuinely wish I could accept multable answers.
So the issue with my original code was that UI() WAS in a Column.
Because I created it to have ALL the ui ...
Score of 2
2
votes
my UI functions randomly stopped working when I created a new project
The issue isn’t that Text() is inside a function. You’re adding multiple composables without a parent layout, so they can overlap. Try putting UI() and Text() inside a Column; Greeting() works because ...
Score of 2
2
votes
Accepted
my UI functions randomly stopped working when I created a new project
You need to put the calls inside the Scaffold. That's why the Greeting shows up- it's inside the Scaffold. The Scaffold takes the entire screen.
Score of 1
1
vote
Accepted
How StateFlow.collectAsState() works
A Flow in general is an observable stream of values. That is compatible to the concept of Compose State, which represents a value that can be observed for changes. collectAsState1 simply converts a ...
Score of 0
0
votes
How StateFlow.collectAsState() works
It depends on how you update it. If you just update the list by doing something like list.add. It won't update. So for your example, something like if you were using MutableList instead of List then ...
Score of 0
0
votes
Android 16 Photo Picker: Image remains pre-selected in "Limited Access" after app reinstall, but the app cannot access it
This is expected Android 16 behavior: after reinstall, the old app’s URI grants are no longer valid, even if Photo Picker shows the images pre-selected.
Treat the pre-selection as UI state, not as ...
Score of 0
0
votes
AndroidX's Edge to Edge shows an Action Bar - How to hide it?
In my case, I had to call EdgeToEdge.enable after setTheme in onCreate().
Score of 2
2
votes
Set size of content area in an AlertDialog
AlertDialog isn't meant to be used this way. The best thing you can do is stop fighting the system and let it display the size it thinks it needs to display. It's design is not to take a fixed ...
Score of 1
1
vote
Budget app problems
The blank screen is most likely unrelated to the balance calculation itself. Make sure each Activity loads its layout inside onCreate():
@Override
protected void onCreate(Bundle savedInstanceState) {
...
Score of 0
0
votes
How to implement a Connected Button Group in Jetpack Compose Material 3?
You probably want to use a ButtonGroup to achieve this.
Code
@Composable
fun GenderSelection() {
var selectedGender by remember {
mutableStateOf("male")
}
ButtonGroup(
...
Score of 2
2
votes
Accepted
Openrewrite UpgradeToAndroidSDK35 execution fails due to method rewrite() in build.gradle (:app) not found
That recipe module is only available to customers of Moderne, through the Moderne CLI.
https://docs.openrewrite.org/reference/moderne-recipes
https://docs.openrewrite.org/licensing/openrewrite-...
Score of 3
3
votes
BLE requestConnectionPriority(HIGH) only helps one of two GATT links
Note that all Bluetooth controller chips on the market I'm aware of can only handle one radio channel at any given time. This means that it needs to time multiplex your two connections onto the same ...
Score of 0
0
votes
Foreground service notification takes a few seconds to appear/show up
FYI in Android Studio the help for this code:
androidx.core.app.NotificationCompat.Builder
public @NonNull NotificationCompat.Builder setForegroundServiceBehavior(
int behavior
)
is:
Specify a ...
Score of 0
0
votes
How to take screenshot in background(Android App) without interruption and less user interaction
Android doesn't provide a supported way to take silent background screenshots without user consent. If some apps can, they're likely using enterprise or OEM-specific features that aren't available to ...
Score of 0
0
votes
How to take screenshot in background(Android App) without interruption and less user interaction
If you have the Accessibility permission you can use AccessibilityService.takeScreenshot() that will take screenshot.
Score of 0
0
votes
javax.imageio.IIOException: Missing Huffman code table entry while Adding text to an jpg image
According to Sources of Tables (JPEG Metadata Format Specification and Usage Notes) one needs to use compression mode of MODE_COPY_FROM_METADATA:
If there is an ImageWriteParam and the compression ...
Score of 0
0
votes
Show android notification action buttons expanded by default
Very late reply but maybe it's useful to someone. For me it worked to change the NotificationCompat category specifically for Samsung devices:
val category = if (android.os.Build.MANUFACTURER.equals(&...
Score of 0
0
votes
How to restore a previous UI state with StateFlow?
Considering the way your UiState is modeled, then the best way would be to have it in your view model as another field private val uiStateHistory = mutableListOf<UiState>
class MyViewModel : ...
Top 50 recent answers are included
Related Tags
android × 1414421java × 280799
android-studio × 67779
kotlin × 59164
android-layout × 56953
android-fragments × 43939
firebase × 37171
listview × 34621
xml × 31275
android-intent × 29819
sqlite × 29099
android-recyclerview × 28057
android-activity × 27943
json × 25279
eclipse × 24705
flutter × 23559
ios × 22214
gradle × 21984
cordova × 21539
react-native × 19350
google-maps × 18506
javascript × 17783
firebase-realtime-database × 15698
android-listview × 14988
webview × 14981