2

I am facing a peculiar issue. Our app used to use the fingerprint sdk from Samsung for fingerprint authentication. Now from android M android came out with its fingerprint API's. So we moved to android libraries for all devices >= android M. However for samsung devices < Android.M we still use the mpass sdk for legacy compatibility. In one of the classes we import the below:

import com.samsung.android.sdk.pass.SpassFingerprint;
import com.samsung.android.sdk.pass.SpassInvalidStateException;

Now this causes issues on all non-samsung devices and we get the below exception:

Rejecting re-init on previously-failed class java.lang.Class<com.samsung.android.sdk.pass.SpassFingerprint$b>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/samsung/android/fingerprint/IFingerprintClient$Stub;

Rejecting re-init on previously-failed class: java.lang.Class<com.samsung.android.sdk.pass.b>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/samsung/android/fingerprint/FingerprintManager$EnrollFinishListener;

I understand this is because the samsung libraries are not present on non samsung phones. My question is how do I conditionally import the Samsung dependencies so that I don't see this issue in non Samsung devices

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Sid
  • 1,224
  • 3
  • 23
  • 48

0 Answers0