Skip to content Skip to sidebar Skip to footer

Using Sauronsoftware's Jave In Phonegap Android Project

I'm developing phonegap app and right now I'm trying to write a plugin to convert .amr files to .mp3 files. I'm using JAVE to do this conversion and while it's working on desktop

Solution 1:

Stucked with same problem. For now i found that there is problem with file ffmpeg permissions. JAVE trying to set them, but for some reason it not working. So i set this permission by myself like this:

    Process process = null;
    DataOutputStream dataOutputStream = null;

    try {
        process = Runtime.getRuntime().exec("su");
        dataOutputStream = new DataOutputStream(process.getOutputStream());
        dataOutputStream.writeBytes("chmod 0755 __AppCachePath__/jave-1/ffmpeg\n");
        dataOutputStream.writeBytes("exit\n");
        dataOutputStream.flush();
        process.waitFor();
    } catch (Exception e) {

    } finally {
        try {
            if (dataOutputStream != null) {
                dataOutputStream.close();
            }
            process.destroy();
        } catch (Exception e) {
        }
    }

After this File permission problem goes away.


Post a Comment for "Using Sauronsoftware's Jave In Phonegap Android Project"