You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initial activation of the back button through the SDK works successfully, with the button functioning correctly during normal background-foreground transitions. However, it has been observed that after a period of prolonged inactivity in the background, the back button ceases to respond.
After some investigation we discovered that you forget to save/restore the state of back button in/from the bundle:
// save the state
public void saveInstanceState(Bundle outState) {
outState.putString("queueUrl", queueUrl);
outState.putString("targetUrl", targetUrl);
outState.putString("userId", uriOverrider.getUserId());
}
// restore the state
private void readActivityExtras(Bundle savedInstanceState) {
if (savedInstanceState == null) {
Bundle extras = _context.getIntent().getExtras();
if (extras == null) {
queueUrl = null;
targetUrl = null;
} else {
queueUrl = extras.getString("queueUrl");
targetUrl = extras.getString("targetUrl");
uriOverrider.setUserId(extras.getString("userId"));
options = (QueueItEngineOptions)extras.getParcelable("options");
}
} else {
queueUrl = (String) savedInstanceState.getSerializable("queueUrl");
targetUrl = (String) savedInstanceState.getSerializable("targetUrl");
uriOverrider.setUserId((String) savedInstanceState.getSerializable("userId"));
}
uriOverrider.setTarget(Uri.parse(targetUrl));
uriOverrider.setQueue(Uri.parse(queueUrl));
}
Instead of:
// save the state
public void saveInstanceState(Bundle outState) {
outState.putString("queueUrl", queueUrl);
outState.putString("targetUrl", targetUrl);
outState.putString("userId", uriOverrider.getUserId());
outState.putParcelable("options", options); <-- HERE
}
// restore the state
private void readActivityExtras(Bundle savedInstanceState) {
if (savedInstanceState == null) {
...
} else {
queueUrl = (String) savedInstanceState.getSerializable("queueUrl");
targetUrl = (String) savedInstanceState.getSerializable("targetUrl");
uriOverrider.setUserId((String) savedInstanceState.getSerializable("userId"));
options = (QueueItEngineOptions) savedInstanceState.getParcelable("options"); <-- HERE
}
...
}
The text was updated successfully, but these errors were encountered:
We are not able to reproduce the issue you have reported.
Testing the SDK with different conditions and putting the app in the background for a long time (2+ hours), the back button is functioning as expected.
Would you please provide more information about how to reproduce the issue?
Initial activation of the back button through the SDK works successfully, with the button functioning correctly during normal background-foreground transitions. However, it has been observed that after a period of prolonged inactivity in the background, the back button ceases to respond.
After some investigation we discovered that you forget to save/restore the state of back button in/from the bundle:
Instead of:
The text was updated successfully, but these errors were encountered: