Closed Amitpatil215 closed 3 years ago
Hi Amit,
The app key which you generate from your Truecaller developer account, is tied to a particular combination of "package name" and "SHA1 key". You need to maintain different app keys for different build flavours for your app ( debug, release, playstore ).
The problem regarding the build you are facing is because you might be using the app key generated with debug SHA1 and not the release one. Once you generate another app key with the SHA1 corresponding to your release build. It should work as expected.
For further queries please feel free to reach us via our support channel https://developer.truecaller.com/support for a faster and dedicated response.
Regards, Parth
Hey, Parth Thanks for the timely response. Will keep in mind above things while generating app key.
Closing this issue as by changing app key which is registered using play store sha1 worked for me, Thanks!
@Amitpatil215 You created another application in truecaller dashboard for release or updated the existing application? Because my doubt is for release and debug we have the same package name e.g. com.example.android.
Correct me if I am wrong.
Thanks in advance.
Hi @bajajsahil
you need to follow these steps in order to make true caller working for release
e.g. com.example.android
android\app\src\main\AndroidManifest.xml
filecoming to your question
package name remains same for debug
, release
, only you need to take care of SHA1 key for which mode you are building your application. just replace the partner key accordingly
Thanks, @Amitpatil215 for the detailed explanation. I understand that. I just want to put some more light on what I am thinking. Actually, I am using flavors for different environments e.g. prod, qa, dev. And, for them I am using below configuration
flavorDimensions "myapp"
productFlavors {
dev {
dimension "myapp"
applicationIdSuffix ".dev"
versionNameSuffix "-dev"
resValue "string", "app_name", "myappDev"
resValue "string", "truecaller_key", "APP_KEY_HERE_FROM_TRUECALLER_DEV"
}
prod {
dimension "myapp"
resValue "string", "app_name", "myapp"
resValue "string", "truecaller_key", "APP_KEY_HERE_FROM_TRUECALLER_PROD"
}
}
If you see, I have 2 flavors and for both of them I have created 2 apps in truecaller developer console so got 2 different keys. Now, when I am building dev
env it is picking the dev app key, and when I will build the prod
env it will pick the prod app key.
My question is, can we do a similar type of confgurations for different build type like debug
or release
? So, in that case we don't have to change keys again and again.
cc @parth0907
True caller SDK only working on my device in debugging mode with partner key generated using debug SHA1 key.
While I release application its not working.
error: Invalid_Partner_KEY