本文整理汇总了Java中com.integreight.onesheeld.sdk.ShieldFrame.getArgumentAsString方法的典型用法代码示例。如果您正苦于以下问题:Java ShieldFrame.getArgumentAsString方法的具体用法?Java ShieldFrame.getArgumentAsString怎么用?Java ShieldFrame.getArgumentAsString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.integreight.onesheeld.sdk.ShieldFrame
的用法示例。
在下文中一共展示了ShieldFrame.getArgumentAsString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onNewShieldFrameReceived
import com.integreight.onesheeld.sdk.ShieldFrame; //导入方法依赖的package包/类
@Override
public void onNewShieldFrameReceived(ShieldFrame frame) {
// TODO Auto-generated method stub
if (frame.getShieldId() == UIShield.FOURSQUARE_SHIELD.getId()) {
if (isFoursquareLoggedInAlready())
if (frame.getFunctionId() == CHECKIN_METHOD_ID) {
placeID = frame.getArgumentAsString(0);
message = frame.getArgumentAsString(1);
if (ConnectionDetector
.isConnectingToInternet(getApplication()
.getApplicationContext())) {
ConnectFour connectFour = new ConnectFour();
connectFour.execute("");
} else
Toast.makeText(
getApplication().getApplicationContext(),
R.string.general_toasts_please_check_your_internet_connection_and_try_again_toast,
Toast.LENGTH_SHORT).show();
}
}
}
示例2: onNewShieldFrameReceived
import com.integreight.onesheeld.sdk.ShieldFrame; //导入方法依赖的package包/类
@Override
public void onNewShieldFrameReceived(ShieldFrame frame) {
if (frame.getShieldId() == UIShield.PHONE_SHIELD.getId()) {
String phone_number = frame.getArgumentAsString(0);
switch (frame.getFunctionId()) {
case CALL_METHOD_ID:
call(phone_number);
break;
default:
break;
}
}
}
示例3: onNewShieldFrameReceived
import com.integreight.onesheeld.sdk.ShieldFrame; //导入方法依赖的package包/类
@Override
public void onNewShieldFrameReceived(ShieldFrame frame) {
// TODO Auto-generated method stub
if (frame.getShieldId() == UIShield.SMS_SHIELD.getId()) {
String smsNumber = frame.getArgumentAsString(0);
String smsText = frame.getArgumentAsString(1);
lastSmsText = smsText;
if (frame.getFunctionId() == SEND_SMS_METHOD_ID) {
sendSms(smsNumber, smsText);
}
}
}
示例4: onNewShieldFrameReceived
import com.integreight.onesheeld.sdk.ShieldFrame; //导入方法依赖的package包/类
@Override
public void onNewShieldFrameReceived(ShieldFrame frame) {
// TODO Auto-generated method stub
if (frame.getShieldId() == UIShield.SKYPE_SHIELD.getId()) {
String userId = frame.getArgumentAsString(0);
Log.d("Skype_User_ID ", userId);
if (ConnectionDetector.isConnectingToInternet(getApplication()
.getApplicationContext())) {
switch (frame.getFunctionId()) {
case CALL_METHOD_ID:
callSkypeID(userId);
break;
case VIDEO_METHOD_ID:
videoCallSkypeID(userId);
break;
case CHAT_METHOD_ID:
chatSkypeID(userId);
break;
default:
break;
}
} else
Toast.makeText(getApplication().getApplicationContext(),
R.string.general_toasts_please_check_your_internet_connection_and_try_again_toast,
Toast.LENGTH_SHORT).show();
}
}
示例5: onNewShieldFrameReceived
import com.integreight.onesheeld.sdk.ShieldFrame; //导入方法依赖的package包/类
@Override
public void onNewShieldFrameReceived(ShieldFrame frame) {
// TODO Auto-generated method stub
if (frame.getShieldId() == UIShield.FACEBOOK_SHIELD.getId()) {
lastPost = frame.getArgumentAsString(0);
if (isFacebookLoggedInAlready()) {
if (ConnectionDetector.isConnectingToInternet(getApplication()
.getApplicationContext())) {
if (eventHandler != null)
eventHandler.startProgress();
if (frame.getFunctionId() == UPDATE_STATUS_METHOD_ID)
publishStory(lastPost);
else if (frame.getFunctionId() == UPLOAD_PHOTO_METHOD_ID) {
String imgPath = null;
byte sourceFolderId = frame.getArgument(1)[0];
if (sourceFolderId == CameraUtils.FROM_ONESHEELD_FOLDER)
imgPath = CameraUtils
.getLastCapturedImagePathFromOneSheeldFolder(activity,true);
else if (sourceFolderId == CameraUtils.FROM_CAMERA_FOLDER)
imgPath = CameraUtils
.getLastCapturedImagePathFromCameraFolder(activity);
if (imgPath != null) {
uploadImage(imgPath, lastPost);
}
}
} else
Toast.makeText(
getApplication().getApplicationContext(),
R.string.general_toasts_please_check_your_internet_connection_and_try_again_toast,
Toast.LENGTH_SHORT).show();
}
}
}
示例6: onNewShieldFrameReceived
import com.integreight.onesheeld.sdk.ShieldFrame; //导入方法依赖的package包/类
@Override
public void onNewShieldFrameReceived(ShieldFrame frame) {
// TODO Auto-generated method stub
if (frame.getShieldId() == UIShield.MIC_SHIELD.getId()) {
switch (frame.getFunctionId()) {
case MIC_START_RECORD:
if (!isRecording) {
handler.removeCallbacks(processMic);
MicSoundMeter.getInstance().stop();
if (frame.getArguments().isEmpty()) {
fileName = "Mic_" + String.valueOf(new Date().getTime());
} else {
fileName = frame.getArgumentAsString(0) +"_" + String.valueOf(new Date().getTime());
}
MicSoundMeter.getInstance().start(true, fileName);
if (eventHandler != null)
eventHandler.getState(activity.getString(R.string.mic_recording)+"...");
handler.post(processMic);
isRecording = true;
}
break;
case MIC_STOP_RECORD:
if (isRecording) {
handler.removeCallbacks(processMic);
MicSoundMeter.getInstance().stop();
MicSoundMeter.getInstance().start(false);
if (eventHandler != null)
eventHandler.getState("");
if (!fileName.equals(""))
showNotification(activity.getString(R.string.mic_sound_recorded_successfully_to)+" " + fileName + ".mp3");
fileName = "";
handler.post(processMic);
isRecording = false;
}
break;
}
}
}
示例7: onNewShieldFrameReceived
import com.integreight.onesheeld.sdk.ShieldFrame; //导入方法依赖的package包/类
@Override
public void onNewShieldFrameReceived(ShieldFrame frame) {
// TODO Auto-generated method stub
if (frame.getShieldId() == UIShield.NOTIFICATION_SHIELD.getId()) {
String notificationText = frame.getArgumentAsString(0);
lastNotificationText = notificationText;
if (frame.getFunctionId() == NOTIFY_PHONE_METHOD_ID) {
showNotification(notificationText);
if (eventHandler != null)
eventHandler.onNotificationReceive(notificationText);
}
}
}
示例8: onNewShieldFrameReceived
import com.integreight.onesheeld.sdk.ShieldFrame; //导入方法依赖的package包/类
@Override
public void onNewShieldFrameReceived(ShieldFrame frame) {
if (frame.getShieldId() == UIShield.DATA_LOGGER.getId()) {
switch (frame.getFunctionId()) {
case START_LOGGING:
if (frame.getArguments().size() > 0)
fileName = frame.getArgumentAsString(0);
else
fileName = null;
headerList = new CopyOnWriteArrayList<>();
dataSet = new ArrayList<>();
rowData = new HashMap<>();
currentStatus = LOGGING;
isStarted = true;
Log.d("HeaderSize", "Start");
if (eventHandler != null) {
eventHandler.onStartLogging();
}
break;
case STOP_LOGGING:
saveData();
break;
case ADD_STRING:
if (isStarted) {
currentStatus = LOGGING;
String key = frame.getArgumentAsString(0);
String value = frame.getArgumentAsString(1);
if (!headerList.contains(key))
headerList.add(key);
rowData.put(key, value);
if (eventHandler != null) {
eventHandler.onAdd(key, value);
}
}
break;
case ADD_FLOAT:
if (isStarted) {
currentStatus = LOGGING;
String keyFloat = frame.getArgumentAsString(0);
String valueFloat = frame.getArgumentAsFloat(1) + "";
Log.d("HeaderSize", "Add : " + keyFloat + " " + valueFloat);
if (!headerList.contains(keyFloat))
headerList.add(keyFloat);
rowData.put(keyFloat, valueFloat);
if (eventHandler != null) {
eventHandler.onAdd(keyFloat, valueFloat);
}
}
break;
case LOG:
if (isStarted) {
currentStatus = LOGGING;
if (eventHandler != null) {
eventHandler.onLog(new HashMap<>(rowData));
}
if (!headerList.contains("Time")) headerList.add("Time");
rowData.put("Time",
new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.US).format(new Date())
.toString());
//rowData.remove("Time");
dataSet.add(new HashMap<>(rowData));
rowData = new HashMap<>();
Log.d("HeaderSize", "Log: " + headerList.size() + " **");
}
break;
default:
break;
}
}
}