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

Open App Details from Settings #853

Closed
jonas-w opened this issue Nov 12, 2024 · 2 comments · Fixed by #863
Closed

Open App Details from Settings #853

jonas-w opened this issue Nov 12, 2024 · 2 comments · Fixed by #863
Labels
enhancement New feature or request

Comments

@jonas-w
Copy link
Contributor

jonas-w commented Nov 12, 2024

Is your feature request related to a problem? Please describe.

When an app is installed with Droid-Ify, it is displayed in the system settings as "App installed from Droid-Ify." When you install apps from stores like the Play Store or the GrapheneOS App Store, you can click there and access the app information. Unfortunately, this is not possible with Droid-Ify.

Describe the solution you'd like

Implement the SHOW_APP_INFO intent.

The only changes that are needed are the following lines:
In the AndroidManifest.xml

        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTask"
            android:windowSoftInputMode="adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.SHOW_APP_INFO" />
            </intent-filter>
... already existing intent filters etc.

In ScreenActivity.kt

 open fun handleIntent(intent: Intent?) {
        when (intent?.action) {
            // Current code handling ACTION_VIEW ...

            Intent.ACTION_SHOW_APP_INFO -> {
                val packageName = intent.getStringExtra(Intent.EXTRA_PACKAGE_NAME)
                if (packageName != null) {
                    val fragment = currentFragment
                    if (fragment !is AppDetailFragment) {
                        navigateProduct(packageName)
                    }
                }


            }
        }
    }

Important

This requires API Level 24 (current min API Level is 23)

Describe alternatives you've considered

Maybe it's possible to conditionally only enable the Intent-Filter for this on API Level >= 24, this wouldn't need a min API level bump.

Additional context

I've tested these changes on my Phone, and it works without a problem.
I copied bits from the deeplink VIEW Intent.

@jonas-w jonas-w added the enhancement New feature or request label Nov 12, 2024
@Bnyro
Copy link
Contributor

Bnyro commented Nov 15, 2024

You can probably use tools:targetApi="n" on the intent filter to suppress the warning, there's no need to bump the min SDK version.

Older Android versions just won't see / be able to call use that intent filter.

@Iamlooker
Copy link
Member

Can you create a PR for this, if possible. I won't be able to work on this anytime soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants