Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/204.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android UPI隐式意图选择器在redmi设备上不工作_Android_Android Intent_Android Intent Chooser_Upi - Fatal编程技术网

Android UPI隐式意图选择器在redmi设备上不工作

Android UPI隐式意图选择器在redmi设备上不工作,android,android-intent,android-intent-chooser,upi,Android,Android Intent,Android Intent Chooser,Upi,这是我的upi implicit intent代码,它为用户提供了选择多个upi支持的应用程序的选项,该代码在我测试过的所有设备以及除Redmi设备之外的所有版本上都运行良好。 我的代码不适用于任何Redmi Note 5 Pro 这是我的密码: String UPI = "upi://pay?pa=abcupi@xxxxbank&pn=:ABC%20COMPANY%20LTD&tr="+dateTime+"&am="+amount+"&tn=XXXXXX UPI

这是我的upi implicit intent代码,它为用户提供了选择多个upi支持的应用程序的选项,该代码在我测试过的所有设备以及除Redmi设备之外的所有版本上都运行良好。 我的代码不适用于任何Redmi Note 5 Pro

这是我的密码:

String UPI = "upi://pay?pa=abcupi@xxxxbank&pn=:ABC%20COMPANY%20LTD&tr="+dateTime+"&am="+amount+"&tn=XXXXXX UPI Payment";
        Intent intent = new Intent();
        intent.setAction(Intent.ACTION_VIEW);
        intent.setData(Uri.parse(UPI));
        Intent chooser = Intent.createChooser(intent, "UPI Transfer With");
        startActivityForResult(chooser, UPI_CHOOSER, null);

选择器未仅在Redmi设备上打开受upi支持的应用程序。我已经在3个不同的Redmi note 5 pro上进行了测试,但都不起作用。它不会打开选择器来显示upi支持的应用程序

以下是我为Redmi Note 5 Pro解决问题的方法:

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(UPI));
if (intent.resolveActivity(getPackageManager()) != null) {
    startActivity(intent);
} else {
    Toast.makeText(this, "No application available to handle this request!", Toast.LENGTH_SHORT).show();
}

以下是我为Redmi Note 5 Pro解决此问题的方法:

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(UPI));
if (intent.resolveActivity(getPackageManager()) != null) {
    startActivity(intent);
} else {
    Toast.makeText(this, "No application available to handle this request!", Toast.LENGTH_SHORT).show();
}

我完全不知道upi,但您可能需要注册您的签名密钥。请记住,您有适当的开发和发布证书。@rekire我知道,在这种情况下,我无法帮助您。祝你好运我完全不知道upi,但您可能需要注册您的签名密钥。请记住,您有适当的开发和发布证书。@rekire我知道,在这种情况下,我无法帮助您。祝你好运