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

Filter out WebAPK apps in the requests #123

Closed
Donnnno opened this issue Apr 22, 2023 · 3 comments
Closed

Filter out WebAPK apps in the requests #123

Donnnno opened this issue Apr 22, 2023 · 3 comments

Comments

@Donnnno
Copy link
Contributor

Donnnno commented Apr 22, 2023

I've noticed that a lot of the requested apps are webapk's (looks like a progressive web app I think?)

These IDs are unique and bloat the requests, maybe there's a way to filter them out?

some examples:

<item component="ComponentInfo{org.chromium.webapk.aa2706b854e34f888_v2/org.chromium.webapk.shell_apk.h2o.H2OOpaqueMainActivity}" drawable="cloud_gaming" />

<item component="ComponentInfo{org.chromium.webapk.abea0ffa362334a5a_v2/org.chromium.webapk.shell_apk.h2o.H2OOpaqueMainActivity}" drawable="install_f1_app" />

<item component="ComponentInfo{org.chromium.webapk.a195db0b886767d7a_v2/org.chromium.webapk.shell_apk.h2o.H2OOpaqueMainActivity}" drawable="virustotal" />

<item component="ComponentInfo{com.sec.android.app.sbrowser.webapk.wd02c836d69e971c8c1957e7e3a516dda1/org.chromium.webapk.shell_apk.h2o.H2OOpaqueMainActivity}" drawable="news" />

<item component="ComponentInfo{org.chromium.webapk.a1100ac3f16726209_v2/org.chromium.webapk.shell_apk.h2o.H2OOpaqueMainActivity}" drawable="android_developers" />
@sarsamurmu
Copy link
Collaborator

You will be able to use this feature in the next update. This is how you would do it, by adding a new configuration to applications/CandyBar.java file.

    @NonNull
    @Override
    public Configuration onInit() {
        Configuration configuration = new Configuration();

        // ... other configurations

        configuration.setFilterRequestHandler((request) -> {
            // Return true to include the request
            // Return false to exclude the request
            
            String pkg = request.getPackageName();
            if (pkg == null) return true;
            return !(pkg.startsWith("org.chromium.webapk") || pkg.startsWith("com.sec.android.app.sbrowser.webapk"));
        });

        return configuration;
    }

@Donnnno
Copy link
Contributor Author

Donnnno commented May 11, 2023

That's amazing! Thanks for taking the time to implement this.

@johirulisla
Copy link

thanks

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

No branches or pull requests

3 participants