public class Spen extends Object implements com.samsung.android.sdk.SsdkInterface
| Modifier and Type | Field and Description |
|---|---|
static int |
DEVICE_PEN
Pen device type for isFeatureEnabled()
|
static int |
POINTER_ICON
Pointer Icon feature for isFeatureEnabled()
|
static String |
SPEN_NATIVE_PACKAGE_NAME
ArtPencil.
|
static int |
SPEN_STATIC_LIB_MODE
Pen create mode
|
| Constructor and Description |
|---|
Spen() |
| Modifier and Type | Method and Description |
|---|---|
int |
getVersionCode()
Get the version number of the Pen package.
|
String |
getVersionName()
Get the version name of the Pen package.
|
void |
initialize(Context context)
Initialize the Pen package with default values: maxCacheSize = 5 and createMode =
SPEN_STATIC_LIB_MODE
Unable to initialize continuous two different modes |
void |
initialize(Context context,
int maxCacheSize)
Initialize the Pen package with max cache size with default createMode =
SPEN_STATIC_LIB_MODE
Unable to initialize continuous two different modes |
void |
initialize(Context context,
int maxCacheSize,
int createMode)
Deprecated.
This API is deprecated. All input parameters (except
context and maxCacheSize are set by default values).
createMode is set default by SPEN_STATIC_LIB_MODE. |
void |
initialize(Context context,
int maxCacheSize,
int createMode,
boolean isForce32BitMode)
Deprecated.
This API is deprecated. All input parameters (except
context and maxCacheSize are set by default values).
createMode is set default by SPEN_STATIC_LIB_MODE.
isForce32BitMode is set default by true. |
boolean |
isFeatureEnabled(int type)
Check if the feature of type is available on the device.
|
public static final int SPEN_STATIC_LIB_MODE
public static final int DEVICE_PEN
public static final int POINTER_ICON
public static final String SPEN_NATIVE_PACKAGE_NAME
public int getVersionCode()
public String getVersionName()
public boolean isFeatureEnabled(int type)
type - The type of feature.IllegalArgumentException - If the type is not DEVICE_PEN.
If the type is not POINTER_ICON.public void initialize(Context context) throws com.samsung.android.sdk.SsdkUnsupportedException
SPEN_STATIC_LIB_MODE
Unable to initialize continuous two different modescontext - The context of the application.IllegalArgumentException - If the context is null.IllegalStateException - If initialization failurecom.samsung.android.sdk.SsdkUnsupportedExceptionpublic void initialize(Context context, int maxCacheSize) throws com.samsung.android.sdk.SsdkUnsupportedException
SPEN_STATIC_LIB_MODE
Unable to initialize continuous two different modescontext - The context of the application.maxCacheSize - Max cache size in MB.com.samsung.android.sdk.SsdkUnsupportedException - Throw if one of reasons :
Vendor is not supported ;
SpenSdk apk version is low ;
SpenSdk apk is not installed.IllegalArgumentException - If the context is null.IllegalStateException - If initialization failurepublic void initialize(Context context, int maxCacheSize, int createMode) throws com.samsung.android.sdk.SsdkUnsupportedException
context and maxCacheSize are set by default values).
createMode is set default by SPEN_STATIC_LIB_MODE.context - The context of the application.maxCacheSize - Max cache size in MB.createMode - Version of SpenSdk.(Dynamic/Static).com.samsung.android.sdk.SsdkUnsupportedException - Throw if one of reasons :
Vendor is not supported ;
SpenSdk apk version is low ;
SpenSdk apk is not installed.IllegalArgumentException - If the context is null.IllegalStateException - If initialization failurepublic void initialize(Context context, int maxCacheSize, int createMode, boolean isForce32BitMode) throws com.samsung.android.sdk.SsdkUnsupportedException
context and maxCacheSize are set by default values).
createMode is set default by SPEN_STATIC_LIB_MODE.
isForce32BitMode is set default by true.context - The context of the application.maxCacheSize - Max cache size in MB.createMode - Version of SpenSdk.(Dynamic/Static).isForce32BitMode - If true, force SpenSDK to load 32bit library version.
Only use force 32bit SpenSDK with 32bit applications.com.samsung.android.sdk.SsdkUnsupportedException - Throw if one of reasons :
Vendor is not supported ;
SpenSdk apk version is low ;
SpenSdk apk is not installed.IllegalArgumentException - If the context is null.IllegalStateException - If initialization failure