Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to check my internet access on my application android
    text
    copied!<p>there's one menu on my application, only can open with internet connection, i have try to put some sources code, but it doesn't work... can anybody help me..? this is my source code :</p> <pre><code>public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); String[] listpeta = new String[] { "TMII","Anjungan", "Museum", "Tempat Ibadah","Taman","Wahana Rekreasi"}; //Menset nilai array ke dalam list adapater sehingga data pada array akan dimunculkan dalam list this.setListAdapter(new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_list_item_1, listpeta)); } @Override protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); //Menangkap nilai text yang dklik Object o = this.getListAdapter().getItem(position); final String keyword = o.toString(); //Menampilkan list peta. final ProgressDialog myProgressDialog = ProgressDialog.show(ListPeta.this, "Loading", "Mohon Tunggu...!!!", true); new Thread() { public void run() { try{ Thread.sleep(1000); if(keyword=="TMII"){petapa="tmii";} else if(keyword=="Anjungan"){petapa="anjungan";} else if(keyword=="Museum"){petapa="museum";} else if(keyword=="Tempat Ibadah"){petapa="tempatibadah";} else if(keyword=="Taman"){petapa="taman";} else if(keyword=="Wahana Rekreasi"){petapa="rekreasi";} Intent slide2 = new Intent(ListPeta.this, FormPetaTmiiOnline.class); startActivity(slide2); } catch (Exception e) { } // Dismiss the Dialog myProgressDialog.dismiss(); } }.start(); } </code></pre> <p>if there's someone help me and give me a source code.. tell me where i must put it on my source code... :)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload