How to make an Android device vibrate when device show result on screen?
<p>Now, I want to make the device vibrate when device show result on screen</p>

<p>some parts of <strong>MainActivity.java</strong></p>

<pre><code>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&lt;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);
}
</code></pre>

<p>How can I do this?</p>

<p>Thanks!</p>