code: private SecretKey resolveSymmetricKey(Context context, String keyAlias) throws UnrecoverableKeyException,
  	                                                                               CertificateException,
  	                                                                               NoSuchAlgorithmException,
  	                                                                               KeyStoreException,
  	                                                                               IOException,
  	                                                                               NoSuchProviderException,
  	                                                                               InvalidAlgorithmParameterException,
  	                                                                               NoSuchPaddingException,
  	                                                                               InvalidKeyException,
  	                                                                               IllegalBlockSizeException {
  		// 1. try to resolve the wrapper key (load an existing one from the key store or generate a new one)
  		KeyPair wrapperKey = resolveWrapperKey(context, keyAlias);
  
  		// 2. try to load and existing symmetric key from un-secure device storage
  		SecretKey secretKey = loadSymmetricKey(context, wrapperKey);
  		if (secretKey != null) {
  			return secretKey;
  		}
  
  		// 3. generate and store a new symmetric key in the un-secure device storage.
  		return generateSymmetricKey(context, wrapperKey);
  	}
docs: region Keys