title: get data from sqlite database as livedata android
body: <p>I have on app, now i want to update some parts of it using new android features. my database is SQLite
  and for some reason i can not use Room database. so i want to use viewmodel and live data in my app.
  problem is i cant how to get data from my db as Livedata.
  this is my code to get data from db:</p>
  <pre><code>public ArrayList&lt;itema&gt; getDataContact2 () {
  
      SQLiteDatabase db = myhelper.getReadableDatabase();
      String[] columns = {DBhelper.CONID,DBhelper.CONNAME, DBhelper.PHONE1, DBhelper.PHONE3, DBhelper.ADDRESS, DBhelper.TELEGRAM,DBhelper.INSTAGRAM,DBhelper.PHONE2,DBhelper.IMAGE,DBhelper.INFO,DBhelper.WHATSUP,DBhelper.EMAIL,DBhelper.EVENT,DBhelper.EVENTTITLE};
      Cursor cursor = db.query(DBhelper.TABLE_CONTACT, columns, null, null, null, null, DBhelper.CONNAME);
      ArrayList&lt;itema&gt; myList=new ArrayList&lt;&gt;();
  
  
      while (cursor.moveToNext()) {
         try {
             int id = cursor.getInt(cursor.getColumnIndex(DBhelper.CONID));
             String name = cursor.getString(cursor.getColumnIndex(DBhelper.CONNAME));
             String phone1 = cursor.getString(cursor.getColumnIndex(DBhelper.PHONE1));
             String phone2 = cursor.getString(cursor.getColumnIndex(DBhelper.PHONE2));
             String phone3 = cursor.getString(cursor.getColumnIndex(DBhelper.PHONE3));
             String add = cursor.getString(cursor.getColumnIndex(DBhelper.ADDRESS));
             String date = cursor.getString(cursor.getColumnIndex(DBhelper.EVENT));
             String telegram = cursor.getString(cursor.getColumnIndex(DBhelper.TELEGRAM));
             String insta = cursor.getString(cursor.getColumnIndex(DBhelper.INSTAGRAM));
             String whatsup = cursor.getString(cursor.getColumnIndex(DBhelper.WHATSUP));
             String email = cursor.getString(cursor.getColumnIndex(DBhelper.EMAIL));
             String info = cursor.getString(cursor.getColumnIndex(DBhelper.INFO));
             String image = cursor.getString(cursor.getColumnIndex(DBhelper.IMAGE));
             String datetitle = cursor.getString(cursor.getColumnIndex(DBhelper.EVENTTITLE));
             itema item=new itema(id,name,phone1,phone2,phone3,add,email,insta,telegram,whatsup,image,info,date,datetitle);
  
             myList.add(item);
         }
         catch (Exception e){
             e.printStackTrace();
         }
  
      }
      cursor.close();
      return myList;
  }
  </code></pre>
  <p>as u can see, i get data as a list of itema. now how can i get data as Livedata&lt;List&gt;.
  any help will be appreciated.</p>