Skip to content

fix: back button#2006

Merged
RohitKushvaha01 merged 1 commit intoAcode-Foundation:mainfrom
RohitKushvaha01:fix_back_button
Apr 2, 2026
Merged

fix: back button#2006
RohitKushvaha01 merged 1 commit intoAcode-Foundation:mainfrom
RohitKushvaha01:fix_back_button

Conversation

@RohitKushvaha01
Copy link
Copy Markdown
Member

No description provided.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 2, 2026

Greptile Summary

This PR fixes the Android back button by adding android:enableOnBackInvokedCallback="false" to the <application> block in config.xml, which opts the app out of Android 13+'s predictive back gesture API and restores the legacy Cordova back-button handling. As a side-change, the four previously separate <application> child elements inside the first edit-config block are consolidated into a single element — a functionally equivalent and cleaner approach.

Confidence Score: 5/5

  • Safe to merge — single targeted attribute addition with no logic changes and correct semantics for Cordova on Android 13+.
  • The only substantive change is adding android:enableOnBackInvokedCallback="false", which is the correct and well-documented fix to restore legacy Cordova back-button behavior on Android 13+. Consolidating the four <application> child nodes into one is equivalent in Cordova's merge mode. No P0/P1 findings remain after the previous thread was resolved.
  • No files require special attention.

Important Files Changed

Filename Overview
config.xml Adds android:enableOnBackInvokedCallback="false" to the application manifest block and consolidates four separate <application> child elements into one; also changes the first edit-config file path to the shorthand AndroidManifest.xml.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User presses Back button] --> B{Android 13+ predictive back API}
    B -->|enableOnBackInvokedCallback=true| C[Android handles back natively\nbypasses Cordova JS]
    B -->|enableOnBackInvokedCallback=false\n✅ this PR| D[Legacy back dispatch]
    D --> E[Cordova back-button event fired]
    E --> F[JavaScript handler in Acode]
    F --> G[Correct in-app navigation / exit logic]
Loading

Reviews (2): Last reviewed commit: "fix: back button" | Re-trigger Greptile

@RohitKushvaha01
Copy link
Copy Markdown
Member Author

@greptileai

@RohitKushvaha01 RohitKushvaha01 added the CI: RUN ON-DEMAND PREVIEW RELEASES Triggers an on-demand preview build for this pull request via CI workflow. label Apr 2, 2026
@github-actions github-actions bot removed the CI: RUN ON-DEMAND PREVIEW RELEASES Triggers an on-demand preview build for this pull request via CI workflow. label Apr 2, 2026
@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Preview Release for this, has been built.

Click here to view that github actions build

@RohitKushvaha01
Copy link
Copy Markdown
Member Author

@bajrangCoder can you check the APK to make sure it doesn't cause any side effects?

@bajrangCoder
Copy link
Copy Markdown
Member

@bajrangCoder can you check the APK to make sure it doesn't cause any side effects?

It's fine on my device too

@RohitKushvaha01 RohitKushvaha01 merged commit 5b46801 into Acode-Foundation:main Apr 2, 2026
9 checks passed
@RohitKushvaha01 RohitKushvaha01 deleted the fix_back_button branch April 2, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants