Closed boralyl closed 4 years ago
After doing some more research I realized that you can't start capturing the screen without an activity. I was able to get this working with these changes: https://github.com/abrenoch/hyperion-android-grabber/compare/master...boralyl:feature%2Fmake-exportable?diff=unified&expand=1
To start the service:
adb shell am start com.abrenoch.hyperiongrabber/com.abrenoch.hyperiongrabber.common.BootActivity
To stop the service:
adb shell am startservice -a com.abrenoch.hyperiongrabber.service.ACTION_EXIT --ei com.abrenoch.hyperiongrabber.service.EXTRA_RESULT_CODE -1
Please make an PR. Thank you for your commitment
Fixed in #150
I'm looking for a way to allow automation through tasker/home assistant/etc. to be able to start/stop the hyperion screen service on my nvidia shield. I know it's possible to launch the ToggleActivity using
adb
:This works, but it still starts the activity and requires me to click the power button then back out to my playing media. Ideally I'd like to be able to use adb to start and stop the service so that the lights turning on are more seamless and doesn't require user interaction. I attempted to change the exported attribute to True and run a debug apk on my device but I can't seem to get the service to start.
I'm not super familiar with services so I may be missing something in the manifest or the adb command isn't quite right. Would it be possible to make this work?