-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fix launch commands to work with file provider in next fkodi #320
Comments
I'll test this once it's merged into an alpha |
They might be waiting on us to merge it. If an emulator needs the extras for it to work then the current PR isn't sufficient so we should tell them now if that's the case. |
ok. I've got one to work.
Still haven't got PPSSPP to work but at least it proves it works. |
ok working with PPSSPP.
One important thing is the storage has to be internal storage rather than an external. it won't warn you about it. It will just fail to recongnise the content as it will be sent without the fileprovider change. so perhaps IAGL needs to put in a warning? |
Thanks for testing. I'm guessing I'll put in some extra settings and/or notifications to let people know. It seems both ways work depending on the emulator being launched. |
@zach-morris I guess the question is if there are any commands that absolutely require the shortcut/extras instead of using the dataUri. These won't work and would require a different change to kodi so it would be nice to let them know now if thats the case. I only use a couple of external emulators though. |
Retroarch doesn't take datauri as far as i know. |
@zach-morris thanks. I've passed that on. Duckstation seems to be another. It would be nice to have retroarch work because it would be one less instruction to have to tell people they need to enable "all file" access to make retroarch work. |
Kodi doesn't need to convert any internal paths in the other apps. It wouldn't be able to anyway since it doesn't have permission. The config path and core path are both internal, and while they're currently needed to launch, they don't need to be converted (just known, which they are currently in a very manual process performed by the user). Even if this non-data uri option can't be accomplished in Kodi, i think it's a good change. It would likely be better for the other emulators to change their manifests to support datauri's since thats the method other apps and frontends have to send files. |
But it would be nice if the ROM path was converted even if it's in the extras. I'm just not sure how kodi would know that without a change in the execute api. |
Looking at the implementation, i see why it doesn't convert extras. There's no reliable way to know if it's a path that needs sharing since extras are too generalized. It would need another discrete API function like StartAndroidActivity. Something like AndroidGrantUriPermission(activitytosharewith,filename) exposed in python, and then the translatedpath would be passed instead. This is a pretty specific use case though. I doubt the Kodi developers would want to make such a change just for launcher addons. I think pushing for a change to the emulators androidmanifest is more likely. This is the way it should be done, since new Android OS' restrict passing the filenames in other ways anyway. It's still possible IAGL can work around this. I'd have to experiment though. I could sent a datauri in addition to the extras. If i can translate the path in python and use that in the extras (generate the same share uri that Kodi does), since the file is already shared, it should work. The emulator would just throw away the datauri value passed since it's unused. Since permission was already granted though, it would in theory still have access to the file. |
Thats pretty clever. The content url generated seems predictable so it should work |
@zach-morris so they have fixed the problem with external drives. At least those that can be accessed via /storage. So if you are testing then use this latest build |
@zach-morris unrelated question about the retroarch launch command. If retroarch on android doesn't let you have the cores anywhere else other than it's internal storage, do you really need to ask the user for the location of teh retroarch config? can there be a simpler setup that just involves assuming the cores and config are in the default place? |
'Default' is a misnomer. It depends on the system. There are currently 11 different possible default locations for android. Every Android flavor does things differently unfortunately. It would be an awesome change in the retroarch android just to use the current config file and default core directory. If the user doesn't provide a config, then fallback to the current config. Similarly, if i only provided a core name, then it would load from the default core directory. As far as i know, these are required though: |
It looks like to make it work with the file provider API in the upcoming Kodi we can't use extras. There is an example of ppsspp working without it
xbmc/xbmc#24075 (comment)
Not sure if other emulators can be called the same way.
Retroarch needs at least two Params I think but only one needs to use the file provider API.
The text was updated successfully, but these errors were encountered: