Code example for AssetManager: Using file assets

Methods: open

0
		Context ctx = getContext();
		 
		TestUtil.extractKey(ctx, keyAsset, "/sdcard/key");
		 
		AssetManager am = ctx.getAssets();
		InputStream is = am.open(dbAsset, AssetManager.ACCESS_STREAMING);
		 
		ImporterV3 importer = new ImporterV3();
		importer.openDatabase(is, password, "/sdcard/key");
		 
		is.close();
	} 
	 
	public void testXMLKeyFile() throws Exception { 
		testKeyfile("kdb_with_xml_keyfile.kdb", "keyfile.key", "12345"); 
	} 
	 
	public void testBinary64KeyFile() throws Exception { 
		testKeyfile("binary-key.kdb", "binary.key", "12345"); 
	}