public class MainActivity extends Activity implements
SoundPool.OnLoadCompleteListener,
View.OnClickListener,
GoogleApiClient.ConnectionCallbacks,
GoogleApiClient.OnConnectionFailedListener
{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(layout.activity_main);
SharedPreferences loginState =getSharedPreferences("loginState", Context.MODE_PRIVATE);
SharedPreferences.Editor editor = loginState.edit();
..
..
} //END ONCREATE
@Override
public void onConnected(Bundle connectionHint) {
// The player is signed in. Hide the sign-in button and allow the
// player to proceed.
HERE WE WANT TO COMMIT
}
} // END MAIN ACTIVITY
Tuesday, September 15, 2015
SharedPrefences Problem
SharedPreferences cannot be called from outside onCreate()
Labels:
problem,
SharedPreferences
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment