Back to project page ohpass.
The source code is released under:
Copyright (c) 2012, Oscar Martinez All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: ...
If you think the Android project ohpass listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package omtinez.ohpass; /*w w w . j a va2s . co m*/ import android.app.Application; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class Ohpass extends Application { // static variables to be retrieved by any class of this application private static SQLiteOpenHelper openHelper; private static Context mContext; private static String mPassword; @Override public void onCreate() { super.onCreate(); // store the static variables openHelper = new OhpassDB(this); mContext = this.getApplicationContext(); } public void cachePassword(String pwd) { mPassword = pwd; } public static String getCachedPassword() { return mPassword; } public static SQLiteDatabase getDB() { return openHelper.getWritableDatabase(); } public static Context getContext() { return mContext; } public static Ohpass getApp() { return (Ohpass) mContext; } }