private void setUpIdentity() { try { identitySelected = (IdentityAssetIssuer) issuerIdentitySubAppSession.getData(SessionConstants.IDENTITY_SELECTED); if (identitySelected != null) { loadIdentity(); } else { List<IdentityAssetIssuer> lst = moduleManager.getIdentityAssetIssuersFromCurrentDeviceUser(); if (!lst.isEmpty()) { identitySelected = lst.get(0); } if (identitySelected != null) { loadIdentity(); isUpdate = true; createButton.setText("Save changes"); } } } catch (Exception e) { e.printStackTrace(); } }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { issuerIdentitySubAppSession = (IssuerIdentitySubAppSession) appSession; moduleManager = issuerIdentitySubAppSession.getModuleManager(); errorManager = appSession.getErrorManager(); // if(moduleManager.getIdentityAssetIssuersFromCurrentDeviceUser().isEmpty()){ // moduleManager.createNewIdentityAssetIssuer("Asset Issuer John Doe", null); // } } catch (Exception ex) { CommonLogger.exception(TAG, ex.getMessage(), ex); } }