I implemented google billing functional in my app. All works, but when i added flag applicationIdSuffix ".debug"
to build.gradle, billing would not work for debug builds, but my tester really needs it.
Is there any option to make it work, not removing the flag?
When you use applicationIdSuffix you actually changing your applicationId. You can't use In-App Purchases with applicationId that is different from applicationId in your application added to Google Play Console.
If you want to debug purchases you need to sign your debug APK with same key that you use for release APK.
Easiest way is to add these values to the gradle.properties file:
com.yourdomain.yourapp.store=PATH_TO_KEYSTORE_FILE
com.yourdomain.yourapp.storepassword=PASSWORD_FOR_KEYSTORE_FILE
com.yourdomain.yourapp.alias=KEYSTORE_ALIAS
com.yourdomain.yourapp.aliaspassword=PASSWORD_FOR_KEYSTORE_ALIAS
And then you can add these lines to your build.gradle:
android {
...
signingConfigs {
debug {
storeFile file(project.property("com.yourdomain.yourapp.store"))
storePassword project.property("com.yourdomain.yourapp.storepassword")
keyAlias project.property("com.yourdomain.yourapp.alias")
keyPassword project.property("com.yourdomain.yourapp.aliaspassword")
}
}
}
Check requirements.
For your tester apk can be debuggable:
signedDebug {
minifyEnabled false
debuggable true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With