title: How to display SQLite stored data differed by users?
body: <p>Currently, I have two(2) SQLite tables - User &amp; Engagement.</p>
  
  <p>I have successfully execute my login activity and direct it to a new activity class - CodeActivity.java.</p>
  
  <p>My question is that how do i display list of engagement on the CodeActivity class differed by users as I have specifically attach each users to different engagement.</p>
  
  <pre><code>login.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              String name=uname.getText().toString();
              String password=pswd.getText().toString();
  
              int id= checkUser(new User(name,password));
              if(id==-1)
              {
                  final AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
                  builder.setTitle("Alert");
                  builder.setMessage("Username or Password is wrong.");
                  builder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
                      @Override
                      public void onClick(DialogInterface dialogInterface, int i) {
  
                          dialogInterface.dismiss();
  
                      }
                  });
  
                  AlertDialog dialog = builder.create();
                  dialog.show();
              }
              else
              {
                  Intent intentLogin = new Intent(MainActivity.this, CodeActivity.class);
                  intentLogin.putExtra("name",name);
                  startActivity(intentLogin);
                  startActivity(intentLogin);
  
              }
          }
      });
  </code></pre>
  
  <p>Please help, i've been struggling on this for weeks.</p>