has Google Pay Java
fun hasGooglePayJava(context: Context, supportedNetworks: List<PaymentMethodType>, authenticationMethods: List<GooglePayConfig.AuthenticationMethodType>, existingPaymentMethodRequired: Boolean, areCreditCardsAllowed: Boolean, arePrepaidCardsAllowed: Boolean, isTesting: Boolean): LiveData<Boolean>
As the Kotlin version uses coroutines because the Google's method to check availability is asynchronous, this is a workaround of the same method but for Java developers.
Return
A LiveData object which is true if Google Pay is available on the device and false if it is unavailable.
Parameters
context
Android context
supported Networks
Supported card acquirers
authentication Methods
Supported authentication methods (e.g. PAN_ONLY)
existing Payment Method Required
If user has to have a payment method already added to Google Wallet (default is false)
are Credit Cards Allowed
If credit cards are allowed (default is true)
are Prepaid Cards Allowed
If prepaid cards are allowed (default is true)
is Testing
True if running on sandbox, false otherwise. (default is false)