true
Send/Share Intent Received
true
true
Debug Dialog
true
Script: ctx=getContext(); cr=callJavaMethod(ctx, "android.content.Context", "getContentResolver()"); input=callJavaMethod(cr, "android.content.ContentResolver", "openInputStream(android.net.Uri)", callJavaStaticMethod("android.net.Uri", "parse(java.lang.String)", stream_uri)); cachedir=callJavaMethod(ctx, "android.content.Context", "getExternalCacheDir()")+"/tmp"; cachedir=callJavaConstructor("java.io.File", "File(java.lang.String)", cachedir); if (isDirectory(cachedir)==false) { callJavaMethod(callJavaConstructor("java.io.File", "File(java.lang.String)", cachedir), "java.io.File", "mkdirs()"); } output=callJavaConstructor("java.io.FileOutputStream", "FileOutputStream(java.lang.String)", cachedir+"/"+"file_name"); data=callJavaMethod(callJavaStaticMethod("java.nio.ByteBuffer", "allocate(int)", 8*1024), "java.nio.ByteBuffer", "array()"); total = 0; len = 0; while ((len = callJavaMethod(input, "java.io.InputStream", "read(byte[])", data))!=-1) { total=total+len; callJavaMethod(output, "java.io.FileOutputStream", "write(byte[], int, int)", data, 0, len); } callJavaMethod(output, "java.io.FileOutputStream", "close()"); file_path=cachedir+"/"+"file_name"
Get temp file_path
Test
false
QUEUE
Send/Share Intent Received
Debug Dialog
Script: ctx=getContext(); cr=callJavaMethod(ctx, "android.content.Context", "getContentResolver()"); input=callJavaMethod(cr, "android.content.ContentResolver", "openInputStream(android.net.Uri)", callJavaStaticMethod("android.net.Uri", "parse(java.lang.String)", stream_uri)); cachedir=callJavaMethod(ctx, "android.content.Context", "getExternalCacheDir()")+"/tmp"; cachedir=callJavaConstructor("java.io.File", "File(java.lang.String)", cachedir); if (isDirectory(cachedir)==false) { callJavaMethod(callJavaConstructor("java.io.File", "File(java.lang.String)", cachedir), "java.io.File", "mkdirs()"); } output=callJavaConstructor("java.io.FileOutputStream", "FileOutputStream(java.lang.String)", cachedir+"/"+"file_name"); data=callJavaMethod(callJavaStaticMethod("java.nio.ByteBuffer", "allocate(int)", 8*1024), "java.nio.ByteBuffer", "array()"); total = 0; len = 0; while ((len = callJavaMethod(input, "java.io.InputStream", "read(byte[])", data))!=-1) { total=total+len; callJavaMethod(output, "java.io.FileOutputStream", "write(byte[], int, int)", data, 0, len); } callJavaMethod(output, "java.io.FileOutputStream", "close()"); file_path=cachedir+"/"+"file_name"