当前位置: 首页>>代码示例>>Java>>正文


Java PebbleDictionary.getString方法代码示例

本文整理汇总了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();
}
 
开发者ID:NightscoutFoundation,项目名称:xDrip,代码行数:22,代码来源:PebbleDisplayTrend.java

示例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");
        }
    }
 
开发者ID:NightscoutFoundation,项目名称:xDrip,代码行数:24,代码来源:PebbleDisplayTrendOld.java

示例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();
}
 
开发者ID:matejdro,项目名称:PebbleNotificationCenter-Android,代码行数:21,代码来源:ActionsModule.java

示例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);
}
 
开发者ID:C-D-Lewis,项目名称:dash-api,代码行数:15,代码来源:Service.java

示例5: gotMessageReplyText

import com.getpebble.android.kit.util.PebbleDictionary; //导入方法依赖的package包/类
private void gotMessageReplyText(PebbleDictionary data)
{
    String text = data.getString(2);
    gotText(text);
}
 
开发者ID:matejdro,项目名称:PebbleDialer-Android,代码行数:6,代码来源:SMSReplyModule.java


注:本文中的com.getpebble.android.kit.util.PebbleDictionary.getString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。