-
Notifications
You must be signed in to change notification settings - Fork 1
Frontend Support
Swiff offers support to show your Flash games inside Android frontends, this page was made for frontend developers who have interest on supporting Swiff.
Swiff option for "Frontend sync" generates a .swiffid file on the folder the user chose. This file contains the game ID for Swiff to launch it inmediatly on boot, you will need to provide this file to Swiff when launching the app using Intents. A basic launch command using ADB would look like this:
adb shell am start \
-a android.intent.action.VIEW \
-d "SWIFFID_FILE_URI" \
-t "application/octet-stream" \
-n io.navivani.swiff/.MainActivity
You will need to replace SWIFFID_FILE_URI with the actual URI of the file generated by Swiff, everything else is handled automatically by the app.
I recommend launching games on frontends using .swiffid files since it's the most easy way to implement support, however Swiff also allows to open games directly if you know the ID of the game, you can check this ADB command to see how it works.
adb shell am start \
-n io.navivani.swiff/.MainActivity \
-a android.intent.action.VIEW \
--es io.navivani.swiff.GAME_ID "GAME_ID_HERE"
You will need to replace GAME_ID_HERE with the actual game ID that it's registered on the Swiff database. This method is used on Android shortcuts.
Custom games are supported, every custom game generates their ID with a CUSTOM_ tag at the start so they are identified correctly and never collision somehow with an official game ID.