libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.4k stars 1.84k forks source link

Android: allow setting RetroArch as launcher #15866

Open rogalian opened 1 year ago

rogalian commented 1 year ago

Please could we allow RA to be set as a Launcher on Android?

This will require the AndroidManifest.xml changing, adding two lines.

Before:

<intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
                <category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
                <category android:name="tv.ouya.intent.category.GAME"/>
 </intent-filter>

After:

<intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.HOME" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.LAUNCHER"/>
                <category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
                <category android:name="tv.ouya.intent.category.GAME"/>
 </intent-filter>
hizzlekizzle commented 1 year ago

What would this provide?

rogalian commented 1 year ago

It would mean that Android devices could boot directly into RetroArch, and allow the Android home button to call/return to RA.

It's quite common on Android for users to install an emulation frontend which takes the place of the main application launcher, but RA cannot be used this way and can only be called from another launcher rather than being the main one.

hizzlekizzle commented 1 year ago

Ohhh, I see. Yeah, that sounds like a great addition. That's all it takes, eh? Would you mind throwing that into a pull request?

rogalian commented 1 year ago

It should be all that needs doing according to Android docs. I spent all of yesterday trying to get a build environment set up to test (and failed, couldn't get Gradle going), but it shouldn't have any negative effects.

I'll need to research how to make a pull request, lets see how the week goes :)

whmzsu commented 1 year ago

Nice idea, and maybe there should be an option in retroarch to set that or a link to launch android "settings", otherwise there maybe no way to access the android other functions.