本文整理汇总了Java中com.getpebble.android.kit.util.PebbleDictionary.getString方法的典型用法代码示例。如果您正苦于以下问题:Java PebbleDictionary.getString方法的具体用法?Java PebbleDictionary.getString怎么用?Java PebbleDictionary.getString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.getpebble.android.kit.util.PebbleDictionary
的用法示例。
在下文中一共展示了PebbleDictionary.getString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: receiveData
import com.getpebble.android.kit.util.PebbleDictionary; //导入方法依赖的package包/类
@Override
public void receiveData(int transactionId, PebbleDictionary data) {
Log.d(TAG, "receiveData: transactionId is " + String.valueOf(transactionId));
lastTransactionId = transactionId;
Log.d(TAG, "Received Query. data: " + data.size() + ".");
if (data.size() > 0) {
pebble_sync_value = data.getUnsignedIntegerAsLong(SYNC_KEY);
pebble_platform = data.getUnsignedIntegerAsLong(PLATFORM_KEY);
pebble_app_version = data.getString(VERSION_KEY);
Log.d(TAG, "receiveData: pebble_sync_value=" + pebble_sync_value + ", pebble_platform=" + pebble_platform + ", pebble_app_version=" + pebble_app_version);
} else {
Log.d(TAG, "receiveData: pebble_app_version not known");
}
PebbleKit.sendAckToPebble(context, transactionId);
transactionFailed = false;
transactionOk = false;
messageInTransit = false;
sendStep = 5;
sendData();
}
示例2: evaluateDataFromPebble
import com.getpebble.android.kit.util.PebbleDictionary; //导入方法依赖的package包/类
private void evaluateDataFromPebble(PebbleDictionary data) {
if (data.size() > 0) {
pebble_sync_value = data.getUnsignedIntegerAsLong(SYNC_KEY);
pebble_platform = data.getUnsignedIntegerAsLong(PLATFORM_KEY);
pebble_app_version = data.getString(VERSION_KEY);
Log.d(TAG, "receiveData: pebble_sync_value=" + pebble_sync_value + ", pebble_platform=" + pebble_platform + ", pebble_app_version=" + pebble_app_version);
switch ((int)pebble_platform) {
case 0:
if (PebbleUtil.pebbleDisplayType != PebbleDisplayType.TrendClassic) {
PebbleUtil.pebbleDisplayType = PebbleDisplayType.TrendClassic;
//JoH.static_toast_short("Switching to Pebble Classic Trend");
Log.d(TAG,"Changing to Classic Trend due to platform id");
}
break;
}
} else {
Log.d(TAG, "receiveData: pebble_app_version not known");
}
}
示例3: gotMessageReplyText
import com.getpebble.android.kit.util.PebbleDictionary; //导入方法依赖的package包/类
private void gotMessageReplyText(PebbleDictionary data)
{
String text = data.getString(2);
if (replyAction != null)
{
replyAction.sendReply(text, NCTalkerService.fromPebbleTalkerService(getService()));
SystemModule.get(getService()).hideHourglass();
replyAction = null;
return;
}
if (list == null || !list.isTertiaryTextList())
return;
((WritingPhrasesList) list).reply(text);
SystemModule.get(getService()).hideHourglass();
}
示例4: checkPermissionEntry
import com.getpebble.android.kit.util.PebbleDictionary; //导入方法依赖的package包/类
private void checkPermissionEntry(PebbleDictionary dict, UUID uuid) {
Context context = getApplicationContext();
// Add for Landing ArrayList
String name = dict.getString(Keys.AppKeyAppName);
if(PermissionManager.getName(context, uuid) == null) {
// First time we've seen this app?
PermissionManager.setPermitted(context, uuid, false); // This also modifies the list
}
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
PermissionManager.setName(context, uuid, name);
}
示例5: gotMessageReplyText
import com.getpebble.android.kit.util.PebbleDictionary; //导入方法依赖的package包/类
private void gotMessageReplyText(PebbleDictionary data)
{
String text = data.getString(2);
gotText(text);
}