[TIMOB-26865] Android: Activity "onRestart" callback no longer invoked as of 8.0.0.RC
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-03-04T10:19:10.000+0000 |
Affected Version/s | Release 8.0.0 |
Fix Version/s | Release 8.0.0 |
Components | n/a |
Labels | activity, android, callback, qe-testadded, regression, restart |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2019-02-27T01:06:06.000+0000 |
Updated | 2019-04-30T22:40:52.000+0000 |
Description
*Summary:*
As of Titanium 8.0.0.RC, the
Activity
callback assigned to [onRestart](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Android.Activity-property-onRestart) is no longer invoked.
This is a regression.
The "onRestart" callback is supposed to be invoked after the activity's "onStop" to indicate that the activity window is being resumed from the background.
*Steps to reproduce:*
Build and run the below code on Android.
Wait for the app to appear onscreen
Press the "Home" button to suspend the app.
Resume the app.
Observe the log and notice that "onRestart" was not logged.
var window = Ti.UI.createWindow();
window.add(Ti.UI.createLabel({ text: "Activity onRestart Test" }));
window.activity.onRestart = function() {
Ti.API.info("@@@ Activity.onRestart() called.");
Ti.UI.createNotification({
message: "Activity.onRestart() called.",
duration: Ti.UI.NOTIFICATION_DURATION_SHORT,
}).show();
};
window.open();
PR (master): https://github.com/appcelerator/titanium_mobile/pull/10733 PR (8.0.x): https://github.com/appcelerator/titanium_mobile/pull/10734
FR Passed for both PR's. Waiting for Jenkins to allow to merge.
PR's Merged.
Closing ticket, fix verified in SDK Version 8.1.0.v20190301155716 and SDK Version 8.0.0.v20190301145350. Test and other information can be found at: PR (master): https://github.com/appcelerator/titanium_mobile/pull/10733 PR (8.0.x): https://github.com/appcelerator/titanium_mobile/pull/10734