hello-beacons icon indicating copy to clipboard operation
hello-beacons copied to clipboard

Wrong onSaveInstanceState method call

Open rfazi opened this issue 8 years ago • 0 comments

Link: https://codelabs.developers.google.com/codelabs/hello-beacons/index.html?index=..%2F..%2Findex#6 .

In onSaveInstanceState() the super.onSaveInstanceState(outState); must be called for last.

The correct code is:

@Override
    protected void onSaveInstanceState(Bundle outState) {
        outState.putBoolean(KEY_SUBSCRIBED, mSubscribed);
        super.onSaveInstanceState(outState);
    }

rfazi avatar Oct 02 '17 08:10 rfazi