I would like to run an android method with specific time(like every 5 sec). Here is code, I want to run with time intervals.
shipDB = this.openOrCreateDatabase("shipDB", SQLiteDatabase.CREATE_IF_NECESSARY, null);
String query = "select *from ShopList";
Cursor c = shipDB.rawQuery(query, null);
c.moveToFirst();
do{
String Item = c.getString(c.getColumnIndex("name"));
/* Add current Entry to results. */
results.add(Item);
}while(c.moveToNext());
this.setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, results));
How can i do it??