当我用 gammu 和 java 创建 smsGateway 时,我遇到了这样的语法问题:
try {
Process process = runtime.exec(pathGammu+" --config "+pathConfig+" TEXT phonenumber -text \'can i send?\' ");
InputStream is = process.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String line;
while ((line = br.readLine()) != null) {
System.out.println(line);
}
} catch (IOException ex) {
System.out.println("Error : " + ex.getMessage());
}
当我运行该语法时,我得到来自 gammu 的响应“什么是参数:我发送?”...... gammu 假设“我可以发送吗?” 作为命令......它应该是一个字符串......我很困惑