本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
});
}