本文整理汇总了Java中com.google.android.vending.licensing.util.Base64类的典型用法代码示例。如果您正苦于以下问题:Java Base64类的具体用法?Java Base64怎么用?Java Base64使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Base64类属于com.google.android.vending.licensing.util包,在下文中一共展示了Base64类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: processWriteRequest
import com.google.android.vending.licensing.util.Base64; //导入依赖的package包/类
@Override
public byte[] processWriteRequest(BluetoothGattCharacteristic characteristic, int offset, byte[] writtenData) {
Log.i(TAG, "WatchCtrlService.processWriteRequest -> " + characteristic.getUuid().toString() + " - " + Base64.encode(writtenData));
Button button = buttonSelector.getPressedButton(connectedDevice, writtenData);
if (button == null) {
showUnknownKeyMessage(offset, writtenData);
return null;
}
if( alertService.needCleanMessage() ) {
cleanNotifications();
return null;
}
Command command = currentMode.getCommand(button);
if( command == null ) {
showUnknownKeyMessage(offset, writtenData);
return null;
}
if(!PhoneControlModesManager.call(command)) {
showUnknownKeyMessage(offset, writtenData);
return null;
}
return null;
}
开发者ID:masterjc,项目名称:bluewatcher,代码行数:25,代码来源:WatchCtrlService.java
示例2: getButton
import com.google.android.vending.licensing.util.Base64; //导入依赖的package包/类
@Override
public Button getButton(byte[] buttonId) {
String pressedButton = Base64.encode(buttonId);
if( pressedButton.equals(BUTTON_A_CODE))
return Button.BUTTON_A;
if( pressedButton.equals(BUTTON_B_CODE))
return Button.BUTTON_B;
if( pressedButton.equals(BUTTON_C_CODE))
return Button.BUTTON_C;
if( pressedButton.equals(WHEEL_UP_CODE))
return Button.WHEEL_UP;
if( pressedButton.equals(WHEEL_DOWN_CODE))
return Button.WHEEL_DOWN;
return null;
}
开发者ID:masterjc,项目名称:bluewatcher,代码行数:16,代码来源:Gba400ButtonConverter.java
示例3: getButton
import com.google.android.vending.licensing.util.Base64; //导入依赖的package包/类
@Override
public Button getButton(byte[] buttonId) {
String pressedButton = Base64.encode(buttonId);
if( pressedButton.equals(BUTTON_A_CODE))
return Button.BUTTON_A;
if( pressedButton.equals(BUTTON_B_CODE))
return Button.BUTTON_B;
return null;
}
开发者ID:masterjc,项目名称:bluewatcher,代码行数:10,代码来源:Gb5600ButtonConverter.java
示例4: getButton
import com.google.android.vending.licensing.util.Base64; //导入依赖的package包/类
@Override
public Button getButton(byte[] buttonId) {
String pressedButton = Base64.encode(buttonId);
if( pressedButton.equals(BUTTON_A_CODE))
return Button.BUTTON_A;
if( pressedButton.equals(BUTTON_B_CODE))
return Button.BUTTON_B;
if( pressedButton.equals(BUTTON_C_CODE))
return Button.BUTTON_C;
if( pressedButton.equals(BUTTON_D_CODE))
return Button.BUTTON_D;
if( pressedButton.equals(POWER_BUTTON_CODE))
return Button.BUTTON_E;
return null;
}
开发者ID:masterjc,项目名称:bluewatcher,代码行数:16,代码来源:Stb1000ButtonConverter.java
示例5: getButton
import com.google.android.vending.licensing.util.Base64; //导入依赖的package包/类
@Override
public Button getButton(byte[] buttonId) {
String pressedButton = Base64.encode(buttonId);
if( pressedButton.equals(BUTTON_A_CODE))
return Button.BUTTON_A;
if( pressedButton.equals(BUTTON_B_CODE))
return Button.BUTTON_B;
if( pressedButton.equals(BUTTON_C_CODE))
return Button.BUTTON_C;
return null;
}
开发者ID:masterjc,项目名称:bluewatcher,代码行数:12,代码来源:DefaultButtonConverter.java
示例6: showUnknownKeyMessage
import com.google.android.vending.licensing.util.Base64; //导入依赖的package包/类
private void showUnknownKeyMessage(int offset, byte[] key) {
final byte[] data = key;
final int off = offset;
activity.runOnUiThread(new Runnable() {
public void run() {
Toast.makeText(
activity.getApplicationContext(),
activity.getApplicationContext().getString(R.string.unrecognized_button) + Base64.encode(data) + " - OFFSET:"
+ Integer.toString(off), Toast.LENGTH_SHORT).show();
}
});
}
开发者ID:masterjc,项目名称:bluewatcher,代码行数:13,代码来源:WatchCtrlService.java
注:本文中的com.google.android.vending.licensing.util.Base64类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论