hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.02k stars 2.15k forks source link

Android intent Api #19052

Open appt2 opened 5 months ago

appt2 commented 5 months ago

What should happen

Hello, can you create an api for ppsspp so that external programs can receive the game path directly through intents and then run it in ppsspp? I will give a sample code to receive the game from another program.


Intent intent = getPackageManager().getLaunchIntentForPackage("org.ppsspp.ppsspp");
    if (intent != null) {
      intent.setAction(Intent.ACTION_SEND);
      intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
      intent.putExtra("org.ppsspp.ppsspp.GAMELUNCH", "/sdcard/downloads/godofwar.iso");
      startActivity(intent);
    }

Who would this benefit

.

Platform (if relevant)

Android

Games this would be useful in

not game

Other emulators or software with a similar feature

No response

Checklist

hrydgard commented 5 months ago

We have this already, but not very well documented I suppose. I seem to recall that we did actually document it somewhere, but can't find it right now. In PpssppActivity.java in onCreate you can find the code that handles intents.

This issue can be about documenting it properly (or maybe making some change to make it easier to use).

appt2 commented 5 months ago

We have this already, but not very well documented I suppose. I seem to recall that we did actually document it somewhere, but can't find it right now. In PpssppActivity.java in onCreate you can find the code that handles intents.

This issue can be about documenting it properly (or maybe making some change to make it easier to use).

Yes, I know, but since you didn't use AppCompat, this issue is very difficult. Accessibility, I suggest you use AppCompat and at least sdk 21. Now is the new age and 99% of users have powerful mobile phones.

hrydgard commented 5 months ago

Nope. Supporting every old phone is a bit of a point of pride at this point.

Also, it's unclear if AppCompat is compatible with the GPL.

appt2 commented 5 months ago

Nope. Supporting every old phone is a bit of a point of pride at this point.

Also, it's unclear if AppCompat is compatible with the GPL.

I tested and the program was built well for me

hrydgard commented 5 months ago

I mean with the GPL license - is it allowed to link Appcompat with a GPL application and ship it?

Actually seems the answer is yes - it's Apache-licensed. I confused it with the other google library for admob and stuff which is not. So that's not an issue at least.

appt2 commented 5 months ago

I mean with the GPL license - is it allowed to link Appcompat with a GPL application and ship it?

Actually seems the answer is yes - it's Apache-licensed. I confused it with the other google library for admob and stuff which is not. So that's not an issue at least.

Don't think about these small things, there are few people who care about the license, if you look in my repository, you will see that the app that I develop is without any license, the quality of the app is more important, besides, you only called the activity class, if it is AppCompat SAF license is easier to get

hrydgard commented 5 months ago

I happen to care about licenses, and many contributors do too.

Moving on. How exactly would AppCompat help here?