private void createIdentity( String fanExternalName, String fanPassword, ExternalPlatform externalPlatform) throws CantCreateFanIdentityException, FanIdentityAlreadyExistsException { moduleManager.createFanIdentity( fanExternalName, (fanImageByteArray == null) ? convertImage(R.drawable.ic_profile_male) : fanImageByteArray, fanPassword, externalPlatform); }
private void updateIdentityImage( String fanExternalName, String fanPassword, ExternalPlatform externalPlatform) throws CantUpdateFanIdentityException { moduleManager.updateFanIdentity( fanExternalName, fanPassword, identitySelected.getId(), identitySelected.getPublicKey(), fanImageByteArray, externalPlatform); }
private void setUpIdentity() { try { identitySelected = (Fan) tokenlyFanUserIdentitySubAppSession.getData(SessionConstants.IDENTITY_SELECTED); if (identitySelected != null) { loadIdentity(); } else { List<Fan> lst = moduleManager.listIdentitiesFromCurrentDeviceUser(); if (!lst.isEmpty()) { identitySelected = lst.get(0); } if (identitySelected != null) { loadIdentity(); isUpdate = true; createButton.setText("Save changes"); } } } catch (Exception e) { e.printStackTrace(); } }