I'm currently working on my app and I'm trying to start rtmpgw or rtmpdump within the app . I placed the executables in the assets folder of my app so that i can access them and create the file :
Code:
InputStream inputStream = getAssets().open("rtmpgw");
OutputStream out = new FileOutputStream(newFile(getFilesDir()+"/rtmpgw"));
Then I set the right permissions through :
Code:
Runtime.getRuntime().exec("/system/bin/chmod 777 "+"rtmpgw",getFilesDir());
that's also working . But when I try to start rtmpgw through:
Code:
Runtime.getRuntime().exec("./rtmpgw,getFilesDir());
nothing happens and I don't get output back.
I tried also to execute a shell first and then write to the Outputstream but nothing seems to work.
Maybe someone can provide me java code or shell script how to start rtmpgw within a app.
Ref:
http://code.google.com/p/market-enab.../ShellCommands
http://gimite.net/en/index.php?Run%20native%20executable%20in%20Android %20App
Update :
Oh man , I forgot to read the error stream ..........
Now I get an Error message
rtmpdump doesn't start capturing because of a ERROR: Problem accessing the DNS. (addr: live.tv-kino.net) don't know why I'm getting this.
tried also other rtmp streams . But starting from adb shell works strange....