Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FL-3953] Application chaining #4105

Open
wants to merge 16 commits into
base: dev
Choose a base branch
from

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 95eafaa2:

@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
Member

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
Member

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
Member

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
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.

3 participants