plusminus wrote:Hello rmeph,
I know no good workaround...
the search for any method that takes an input-stream.
Or extract the file to a temporary location and play it from there.
Regards,
plusminus
when extract file to a temporary location
i used code
Using java Syntax Highlighting
void writeFile(String filename) {
InputStream is = pr.getResources().openRawResource(R.raw.data);
ZipInputStream zis = new ZipInputStream(is);
ZipEntry ze;
String dataDir = getFileStreamPath("").getAbsolutePath()+"/";
try {
while ((ze = zis.getNextEntry()) != null) {
if (ze.getName().trim().equals(filename.trim()))
{
OutputStream os = null;
os = new FileOutputStream(path);
while ((read = is.read(buffer)) > 0) {
os.write(buffer, 0, read);
}
}
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Parsed in 0.034 seconds, using
GeSHi 1.0.8.4
but it's show error
DEBUG/dalvikvm(683): Exception Ljava/lang/ClassNotFoundException; from PathClassLoader.java:205 not caught locally
DEBUG/dalvikvm(683): NOTE: loadClass 'org.apache.harmony.archive.internal.nls.messages' 0x40018950 threw an exception
how to stroted file in temporary location??