지금, 나는이 장치가 진동을 할 때 화면에 장치 쇼 결과 나는이 작업을 수행 할 수있는 방법 MainActivity.java기기가 화면에 표시 될 때 Android 기기를 진동시키는 방법은 무엇인가요?
public void onResult(String result) {
String tres = "\n";
try {
JSONObject j = new JSONObject(result);
JSONObject j1 = j.getJSONObject("status");
int j2 = j1.getInt("code");
if(j2 == 0){
JSONObject metadata = j.getJSONObject("metadata");
if (metadata.has("custom_files")) {
JSONArray musics = metadata.getJSONArray("custom_files");
for(int i=0; i<musics.length(); i++) {
JSONObject tt = (JSONObject) musics.get(i);
String title = tt.getString("title");
tres = tres + (i+1) + ". Title: " + title + "\n";
}
}
}else{
tres = result;
}
} catch (JSONException e) {
tres = result;
e.printStackTrace();
}
mResult.setText(tres);
}
의
일부?
감사합니다.
http://stackoverflow.com/a/13950364/1979882 – Vyacheslav