Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26975

Android: LiveView does not reload app if "Don't keep activities" is enabled as of 8.0.0

    Details

    • Story Points:
      7
    • Sprint:
      2019 Sprint 8, 2019 Sprint 9, 2019 Sprint 10

      Description

      Summary:
      If Android "Developer Options" setting "Don't keep activities" is enabled, then JavaScripts edits made while LiveView is running won't restart the app as of Titanium 8.0.0.

      Steps to reproduce:

      1. Go to the Android device's main "Settings" screen.
      2. Tap on "System" under "Settings.
      3. Tap on "Developer options" under "System" settings.
      4. Enable "Don't keep activities", which should be near the bottom of the list.
      5. Build and run the below code on the above Android device.
      6. Edit the "app.js" file and save your changes.
      7. Notice that the app does not restart. The below log message does not get logged agin.

      Ti.API.info("### The 'app.js' file was loaded.");
      var window = Ti.UI.createWindow();
      window.open();
      

      Cause:
      The TiApplication.softRestart() method attempts to fetch the root activity first before doing the restart. The fetched root activity will be null in this case, because the "Don't keep activities" option will destroy when showing a child activity. This is the edge case that is not handled.
      TiApplication.java#L741

      Work-Around:
      Disable the "Don't keep activities" option.

        Attachments

          Activity

            People

            • Assignee:
              jquick Joshua Quick
              Reporter:
              jquick Joshua Quick
              Reviewer:
              Gary Mathews
              Tester:
              Lokesh Choudhary
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration