public class SAft extends Object implements com.samsung.android.sdk.SsdkInterface
All Samsung SDKs, including the Samsung Accessory SDK, provide a uniform interface for initialization, checking
whether features are enabled, and getting the SDK version info. The application must call
initialize(Context)
to initialize the Samsung Accessory SDK before using it.
For more information about using Accessory File Transfer, please refer to the Accessory Programming Guide.
Modifier and Type | Field and Description |
---|---|
static int |
DEVICE_ACCESSORY
Accessory feature ID
|
Constructor and Description |
---|
SAft()
Creates an SAft instance
|
Modifier and Type | Method and Description |
---|---|
void |
initialize(Context context)
Initializes an instance of the Samsung Accessory File Transfer SDK.
|
boolean |
isFeatureEnabled(int type)
Returns
true if the Accessory File Transfer feature on the device is enabled. |
public static final int DEVICE_ACCESSORY
public void initialize(Context context) throws SsdkUnsupportedException
context
- The Context for your application.SsdkUnsupportedException
- Thrown if the device was not made by Samsung, doesn't support the feature, or the SDK version is not
matched.IllegalArgumentException
- Thrown if the Context passed is null or invalid.SecurityException
- Thrown if the required permission is not included in the AndroidManifest.xml file. This does not
occur in other companies' or non-Samsung devices.public boolean isFeatureEnabled(int type)
true
if the Accessory File Transfer feature on the device is enabled.type
- The feature ID(must be DEVICE_ACCESSORY
).true
if the Accessory File Transfer feature is available on the device, else false
IllegalArgumentException
- Thrown if the feature ID passed is not valid.Copyright © Samsung Electronics, Co., Ltd. All rights reserved.