How to Implement Only one time login activity open after splash screen next time it will open direct main activity in android
<pre><code>private void handleResponse(JSONObject serverResponse) {
    int success = 0;
    try {
        success = serverResponse.getInt(Responce.TAG_SUCCESS);
        if (success == 1) {
            progressDialog.dismiss();
            //after login we want to store user's id into shared preferences
            SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
            SharedPreferences.Editor editor = sharedPreferences.edit();
            editor.putString("cust_id", serverResponse.getString("CustomerId"));
            editor.commit();
            Toast.makeText(LoginActivity.this, serverResponse.getString((Responce.TAG_MESSAGE)), Toast.LENGTH_LONG).show();
            Intent intent = new Intent(LoginActivity.this,ProfileActivity.class);
            startActivity(intent);
        } else {
            progressDialog.dismiss();
            Toast.makeText(LoginActivity.this, serverResponse.getString(Responce.TAG_MESSAGE), Toast.LENGTH_LONG).show();
        }
    } catch (JSONException e) {
    }

}
</code></pre>

<p>First my splash Activity Launch and then Login Activity Open. 
After Login my Profile Activity Open.
I Want open Profile Activity Directly if user login one time and key/value stored.
Above Code for Login activity to use SharedPreferences . and am getting key/value form Response.
Please Tell me how to implement only one time login activity. </p>

<p><code>final SharedPreferences mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
        String value = (mSharedPreferences.getString("cust_id", "Default_value"));</code></p>

<p>This is my key/value get in Profile Activity</p>