[TIMOB-26161] Android: Activity Listening Broken on run-on-main-thread = true
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-08-24T01:27:17.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 7.5.0 |
Components | Android |
Labels | activity, alloy, android, listener, reset |
Reporter | josh.mocek |
Assignee | Gary Mathews |
Created | 2018-06-26T20:26:14.000+0000 |
Updated | 2019-02-12T19:01:29.000+0000 |
Description
Tested with a Pixel on Android 8.0 using a wireless keyboard. Build the app and you will see the OS logs appear. When a wireless keyboard is connected to the device via bluetooth it causes the app to soft reset on Android. I used
Ti.App._restart();
because I've had problems with the soft reset holding things in memory.
When
<property name="run-on-main-thread" type="bool">false</property>
the listener works correctly. The app restarts and runs 'Start by OS' and 'Resume by OS'.
When
<property name="run-on-main-thread" type="bool">true</property>
the listener does not fire the 'START' & 'RESUME' activity listener after the reset. You will notice this by the lack of error logs.
Attachments
File | Date | Size |
---|---|---|
index.js | 2018-06-26T20:25:17.000+0000 | 1840 |
index.xml | 2018-06-26T20:25:14.000+0000 | 180 |
tiapp.xml | 2018-06-26T20:25:09.000+0000 | 3624 |
[~josh.mocek] Is this Android 8 only? And which Ti-SDK version are you using?
Hans Knochel I can test on a different android version, and SDK is on 7.1.1
Hans Knochel same bad results on Android 7.1.1 & SDK 7.1.1 Android 7.1.1 & SDK 7.2.0 Android 7.1.1 & SDK 7.0.2
master: https://github.com/appcelerator/titanium_mobile/pull/10137
*Closing ticket.* Activity callbacks are now being called when running on main thread. The fix is present in SDK: {noformat} 7.4.0.v20180810061237 {noformat} *ENV* {noformat} Appc NPM: 4.2.13 Appc CLI: 7.0.4 Ti CLI: 5.1.1 Node: 10.3.0 NPM: 6.3.0 {noformat}
It is now firing the start and resume events, but not the destroy event like when run on main thread is false