I am using the new Google Wallet API
implementation("com.google.android.gms:play-services-pay:16.1.0")
for adding passes to Google Wallet app.
Here is the sample:
import com.google.android.gms.pay.PayClient
private val walletClient: PayClient = Pay.getClient(this)
walletClient.savePassesJwt(passJwtToken, this, addToGoogleWalletRequestCode)
It works correctly, it adds the pass to Google Wallet. If it was added before, it shows a screen that the pass has already been added to Wallet.
But I can't find a way how to check if the pass has already been added to Google Wallet to show the correct text on the button. Because, in the guidelines, there are two types of buttons :
How to check if the pass has already been added?
from the documentation and codelab I only found how to check the pay API available status