1

所有支付应用程序都已在两部手机中可用,但我的列表大小为零:

private fun isUPIApp(): Boolean {
        val uri = Uri.parse("upi://pay").buildUpon().build()
        val upiPayIntent = Intent(Intent.ACTION_VIEW)
        upiPayIntent.data = uri

if(packageManager.queryIntentActivities(upiPayIntent, 0).size > 0)
        return true
else
       return false

    }
4

0 回答 0