Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>May be have this errors:</p> <p>try this </p> <pre><code>contacts_nick entry=new contacts_nick(this); entry.open(); Cursor cursor = getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,null,null, null); while (cursor.moveToNext()) { String displayName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME)); String phoneNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)); if(entry.getrowcount(displayName,phoneNumber)==0){ entry.insert(displayName,phoneNumber); } else{ //this code be running main activity send to onpause state.so you do better way Dialog d=new Dialog(this); d.setTitle("Error"); TextView tv=new TextView(this); tv.setText("KAYIT VAR"); d.setContentView(tv); d.show(); } } } catch(Exception e){ //this code be running main activity send to onpause state.so you do better way diditwork=false; String error =e.toString(); Dialog d=new Dialog(this); d.setTitle("Sorun Var"); TextView tv=new TextView(this); tv.setText(error); d.setContentView(tv); d.show(); } finally{ if(diditwork){ //this code be running main activity send to onpause state.so you do better way Dialog d=new Dialog(this); d.setTitle("Tebrikler"); TextView tv=new TextView(this); tv.setText("Başaralı"); d.setContentView(tv); d.show(); } } //use global objects,and you didnot call open method so didnot get value,that is problem i think Cursor c = entry.getAllData(); String[] columns = new String[] { contacts_nick.KEY_ID, contacts_nick.KEY_NAME,contacts_nick.KEY_PHONE }; int[] to = new int[] { R.id.name, R.id.phone }; //@SuppressWarnings("deprecation") ListAdapter simpCurAdap = new SimpleCursorAdapter(this, R.layout.activity_row, c, columns, to,0); setListAdapter(simpCurAdap); } @override Public onStop(){ super.onStop() //close finally if(entry!=null) entry.close(); } </code></pre> <p>refer this llink:</p> <p><a href="http://www.mysamplecode.com/2012/07/android-listview-cursoradapter-sqlite.html" rel="nofollow">http://www.mysamplecode.com/2012/07/android-listview-cursoradapter-sqlite.html</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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