Code example for AssetManager: Using file assets

Methods: open

0
	 
	public void testKeyfile() throws IOException, InvalidDBException { 
		Context ctx = getContext();
		 
		AssetManager am = ctx.getAssets();
		InputStream is = am.open("key-only.kdbx", AssetManager.ACCESS_STREAMING);
		 
		ImporterV4 importer = new ImporterV4();
		importer.openDatabase(is, "", "/sdcard/key");
		 
		is.close();
		 
		 
	} 
 
	public void testNoGzip() throws IOException, InvalidDBException { 
		Context ctx = getContext();
		 
		AssetManager am = ctx.getAssets();
		InputStream is = am.open("no-encrypt.kdbx", AssetManager.ACCESS_STREAMING);