Skip to content

Conversation

@RohitKushvaha01
Copy link
Member

@RohitKushvaha01 RohitKushvaha01 commented Jan 1, 2026

This PR introduces a Custom Tabs API that uses the device’s default browser to open web pages without leaving Acode.

While this is not a WebView and does not offer deep DOM or JavaScript control, it provides a lightweight and reliable way to open external links inside the app context. The implementation can be extended in the future to support features such as browser warm-up, custom tab sizing, and adding or removing menu items and making the tab full screen.

Closes #1757

Usage

CustomTabs.open(
    "https://example.com",
    { toolbarColor: "#6200EE", showTitle: true },
    () => console.log("Opened"),
    err => console.error(err)
);

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @RohitKushvaha01, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new Cordova plugin that integrates Android Custom Tabs functionality, allowing applications to open external web links within a customizable, browser-like interface. This enhancement provides a smoother user experience by keeping users within the app's context while leveraging the full capabilities and security of their default browser, and also addresses issue #1757.

Highlights

  • Introduced Custom Tabs Plugin: A new Cordova plugin, "com.foxdebug.acode.rk.customtabs", has been added to enable the use of Android Custom Tabs within the application.
  • Web API for External Links: A JavaScript API (CustomTabs.open) is now available for other plugins to open URLs in a customizable, in-app browser experience, enhancing how external web content is displayed.
  • Enhanced User Experience: Custom Tabs provide a more integrated and secure way to display web content compared to traditional WebViews, offering options for toolbar customization and title display, and leveraging the user's default browser capabilities.
  • Dependency Management Updates: The package.json and package-lock.json files were updated to register the new Custom Tabs plugin and adjust peer dependency declarations for various existing packages.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new Cordova plugin for using Custom Tabs, which is a great addition for displaying web content within the app. The implementation is solid, but I've found a couple of areas for improvement in the native Java code. Specifically, I'm suggesting to avoid hardcoding the browser to Chrome to provide a better experience for all users, and to use a non-deprecated API for setting the title visibility. My review comment includes a code suggestion to address these points. The rest of the plugin setup and JavaScript bridge look good.

@RohitKushvaha01 RohitKushvaha01 added the CI: RUN ON-DEMAND PREVIEW RELEASES Triggers an on-demand preview build for this pull request via CI workflow. label Jan 1, 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 Jan 1, 2026
@github-actions

This comment has been minimized.

@github-actions
Copy link

github-actions bot commented Jan 1, 2026

Preview Release for this, has been built.

Click here to view that github actions build

Copy link
Member

@UnschooledGamer UnschooledGamer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RohitKushvaha01 RohitKushvaha01 merged commit 8748d9b into Acode-Foundation:main Jan 1, 2026
10 checks passed
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.

WebView api for plugin developers

2 participants