本文整理汇总了Java中com.samsung.android.sdk.SsdkUnsupportedException.VENDOR_NOT_SUPPORTED属性的典型用法代码示例。如果您正苦于以下问题:Java SsdkUnsupportedException.VENDOR_NOT_SUPPORTED属性的具体用法?Java SsdkUnsupportedException.VENDOR_NOT_SUPPORTED怎么用?Java SsdkUnsupportedException.VENDOR_NOT_SUPPORTED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.samsung.android.sdk.SsdkUnsupportedException
的用法示例。
在下文中一共展示了SsdkUnsupportedException.VENDOR_NOT_SUPPORTED属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getImageFilterExceptionType
public String getImageFilterExceptionType(int type) {
switch (type) {
case SsdkUnsupportedException.DEVICE_NOT_SUPPORTED:
return "DEVICE_NOT_SUPPORTED";
case SsdkUnsupportedException.LIBRARY_NOT_INSTALLED:
return "LIBRARY_NOT_INSTALLED";
case SsdkUnsupportedException.LIBRARY_UPDATE_IS_RECOMMENDED:
return "LIBRARY_UPDATE_IS_RECOMMENDED";
case SsdkUnsupportedException.LIBRARY_UPDATE_IS_REQUIRED:
return "LIBRARY_UPDATE_IS_REQUIRED";
case SsdkUnsupportedException.VENDOR_NOT_SUPPORTED:
return "VENDOR_NOT_SUPPORTED";
default:
return "UNKNOWN_EXCEPTION";
}
}
示例2: processUnsupportedException
/**
* This method processes the exception that is caused while initializing the
* Spen package and return the type of exception
*
* @param e
* SsdkUnsupportedException
* @return SpenExceptionType
*/
public static SpenExceptionType processUnsupportedException(
SsdkUnsupportedException e) {
int errType = e.getType();
if (errType == SsdkUnsupportedException.VENDOR_NOT_SUPPORTED) {
// If the device is not a Samsung device
return SpenExceptionType.VENDOR_NOT_SUPPORTED;
} else if (errType == SsdkUnsupportedException.DEVICE_NOT_SUPPORTED) {
//if the device does not support Pen.
return SpenExceptionType.DEVICE_NOT_SUPPORTED;
} else if (errType == SsdkUnsupportedException.LIBRARY_NOT_INSTALLED) {
// If SpenSDK APK is not installed.
return SpenExceptionType.LIBRARY_NOT_INSTALLED;
} else if (errType == SsdkUnsupportedException.LIBRARY_UPDATE_IS_REQUIRED) {
// SpenSDK APK must be updated.
return SpenExceptionType.LIBRARY_UPDATE_IS_REQUIRED;
} else if (errType == SsdkUnsupportedException.LIBRARY_UPDATE_IS_RECOMMENDED) {
// Update of SpenSDK APK to an available new version is recommended.
return SpenExceptionType.LIBRARY_UPDATE_IS_RECOMMENDED;
}
return SpenExceptionType.SPEN_NOT_SUPPORTED;
}
示例3: processUnsupportedException
private boolean processUnsupportedException(final SsdkUnsupportedException e)
{
e.printStackTrace();
int errType = e.getType();
// If the device is not a Samsung device or if the device does not support Pen.
if (errType == SsdkUnsupportedException.VENDOR_NOT_SUPPORTED
|| errType == SsdkUnsupportedException.DEVICE_NOT_SUPPORTED)
{
// TODO: Nothing really
return false;
} else if (errType == SsdkUnsupportedException.LIBRARY_NOT_INSTALLED)
{
// If SpenSDK APK is not installed.
// TODO: Prompt the user
return false;
} else if (errType
== SsdkUnsupportedException.LIBRARY_UPDATE_IS_REQUIRED)
{
// SpenSDK APK must be updated.
// TODO: Prompt the user
return false;
} else if (errType
== SsdkUnsupportedException.LIBRARY_UPDATE_IS_RECOMMENDED)
{
// Update of SpenSDK APK to an available new version is recommended.
// TODO: Prompt the user
return false;
}
return true;
}
示例4: isRichNotificationSupported
/**
* Checks if the device supports RichNotification feature.
*
* @param callbackContext
* The callback id used when calling back into JavaScript.
* @return true if the RichNotification is supported or false if not supported.
*
*/
private boolean isRichNotificationSupported (CallbackContext callbackContext) {
if (mIsRichSupported)
return true;
if(Log.isLoggable(RICHNOTI, Log.DEBUG))
Log.d(TAG, "Checking RichNotification support...");
Srn srn = new Srn();
try {
// Initialize an instance of Srn.
srn.initialize(mContext);
} catch (SsdkUnsupportedException e) {
// Error handling
if (e.getType() == SsdkUnsupportedException.VENDOR_NOT_SUPPORTED) {
Log.e(TAG, "Initialization error. Vendor is not Samsung.");
callbackContext.error(RichNotificationHelper.VENDOR_NOT_SUPPORTED);
}
else if (e.getType() == SsdkUnsupportedException.DEVICE_NOT_SUPPORTED) {
Log.e(TAG, "Initialization error. Device not supported.");
callbackContext.error(RichNotificationHelper.DEVICE_NOT_SUPPORTED);
}
else if (e.getType() == SsdkUnsupportedException.LIBRARY_NOT_INSTALLED) {
Log.e(TAG, "Initialization error. Device not supported.");
callbackContext.error(RichNotificationHelper.LIBRARY_NOT_INSTALLED);
}
else if (e.getType() == SsdkUnsupportedException.LIBRARY_UPDATE_IS_RECOMMENDED) {
Log.e(TAG, "Initialization error. Device not supported.");
callbackContext.error(RichNotificationHelper.LIBRARY_UPDATE_IS_RECOMMENDED);
}
else if (e.getType() == SsdkUnsupportedException.LIBRARY_UPDATE_IS_REQUIRED) {
Log.e(TAG, "Initialization error. Device not supported.");
callbackContext.error(RichNotificationHelper.LIBRARY_UPDATE_IS_REQUIRED);
}
else {
Log.e(TAG, "Initialization error.");
callbackContext.error("Initialization error");
}
return false;
}
mIsRichSupported = true;
return true;
}