title: How to Retrieve data based on user not on device
body: <p>I am able to see data that is saved on a particular mobile. If I log in on different devices using the same username password then data is not available there.</p>
  
  <p>Following code written in DBHelper.java</p>
  
  <pre><code>public List&lt;String&gt; getSampleItem(){
          Cursor cursor=null;
          List&lt;String&gt; sampleItemList=new ArrayList&lt;&gt;();
          sqLiteDatabase=this.getReadableDatabase();            
          Cursor cursor=sqLiteDatabase.query(TABLE_PROCUREMENT,new String[]strong text{DB_COLUMN_SAMPLE_ITEM},null,null,null,null,null);
          if (cursor.moveToFirst()){
              do {
                  sampleItemList.add(cursor.getString(0));
  
              }while(cursor.moveToNext());
          }
          return sampleItemList;
  
      }
  </code></pre>
  
  <p>Calling from Activity.java</p>
  
  <pre><code>private void prepareProcurementData(){
          ProcurementData procurementData= null;
          for (int i=0;i&lt;dbHelper.getSampleItem().size();i++) {
              procurementData = new ProcurementData(dbHelper.getDate().get(i),dbHelper.getSampleItem().get(i));
              procurementDataList.add(procurementData);
          }   
  
  
          mAdapter.notifyDataSetChanged();
      }
  </code></pre>