not picking up a stored key.. heres the code
johnda98 opened this issue · comments
John D Allen commented
Toast.makeText(getApplicationContext(), pinview.getValue(), Toast.LENGTH_LONG).show();
String pin = "78454";
SecretKey key;
if (pinview.getValue().equals(pin)) {
// New Install - got geninstall Activity to get new PIN confirm &
// obtain a new HH account
//
// with an option to generate new account and key from platform 0.0.8660 account
key = store.generateSymmetricKey("78454", null);
// openActivityinstallacc();
} else {
// check to see if pin and keys in store, if so then open wallet
// and get existing account and key
if (store.hasKey("78454"))
{
openActivityhbal();
}
** I create the key 78454 and put it to store ... then on re-opening app.. doesnt find 78454 in the store
John D Allen commented
This is on the studio emulator.. presume keystore works on the emulator ALSO it seems Store is not an extension of Application and thus passing the object via getApplicationContext also cannot be cast
John D Allen commented
seems to be working now.. studio does odd things.. have to exit and reboot