I love to make use of a Singleton like a globally accessible cache for several database values. This really is my meaning of the singleton with sample variables gi1, and gDBAdapter:

public class GlobalVars {
    private Integer gi1;
    private WebiDBAdapter gDBAdapter;

    private static GlobalVars instance = null;
       protected GlobalVars() {
          // Exists only to defeat instantiation.
       }
       public static GlobalVars getInstance() {
          if(instance == null) {
             instance = new GlobalVars();
          }

          //  now get the current data from the DB, 

          WebiDBAdapter myDBAdapter = new WebiDBAdapter(this);  // <- cannot use this in static context

          gDBAdapter = myDBAdapter;     // <- cannot use this in static context
          myDBAdapter.open();

          Cursor cursor = myDBAdapter.fetchMainEntry();
          startManagingCursor(cursor); // <- the method startManagingCursor is undefined for the type GlobalVars
          // if there is no DB yet, lets just create one with default data
            if (cursor.getCount() == 0) {
                cursor.close();
                createData();  // <- the method createData is undefined for the type GlobalVars
                cursor = myDBAdapter.fetchMainEntry();
                startManagingCursor(cursor);// <- the method startManagingCursor is undefined for the type GlobalVars
            }

            gi1 = cursor.getInt(cursor  // <- Cannot make a static reference to the non-static field gi1
                    .getColumnIndexOrThrow(WebiDBAdapter.KEY1));
            if (gi1 == null) gi1 = 0;

            cursor.close();

          return instance;
       }

But all of the references towards the instance vars aren't recognized.

All of the // <- records show the errors I recieve

I suppose there's some fundamentals that i'm not doing the following.

An amount be the proper way to produce the singleton and initialize its values using the values in the database?

Interesting help!

Make use of the Application class,

also there's no such factor as this inside a static function