From Android In App Billing version 3 (TrivialDrive)sample application coming with sdk
/* base64EncodedPublicKey should be YOUR A
What I did was to transform the key into a char array, split it in two and then reconstruct it when needed like this:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_shop);
char[] base64KeyByteArray = ArrayUtils.addAll(getPublicKeyChunk1(), getPublicKeyChunk2());
Log.d(TAG, String.valueOf(base64KeyByteArray));
}
private char[] getPublicKeyChunk1() {
return new char[]{82, 73, 67, 66, 73, 106, 65, 78, 66, 103, 107, 113, 104, 107,
105, 71, 57, 119, 79, 66, 65, 81, 69, 70, 65, 65, 79, 67, 65, 81, 56, 65, 77, 73,
73, 66, 67, 103, 75, 67, 65, 81, 69, 65, 121, 55, 81, 76, 122, 67, 105, 80, 65,
110, 105, 101, 72, 66, 53, 57};
}
private char[] getPublicKeyChunk2() {
return new char[]{82, 43, 68, 47, 79, 121, 122, 110, 85, 67, 118, 89, 108, 120, 43, 49,
80, 100, 67, 108, 55, 90, 57, 103, 119, 57, 87, 78, 79, 111, 53, 101, 80, 71,
117, 74, 104, 82, 87, 97, 100};
}