private void buildContactData(){
  Context context=getApplicationContext();
  AppContactService appContactService=new AppContactService(context);
  if (!appContactService.isContactExists("adarshk")) {
    List<Contact> contactList=new ArrayList<Contact>();
    Contact contact=new Contact();
    contact.setUserId("adarshk");
    contact.setFullName("John");
    contact.setImageURL("R.drawable.couple");
    contactList.add(contact);
    Contact contactRaj=new Contact();
    contactRaj.setUserId("raj");
    contactRaj.setFullName("rajni");
    contactRaj.setImageURL("https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xap1/v/t1.0-1/p200x200/12049601_556630871166455_1647160929759032778_n.jpg?oh=7ab819fc614f202e144cecaad0eb696b&oe=56EBA555&__gda__=1457202000_85552414c5142830db00c1571cc50641");
    contactList.add(contactRaj);
    Contact contact2=new Contact();
    contact2.setUserId("rathan");
    contact2.setFullName("Liz");
    contact2.setImageURL("R.drawable.liz");
    contactList.add(contact2);
    Contact contact3=new Contact();
    contact3.setUserId("clem");
    contact3.setFullName("Clement");
    contact3.setImageURL("R.drawable.shivam");
    contactList.add(contact3);
    Contact contact4=new Contact();
    contact4.setUserId("shanki.gupta");
    contact4.setFullName("Bill");
    contact4.setImageURL("R.drawable.contact_shanki");
    contactList.add(contact4);
    Contact contact6=new Contact();
    contact6.setUserId("krishna");
    contact6.setFullName("Krishi");
    contact6.setImageURL("R.drawable.girl");
    contactList.add(contact6);
    Contact contact7=new Contact();
    contact7.setUserId("heather");
    contact7.setFullName("Heather");
    contact7.setImageURL("R.drawable.heather");
    contactList.add(contact7);
    appContactService.addAll(contactList);
  }
}

private void buildContactData ( ) { Context context = getApplicationContext ( ) ; AppContactService appContactService = new AppContactService ( context ) ; if ( ! appContactService . isContactExists ( "adarshk" ) ) { List < Contact > contactList = new ArrayList < Contact > ( ) ; Contact contact = new Contact ( ) ; contact . setUserId ( "adarshk" ) ; contact . setFullName ( "John" ) ; contact . setImageURL ( "R.drawable.couple" ) ; contactList . add ( contact ) ; Contact contactRaj = new Contact ( ) ; contactRaj . setUserId ( "raj" ) ; contactRaj . setFullName ( "rajni" ) ; contactRaj . setImageURL ( "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xap1/v/t1.0-1/p200x200/12049601_556630871166455_1647160929759032778_n.jpg?oh=7ab819fc614f202e144cecaad0eb696b&oe=56EBA555&__gda__=1457202000_85552414c5142830db00c1571cc50641" ) ; contactList . add ( contactRaj ) ; Contact contact2 = new Contact ( ) ; contact2 . setUserId ( "rathan" ) ; contact2 . setFullName ( "Liz" ) ; contact2 . setImageURL ( "R.drawable.liz" ) ; contactList . add ( contact2 ) ; Contact contact3 = new Contact ( ) ; contact3 . setUserId ( "clem" ) ; contact3 . setFullName ( "Clement" ) ; contact3 . setImageURL ( "R.drawable.shivam" ) ; contactList . add ( contact3 ) ; Contact contact4 = new Contact ( ) ; contact4 . setUserId ( "shanki.gupta" ) ; contact4 . setFullName ( "Bill" ) ; contact4 . setImageURL ( "R.drawable.contact_shanki" ) ; contactList . add ( contact4 ) ; Contact contact6 = new Contact ( ) ; contact6 . setUserId ( "krishna" ) ; contact6 . setFullName ( "Krishi" ) ; contact6 . setImageURL ( "R.drawable.girl" ) ; contactList . add ( contact6 ) ; Contact contact7 = new Contact ( ) ; contact7 . setUserId ( "heather" ) ; contact7 . setFullName ( "Heather" ) ; contact7 . setImageURL ( "R.drawable.heather" ) ; contactList . add ( contact7 ) ; appContactService . addAll ( contactList ) ; } }
don ' t use this method . . . this is only for demo purpose . .
