Skip to content

Commit

Permalink
Revert to min SDK 19
Browse files Browse the repository at this point in the history
  • Loading branch information
ltrudu committed Nov 7, 2022
1 parent f916c78 commit c34c727
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ private static void registerCurrentApplication(Context context, Uri serviceIdent
// You can copy/paste this snippet if you want to provide your own
// certificate
// TODO: use the following code snippet to extract your custom certificate if necessary
final Signature[] arrSignatures = packageInfo.signingInfo.getApkContentsSigners();
Signature[] arrSignatures = null;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.P) {
arrSignatures = packageInfo.signingInfo.getApkContentsSigners();
}
if(arrSignatures == null || arrSignatures.length == 0)
{
if(callbackInterface != null)
Expand All @@ -125,7 +128,10 @@ private static void registerCurrentApplication(Context context, Uri serviceIdent
final byte[] rawCert = sig.toByteArray();

// Get the certificate as a base64 string
String encoded = Base64.getEncoder().encodeToString(rawCert);
String encoded = null;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
encoded = Base64.getEncoder().encodeToString(rawCert);
}

profileData =
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
Expand Down

0 comments on commit c34c727

Please sign in to comment.