Open plia7 opened 9 months ago
@wsvn53 有这方面的更新吗? 这可行吗?谢谢.
Hello @wsvn53,
Let me explain why this feature is needed:
Basically I have a shortcut on my iPhone that would open scrcpy-ios using the ios url scheme, but the shortcut also supposed to look like an app icon, so when it opens, I want to basically see the same when it connects to the app.
Right now, I use the android adb, to send a command
adb shell am start -n $launchApp
Before connecting with scrcpy-ios so when I’m connected the app opens.
The problem is it’s slowing down the process for me to first issue this command.
Since scrcpy-ios already uses adb to talk with the android phone, I think it should be easy enough for you to execute that command if I provide you with the full app main package activity name so by the time scrcpy-ios connects the app already opens?
For example, on my android I have the ChatGPT app which I don’t have on my iphone (because I’m using a lower ios version which is incompatible).
So I created a shortcut that looks like ChatGPT icon and name and now when I click it, it uses scrcpy-ios to connect, but before it tells the android it needs to open ChatGPT app. The problem is it’s slightly slowing down the process of quickly connecting to the android phone with that app being opened.
Please let me know what do you think.
Thank you.
@wsvn53 Here is a video illustration what it should look like (and hopefully it will be even faster with this new option added):
For the shortcut I'm using here is:
scrcpy2://host:42011?stay-awake=true&launch-app=com.openai.chatgpt/.MainActivity
https://github.com/wsvn53/scrcpy-mobile/assets/134864072/0511281a-1dbe-45e3-a20a-d60493432614
Thanks.
@wsvn53 Actually instead of a specific adb command (like launch) can you let the user add any custom command for example:
adb shell am start -a android.intent.action.VIEW -d http://www.stackoverflow.com
I guess you can do that through a new ios url scheme? That way it can be used for any case needed and it will be more general.
Thanks.
This would be awesome, something like a manual mode. My goal is, using a dummy hdmi, trigger Samsung Dex and be able to view it in iPad using this app, by triggering the adb scrcpy parameter --display 2 to force Dex display instead of the main android phone display.
Hello,
Is it possible for you to add a new parameter to the URL scheme called launch-app, so if I pass a value to it, it will launch this app when I connect?
For example: scrcpy2://host:42011?stay-awake=true&launch-app=com.kendamasoft.notificationmanager/.view.GroupListActivity
This will result in launching the Notification Manager app when I connect.
Since you have access to the adb of the host, you could just execute the following command:
adb shell am start -n $launchApp
or in this example:
adb shell am start -n com.kendamasoft.notificationmanager/.view.GroupListActivity
Thank you.