-
-
Notifications
You must be signed in to change notification settings - Fork 735
Description
If the user has installed the app and logged in with Facebook (done using Parse Android SDK UI Library), everything is working great. Now, when we publish a new version of the app and the user updates the app, ParseUser.getCurrentUser() is returning null.
I am initializing Parse in Application.java as follows:
Parse.enableLocalDatastore(this); Parse.initialize(new Parse.Configuration.Builder(this) .applicationId(getString(R.string.parse_app_id)) .clientKey(getString(R.string.parse_client_key)) .server(getString(R.string.parse_server_url)) .build() );
On my MainActivity (launcher Activity), I do the following:
if (ParseUser.getCurrentUser() == null) { Intent intent = new Intent(this, LoginActivity.class); ParseLoginConfig config = new ParseLoginConfig(); config.setFacebookLoginEnabled(true); intent.putExtras(config.toBundle()); startActivityForResult(intent, LOGIN_REQUEST); }
Here, LoginActivity derives from ParseLoginActivity. This is the only place we show login screen. This implies that on every update, somehow ParseUser.getCurrentUser() is getting null.
Is this expected? I do not want to force the user to re-login everytime they update the app.