Skip to content

Mark app as a game? #20268

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
FATCatAndroid12 opened this issue Apr 17, 2025 · 4 comments
Open

Mark app as a game? #20268

FATCatAndroid12 opened this issue Apr 17, 2025 · 4 comments

Comments

@FATCatAndroid12
Copy link

This should allow devices to detect that this app is a game and apply additional performance improvements or enable additional game-related services, such as Samsung's Game Booster.

@hrydgard
Copy link
Owner

How exactly do you do that?

@FATCatAndroid12
Copy link
Author

+7
Original file line number	Diff line number	Diff line change
@@ -19,7 +19,14 @@
        android:label="@string/app_name"
        android:networkSecurityConfig="@xml/network_security_config"
        android:supportsRtl="true"
        android:appCategory="game"
        android:isGame="true"
        android:theme="@style/AppTheme">
        <meta-data
            android:name="android.game_mode_config"
            android:resource="@xml/game_mode_config" />
        <activity
            android:name=".ui.romlist.RomListActivity"
            android:theme="@style/SplashTheme"
Diff for:[‎app/src/main/res/xml/game_mode_config.xml](https://github.com/rafaelvcaetano/melonDS-android/commit/89d2899d6464ee0dece870bbdb2655012a1affab#diff-72391b5ff25c66f90034db8695b53a09ce4fa37935c6356b0e606b7d608d9861)
+4
Original file line number	Diff line number	Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<game-mode-config xmlns:android="http://schemas.android.com/apk/res/android"
    android:supportsBatteryGameMode="false"
    android:supportsPerformanceGameMode="false" />

@anr2me
Copy link
Collaborator

anr2me commented Apr 17, 2025

This might help https://stackoverflow.com/questions/50174122/non-game-app-gets-treated-as-game-by-samsung-game-launcher

And based on https://gist.github.com/Adnan-Bacic/718eb3b4e70380696c91dc21c4804112

Basically all the answers were the same: The problem is the applicationId. Certain applicationId's just seem to be categorized as games by Samsung.
...
So it seems like Samsung has an automatic game detection system of some sort, based on the applicationId. But its obviously not perfect and it appears that they can manually override it themselves.

We probably need to contact Samsung to add our AppId into their Game Launcher/Booster's game list if it's not detected automatically.

@hrydgard
Copy link
Owner

hrydgard commented Apr 17, 2025

I could add

android:appCategory="game"

to the manifest, though we already have the older

android:isGame="true"

However, we do not currently query the game optimization mode, like described here to https://developer.android.com/games/optimize/adpf/gamemode/gamemode-api . It's a bit unclear how we should optimize for battery or performance without overriding user settings in unexpected ways.

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