title: android: Use openOrCreateDatabase from within non activity class
body: <p>I am creating a new class for database, the first function is to access the database 
  the problem is that I always get error on MODE_PRIVATE</p>
  
  <p>I tried to pass the context as parameter but still shows error</p>
  
  <p>anyone know how to access the database from a non activity class</p>
  
  <pre><code>public class DB {
  
      public void OpenDB(Context ctx, SQLiteDatabase dataB)
      {
  
          dataB = openOrCreateDatabase("Schlogger", ctx.MODE_PRIVATE,null);
      }
  }
  </code></pre>