Hi everyone I'm working on an android app to Stream a Live Video I'm using the Vidyo Library and it worked well with the stream. But I need to generate a Token for the stream I couldn't
try{
Process su = Runtime.getRuntime().exec("generateToken.jar --
key="+Developer_Key+" --appID="+APP_ID+" --userName=G.Salah --
expiresInSecs=75000");
DataOutputStream outputStream = new DataOutputStream(su.getOutputStream());
StringBuffer output = null;
BufferedReader reader=new BufferedReader(new
InputStreamReader(su.getInputStream()));
String line="";
while((line=reader.readLine())!=null){
output.append(line+"\n");
}
String response=output.toString();
AlertDialog.Builder dialog=new AlertDialog.Builder(this);
dialog.setMessage(response);
dialog.show();
outputStream.writeBytes("exit");
outputStream.flush();
}
catch (IOException e){
AlertDialog.Builder dialog=new AlertDialog.Builder(this);
dialog.setMessage(e+"");
dialog.show();
}
I've downloaded the generateToken.jar file and put in the libs file in Android studio And tried to execute the Shell Command Line "generateToken.jar --
key="+Developer_Key+" --appID="+APP_ID+" --userName=G.Salah --
expiresInSecs=75000"
using Process, but its now working :/
Ensure that you're passing valid values for developerKey and ApplicationId parameters. Also, make sure that userName doesn't contain special characters. I've just tried to generate token with my account and it worked well. So the .jar is working.