mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-20 04:54:45 -07:00
[FL-3902] NFC app now can launch MFKey32 (#4117)
* feat: app chaining * add `launch_current_app_after_deferred`, remove `get_referring_application` * fix naming * new api * fix f18 * Added new function which enqueues external app from nfc app * Added path to MFKey32 app * Button "Crack nonces in MFKey32" added to ReadMenu scene * SaveConfirm scene adjusted to move to different scenes depending on state * SaveSuccess scene now moves to different scenes depending on SaveConfirm scene state * MfKeyComplete scene shows different text when MFKey.fap present on the device * Now MfKeyClassic scene can run external app * fix deferred launches after errors Co-authored-by: Anna Antonenko <portasynthinca3@gmail.com> Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com> Co-authored-by: hedger <hedger@nanode.su>
This commit is contained in:
@@ -470,6 +470,26 @@ static void nfc_show_initial_scene_for_device(NfcApp* nfc) {
|
||||
scene_manager_next_scene(nfc->scene_manager, scene);
|
||||
}
|
||||
|
||||
void nfc_app_run_external(NfcApp* nfc, const char* app_path) {
|
||||
furi_assert(nfc);
|
||||
furi_assert(app_path);
|
||||
|
||||
Loader* loader = furi_record_open(RECORD_LOADER);
|
||||
|
||||
loader_enqueue_launch(loader, app_path, NULL, LoaderDeferredLaunchFlagGui);
|
||||
|
||||
FuriString* self_path = furi_string_alloc();
|
||||
furi_check(loader_get_application_launch_path(loader, self_path));
|
||||
|
||||
loader_enqueue_launch(
|
||||
loader, furi_string_get_cstr(self_path), NULL, LoaderDeferredLaunchFlagGui);
|
||||
furi_string_free(self_path);
|
||||
|
||||
furi_record_close(RECORD_LOADER);
|
||||
|
||||
view_dispatcher_stop(nfc->view_dispatcher);
|
||||
}
|
||||
|
||||
int32_t nfc_app(void* p) {
|
||||
if(!nfc_is_hal_ready()) return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user