Questions tagged [xiaomi]

For issues relating to devices of the Xiaomi Inc.

Xiaomi Inc. is a privately owned Chinese electronics and software company headquartered in Beijing. It is the world's 5th largest smartphone maker in 2017.

Since the release of its first smartphone in August 2011, Xiaomi has gained market share in mainland China and expanded into developing a wider range of consumer electronics, including a smart home (IoT) device ecosystem.

294 questions
56
votes
3 answers

Xiaomi Redmi Note 4X "Install via usb" throws "Insert your SIM card"

I'm using a Xiaomi Redmi Note 4X for my Android development. Without "Install via USB" option, Android Studio throws: Installation failed with message INSTALL_CANCELED_BY_USER Solution for this is enabling "Install via USB", but when I try to…
softmarshmallow
  • 1,034
  • 2
  • 16
  • 31
54
votes
19 answers

Android Install on Device Failure [INSTALL_CANCELED_BY_USER]

I'm using Android Studio to connect to run app in my Xiaomi Redmi Note 3G device. My device is already found in the Choose Device Dialog, but I keep getting the [INSTALL_CANCELED_BY_USER] error : Waiting for device. Target device:…
Anthony.S
  • 545
  • 1
  • 4
  • 5
52
votes
4 answers

How can I create an Xiaomi emulator for Android Studio? Or any other way to test app on Xiaomi emulators?

I want to test my Android app for an Xiaomi device. How can I create an emulator for that? I have already tried andyroid, genymotion and bluestack, but I have not found any for Xiaomi devices.
rehan
  • 529
  • 1
  • 4
  • 3
28
votes
28 answers

Android Studio Error "Installation did not succeed. The application could not be installed. Installation failed due to: 'null'"

I am trying to run my app on my Xiaomi RedMi S2 from Android Studio 3.5. It throws an error while installing the app on the phone: Installation did not succeed. The application could not be installed. Installation failed due to: 'null'
23
votes
0 answers

how to enable "show on lock screen" permission programmatically on xiaomi mi phone

How can I enable "show on lock screen" permission on Xiaomi phones? Is it possible by programmatically or add custom permission in manifest or still somehow? Is it possible to know whether this permission has already been granted or not?
s_klepcha
  • 379
  • 3
  • 12
13
votes
6 answers

Activity never becomes requested state "[DESTROYED, RESUMED, STARTED, CREATED]" (last lifecycle transition = "PRE_ON_CREATE")

This is not a duplicate question. I have already looked at similar questions. I have added the questions I have referred to at the last. My problem is that the test executes, but I have to open the app manually for every test. You can see that I…
Abhimanyu
  • 11,351
  • 7
  • 51
  • 121
12
votes
2 answers

RemoteServiceException when notification style is applied on Xiaomi phones with Android 11

Without any visible reason, Xiaomi phones with Android 11 started to appear in crashlytics logs. Something happens with notifications. We don't do anything too specific and everything works fine on other Android 11 devices. I wasn't able to…
12
votes
4 answers

NullPointerException: int android.widget.Editor$SelectionModifierCursorController.getMinTouchOffset()

It's a very strange Xiaomi device's OS exception. Even if I do have logs available from Fabric, the stack trace doesn't refer any of my code. A crash details are below as reported in crashalytics(Fabric), 21K crashes All crashes on Xiaomi…
Chitrang
  • 5,097
  • 1
  • 35
  • 58
12
votes
2 answers

Fatal Exception: android.view.WindowManager$BadTokenException Unable to add window -- token is not valid; is your activity running?

I know this question is discussed several time but believe me i never got any answer working. In my Main Activity i have used few Dialog to inform user about some operations but i get this specific error mostly (specifically 96%) on Xiaomi…
Santosh Patange
  • 141
  • 1
  • 6
11
votes
1 answer

Opening miui battery saver for specific apps

I am working on VoIP calling applications and calls are getting missed which are sent over FCM when battery saver is on on MIUI. This is happening very frequently. I want user to open Battery saver activity for my own app and give no restriction for…
Ifta
  • 1,536
  • 18
  • 25
11
votes
2 answers

How to fix Xiaomi specific RemoteServiceException with notification icon?

We have a lot of crashes specific to Xiaomi phones on Android 6 and 7: Fatal Exception: android.app.RemoteServiceException: Bad notification posted from package x.y.z: Couldn't create icon: StatusBarIcon(icon=Icon(typ=RESOURCE pkg=x.y.z…
Herrbert74
  • 2,578
  • 31
  • 51
10
votes
3 answers

Crash with email in EditText TextInput on Xiaomi devices running android 10

Recently I got a crash in google play console. java.lang.NullPointerException: at android.widget.Editor$SelectionModifierCursorController.access$300 (Editor.java:6696) at android.widget.Editor.getEmailPopupWindow (Editor.java:1469) at…
Anrimian
  • 4,257
  • 4
  • 22
  • 30
10
votes
1 answer

Background Services are restricted in Xiaomi and Oppo

We are developing an app With MQTT running in a foreground service. The problem is on Xiaomi Redmi Note 7, the service gets killed after we kill the app but on other brands It works fine. I did not test the app on Oppo and Vivo but as I searched…
Behrad Ranjbar
  • 261
  • 2
  • 13
9
votes
2 answers

RemoteServiceException crashing my app on MIUI 11

I started receiving a weird crashes from MIUI 11 devices running Android 11 (so far only Mi 10 and Mi 10 lite 5G). I think this is a platform issue and nothing in my app as it's super specific to Xiaomi Android 11. Fatal Exception:…
crysxd
  • 3,177
  • 20
  • 32
9
votes
0 answers

android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS on Xiaomi device

I couldn't really find proper solution for this problem. When I tried to run instrumented test on physical device (Xiaomi Mi Mix 2) I got an error that I need android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS to run it. But you can't really grant…
buszi
  • 146
  • 1
  • 6
1
2 3
19 20