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.

219 questions
53
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
  • 535
  • 1
  • 4
  • 5
33
votes
2 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
  • 725
  • 2
  • 10
  • 28
32
votes
3 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
  • 329
  • 1
  • 3
  • 3
16
votes
0 answers

Enabled "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
  • 310
  • 2
  • 11
14
votes
14 answers

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

I am trying to run my app on 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' REAL DEVICE: XIAOMI REDMI S2
Syed Arsalan Kazmi
  • 656
  • 1
  • 6
  • 16
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,188
  • 26
  • 47
10
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
  • 121
  • 1
  • 6
9
votes
2 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
  • 3,451
  • 4
  • 18
  • 27
9
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
  • 4,840
  • 1
  • 31
  • 49
8
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…
8
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
  • 2,750
  • 14
  • 29
8
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
  • 181
  • 1
  • 10
8
votes
4 answers

How to open MIUI notifications settings?

I'm looking for a way to open in MIUI App Notification Settings screen directly from my application. Just like this: Settings -> Installed apps -> MY_APP -> Notifications. How to construct intent for open this screen? That's not the same like…
karmil32
  • 133
  • 6
8
votes
2 answers

BroadcastReceiver stop working on Xiaomi after couple of hours

I'm using Awareness API for my project and receiving actions via BroadcastReceiver. This is the question with my code: link. The problem is that everything works fine in all android version except in Xiaomi devices. Where BroadcastReceiver not…
Dim
  • 3,529
  • 10
  • 67
  • 119
7
votes
1 answer

How to enable 'show in lock screen' permission in andriod

This question is already asked twice but has no answer Apps installed on Xiaomi devices need a permission called 'show on lock screen' in order to allow activity to start if the device is locked How can I prompt the user to enable this permission…
Ahmed Rajab
  • 429
  • 2
  • 8
  • 24
1
2 3
14 15