private String buildTestSlotData() {
JSONObject slotData = new JSONObject();
JSONArray name = new JSONArray().put("音量减大").put("音量减小");
JSONArray song = new JSONArray().put("音量减大").put("音量减小");
JSONArray artist = new JSONArray().put("音量减大").put("音量减小");
JSONArray app = new JSONArray().put("音量减大").put("音量减小");
JSONArray usercommand = new JSONArray().put("音量减大").put("音量减小");
try {
slotData.put(Constant.EXTRA_OFFLINE_SLOT_NAME, name);
slotData.put(Constant.EXTRA_OFFLINE_SLOT_SONG, song);
slotData.put(Constant.EXTRA_OFFLINE_SLOT_ARTIST, artist);
slotData.put(Constant.EXTRA_OFFLINE_SLOT_APP, app);
slotData.put(Constant.EXTRA_OFFLINE_SLOT_USERCOMMAND, usercommand);
} catch (JSONException e) {
}
return slotData.toString();
}
recognizerIntent.putExtra(Constant.EXTRA_OFFLINE_SLOT_DATA, buildTestSlotData());
我按照demo的这种方式添加进去之后没有反应,这个应该怎么加?
我也遇到这个问题,加扣一起研究1639004472,,,其他不讨论这块的人员,请勿扰谢谢,,