As far as I know, in android \"release build\" is signed APK. How to check it from code or does Eclipse has some kinda of secret defines?
I need thi
Solution in Kotlin that I'm using at the moment:
@SuppressLint("PackageManagerGetSignatures")
@Suppress("DEPRECATION")
fun isSigned(context: Context?): Boolean {
return (context?.packageManager?.getPackageInfo(context.packageName, PackageManager.GET_SIGNATURES)?.signatures?.firstOrNull()?.toByteArray()
?.let {
return@let CertificateFactory.getInstance("X.509").generateCertificate(ByteArrayInputStream(it))
} as? X509Certificate)
?.issuerDN
?.name
?.contains("O=Android", ignoreCase = false) ?: true
}
that way I can still SIGN in debug and those will be reported to Crashlytics (example, for the QA process)