Skip to content

Conversation

portasynthinca3
Copy link
Member

@portasynthinca3 portasynthinca3 commented Feb 11, 2025

What's new

  • Deferred application launches, i.e. launching one as soon as the requesting app exits. FL-3959

Verification

  • Run ./fbt launch APPSRC=loader_chaining_b. This app will should exit immediately when launched like that.
  • Run ./fbt launch APPSRC=loader_chaining_a. Run through each of the 5 choices:
    • "Launch B": an hourglass animation should be displayed, quickly followed by a dialog from app B.
      • The "Just quit" dialog option should return to the desktop.
      • The "Launch A" dialog option should return to app A.
    • "Launch B, then A": an hourglass animation should be displayed, quickly followed by a dialog from app B.
      • The "Just quit" dialog option should return to app A.
      • The "Launch A" dialog option should return to app A. Once it is exited from, app A should get launched again. Once exited from again, the desktop should be shown.
    • "Trigger error: silent": should behave as though it just exits the app. The serial logs should contain an app launch error.
    • "Trigger error: GUI": a standard system error message should be displayed ("App Not Found"), followed by the desktop.

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

@portasynthinca3 portasynthinca3 added New Feature Contains an IMPLEMENTATION of a new feature App Loader FAP loader + API-related labels Feb 11, 2025
Copy link

github-actions bot commented Feb 11, 2025

Compiled f7 firmware for commit 8ab3821d:

@portasynthinca3 portasynthinca3 marked this pull request as ready for review February 11, 2025 03:20
@CookiePLMonster
Copy link
Contributor

Can this be used to have FAPs run system apps like a "stack", for example launching Passport and then returning to my custom app when it closes?

@skotopes
Copy link
Contributor

Can this be used to have FAPs run system apps like a "stack", for example launching Passport and then returning to my custom app when it closes?

in theory yes. Originally it was implemented for nfc->mfkey->nfc chaining

@CookiePLMonster
Copy link
Contributor

in theory yes. Originally it was implemented for nfc->mfkey->nfc chaining

My "real" question in here is - if system apps can be loaded and my app re-launches after that system app terminates, this enables people to create custom desktops, which I think is a pretty nice use case for a feature like this.

@skotopes
Copy link
Contributor

in theory yes. Originally it was implemented for nfc->mfkey->nfc chaining

My "real" question in here is - if system apps can be loaded and my app re-launches after that system app terminates, this enables people to create custom desktops, which I think is a pretty nice use case for a feature like this.

this specific PR is not going to solve your problem. But it can be improved to do so in future

@portasynthinca3
Copy link
Member Author

portasynthinca3 commented Feb 12, 2025

launching Passport and then returning to my custom app when it closes

@CookiePLMonster unfortunately no. That would require Passport to explicitly launch you after itself. I don't think we need to be implementing that "app stack" with automatic returns within the Loader.

@portasynthinca3 portasynthinca3 marked this pull request as draft February 12, 2025 12:32
@portasynthinca3 portasynthinca3 marked this pull request as ready for review February 12, 2025 19:48
@portasynthinca3
Copy link
Member Author

@CookiePLMonster looks like your use case might be possible after the latest commit

@portasynthinca3 portasynthinca3 marked this pull request as draft February 13, 2025 14:47
@portasynthinca3 portasynthinca3 marked this pull request as ready for review February 14, 2025 00:34
@CookiePLMonster
Copy link
Contributor

CookiePLMonster commented Feb 14, 2025

With the new API, can we obtain the return code of a last enqueued application once ours relaunches? Or is this information lost?

@skotopes
Copy link
Contributor

fails with deadlock from file browser (left button)

@skotopes skotopes marked this pull request as draft February 21, 2025 23:12
@portasynthinca3 portasynthinca3 marked this pull request as ready for review February 26, 2025 14:00
@hedger hedger self-assigned this Apr 5, 2025
@hedger hedger merged commit 6b5d006 into dev Apr 5, 2025
11 checks passed
@hedger hedger deleted the portasynthinca3/3953-app-start-chain branch April 5, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Loader FAP loader + API-related New Feature Contains an IMPLEMENTATION of a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants