public class Smotion
extends java.lang.Object
implements com.samsung.android.sdk.SsdkInterface
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_ACTIVITY
User activity.
|
static int |
TYPE_ACTIVITY_NOTIFICATION
User activity notification.
|
static int |
TYPE_CALL
Call motion.
|
static int |
TYPE_PEDOMETER
Pedometer motion.
|
static int |
TYPE_PEDOMETER_WITH_UPDOWN_STEP
Pedometer motion with up/down step status.
|
Constructor and Description |
---|
Smotion()
Creates a Smotion instance.
|
Modifier and Type | Method and Description |
---|---|
int |
getVersionCode()
Get the version number of the Motion package.
|
java.lang.String |
getVersionName()
Get the version name of the Motion package.
|
void |
initialize(android.content.Context context)
Initialize an instance of the Motion package.
|
boolean |
isFeatureEnabled(int type)
Check if a Motion package feature is available on the device.
|
public static final int TYPE_CALL
public static final int TYPE_PEDOMETER
public static final int TYPE_PEDOMETER_WITH_UPDOWN_STEP
public static final int TYPE_ACTIVITY
public static final int TYPE_ACTIVITY_NOTIFICATION
public void initialize(android.content.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 if the SDK version
is not matched.java.lang.IllegalArgumentException
- Thrown if the Context passed is null or
wrong.java.lang.IllegalStateException
- Thrown if initialize() function is already
called.public boolean isFeatureEnabled(int type)
type
- The feature ID. The valid values are: TYPE_CALL
TYPE_PEDOMETER TYPE_PEDOMETER_WITH_UPDOWN_STEP
TYPE_ACTIVITY TYPE_ACTIVITY_NOTIFICATIONtrue -
if the Motion package feature is available
on the device. false -
if the Motion package feature is not
available on the device.java.lang.IllegalStateException
- Thrown if the method is called before
calling the initialize() method or if the Motion package is
not supported on the device.java.lang.IllegalArgumentException
- Thrown if the feature ID passed is not
valid.public int getVersionCode()
public java.lang.String getVersionName()