SmartEyeglass SDK public class

DeviceInfoHelper

extends java.lang.Object
  1. java.lang.Object
  2. com.sonyericsson.extras.liveware.extension.util.registration.DeviceInfoHelper

Class Overview

This class contains helper functions for various devices

Summary

Constants
int SMARTEYEGLASS_MIN_CONTROL_API_LEVEL The Control API level required for Smart Eyeglass
Public Constructors
DeviceInfoHelper()
Public Methods
static boolean isSmartWatch2ApiAndScreenDetected(Context context, java.lang.String hostAppPackageName)

Checks host app API level and screen size to check if SmartWatch 2 is supported.

static boolean isSmartEyeglassScreenSupported(Context context, java.lang.String hostAppPackageName)

Check if SmartEyeglass screen size is supported.

static boolean isSensorSupported(Context context, java.lang.String hostAppPackageName, java.lang.String sensorType)

Checks if host application supports a specific sensor.

static int getSmartEyeglassWidth(Context context)

Get SmartEyeglass screen width.

static int getSmartEyeglassHeight(Context context)

Get SmartEyeglass screen height.

static int removeUnsafeValues(Context context, ContentValues values)

Removes ContentValues that don't match the current SmartConnect version.

Constants

public static final int SMARTEYEGLASS_MIN_CONTROL_API_LEVEL

The Control API level required for Smart Eyeglass

Constant Value: 4 (0x00000004)

Public Constructors

public DeviceInfoHelper()

Public Methods

public static boolean isSmartWatch2ApiAndScreenDetected(Context context, java.lang.String hostAppPackageName)

Checks host app API level and screen size to check if SmartWatch 2 is supported.

Parameters
context The context.
hostAppPackageName
Returns

true if SmartWatch is supported.

public static boolean isSmartEyeglassScreenSupported(Context context, java.lang.String hostAppPackageName)

Check if SmartEyeglass screen size is supported.

Parameters
context The context.
hostAppPackageName
Returns

true if SmartEyeglass display is supported.

public static boolean isSensorSupported(Context context, java.lang.String hostAppPackageName, java.lang.String sensorType)

Checks if host application supports a specific sensor.

Parameters
context The context.
hostAppPackageName The package name of the host application
sensorType The sensor type
Returns

true if the host application supports the sensor

public static int getSmartEyeglassWidth(Context context)

Get SmartEyeglass screen width.

Parameters
context The context.
Returns

width.

public static int getSmartEyeglassHeight(Context context)

Get SmartEyeglass screen height.

Parameters
context The context.
Returns

height.

public static int removeUnsafeValues(Context context, ContentValues values)

Removes ContentValues that don't match the current SmartConnect version. NOTE: This method can not be called before extension is registered

Parameters
context The Context.
values The ContentValues to be scanned for unsafe values.
Returns

removeValues

See Also