SpenRemoteSDK on device without samsung.android.feature

Hello,

I’m trying to use the SpenRemoteSDK (v.1.0.1) with a Galaxy Note Pro (android 5.0) but that system does not provide the expected samsung.android.feature :
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/samsung/android/feature/SemFloatingFeature;

Is there a way to deal with it ?

Regards,

Hello,
According to the this documentation, the following devices supports the S Pen Remote SDK:

  • Note 9/10/20
  • Tab S6/S7

Thanks,
Ummey

Thank you for your response,
I deduce that there is no way to access the SPen via an API on a Galaxy Note Pro.

Regards,

More specifically, the downloadable Samsung sample code (where everyone starts, naturally) does not cope with non-Samsung devices - it throws the error that the OP found above.
For non-Samsungs the source needs to be wrapped like so:

    try {
        Log.d(TAG, "Support Button = " + mSpenRemote.isFeatureEnabled(SpenRemote.FEATURE_TYPE_BUTTON));
    } catch(NoClassDefFoundError e) {
        Log.d(TAG, "S Pen not supported by this device: " + e);
    }

Oddly, the other SpenRemote calls don’t throw an error, so I recommend Samsung updates their sample code with the try/catch above, if they don’t want to put new/inexperienced developers off.

Check if it supports it, there’s also an old s pen sdk, called s look sdk, it supports old devices, new ones or newer support Spen remote sdk, look at programming guide for how to, first if want check its supports spen remote sdk, if curious check if supports slook sdk.