Category "android"

How can I check internet connection in Android Q?

Before Android Q all you had to do is use the NetworkUtils class. But this class was deprecated in API 29. I've been searching for an alternative, and I couldn'

Get Date of phone activation

I'm trying to get the date (in millis or Date or Calendar) of when the phone was activated. By activated I mean the first time it was turned on or the first tur

Baseline profiles aren't supported on this device version

I configured a benchmark module and created a baseline profile for the project and saved it in the app according to the instructions here https://developer.andr

How can I use an icon instead of a title in the Android Toolbar?

I'm using the Toolbar (instead of ActionBar) via AppCompat. I'd like to replace the Toolbar's title (the app/actity name) with an icon, but I don't see how. My

Changing only 1 color for the text in arraylist connected to firebase

I've managed to only change the color for the whole array list, trying to figure out a way to get the array's position and set different color for each row, thi

Get specific drawable from state list drawable

I have a state list drawable, and i want to get a specific drawable from the state list drawable: <?xml version="1.0" encoding="utf-8"?> <selector xml

Flutter :The shrinker may have failed to optimize the Java bytecode

I'm trying to integrate cloud firestore to and android app but all I get is this error every single time Launching lib/main.dart on Android SDK built for x86 i

SDKmanager : Warning: Could not create setting. java.lang.IllegalArgumentException

Im trying to install androidSDK on my Ubuntu but when i try to run the SDK manager on the tools/bin/sdkmanager folder i get this message: My Ubuntu was install

How can I print in android from any activity

I'm trying to build an app that would print via Bluetooth to a thermal printer. I've come across a problem: the activity where the printing occurs gets destroye

ADB server version (36) doesn't match this client (39); killing [duplicate]

After installing the Android O preview on a test device my ADB stopped working and started giving me this error. adb server version (36) doesn

Android Jetpack DataStore Fatal Exception: java.io.IOException

Im using datastore in one of my android library and I get crashes from google vitals that I cant reproduce and should not be possible... I create my datastore a

How do I return function value in lifecycle-aware coroutine scope in Android?

fun returnValue(): Int { viewModelScope.launch { return 1 // Something like this } } I want to return some value in a viewModelScope like the

how to use Coroutine in kotlin to call a function every second

i just created an app where my function getdata() call every second to fetch new data from server and updateui() function will update view in UI i don't use any

MAUI Blazor Android Sql Connection

I am experimenting with Maui Blazor. I want to connect my application with an SQL server database. Therefore I used a simple Sql Connection String. When I test

Android gridview wont fill screen - only small with scroll

My problem is the gridView is only about 1 row high with a scroll bar and I cannot get it to fill the screen. You have to scroll down to see the other rows. I d

continue jacoco code coverage report after fail test case

Code coverage report not generated when Test case failed in android studio using Jacoco plugin.How to skip failed test case and generate code coverage report.

wrong day in Android Material DatePicker

i'm trying to get te selected date from DatePicker but always i have one day less than the selected For example, if I select 14/2/2022 i obtain 13/2/2022 and if

adb command not found

I need to run an adb forward command before I could use the ezkeyboard application which allows user to type on the phone using browser. When I run adb forwar

Alert.alert not working in React native iOS, but perfectly fine in Android

Please check the code , import { Alert, } from 'react-native'; checkForSendingOtp = () => { let hash = 'aBcDeGgd'; Platform.OS === 'android'

How to avoid multiple triggers on EditText while user is typing?

I use the following code to perform search when user types in an EditText : EditText queryView = (EditText) findViewById(R.id.querybox); queryView.addTextChan