Android front-end

Congrats on getting the android version of this great architecture out there.

I’ve developed an android app that I use to browse movies/music and TV. I would LOVE to add support for RetroArch into that app. Is it possible for front-ends to launch directly into a game. If so is it done through the use of Android Intents, could someone provide an example of an intent.

Thanks in advance.

Yes, RetroArch is a dynamic library. You can start it using a NativeActivity with some extras:


                myIntent = new Intent(this, NativeActivity.class);
                myIntent.putExtra("ROM", data.getStringExtra("PATH"));
                myIntent.putExtra("LIBRETRO", libretro_path);
                myIntent.putExtra("CONFIGFILE", getDefaultConfigPath());
                myIntent.putExtra("IME", current_ime);
                startActivity(myIntent);

In Android manifest:


        <activity android:name="android.app.NativeActivity" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale">
            <meta-data android:name="android.app.lib_name" android:value="retroarch-activity" />
             <meta-data android:name="android.app.func_name" android:value="ANativeActivity_onCreate" />
        </activity>

Thank you very much.

Sorry I need to ask for a little more detail.

LIBRETRO = folder on the device that contains libretro-core.so CONFIGFILE = config file from somewhere in the RetroArch installation IME = no idea…

Please read the source for more detail: https://github.com/Themaister/RetroArch/blob/master/android/phoenix/src/org/retroarch/browser/RetroArch.java#L403