Closed TheSpawnMan closed 1 year ago
Got the same problem. Is there a way to start it automaticly in the background when waking Shield from sleep?
I worked around the issue and setup android adk over network and ran the program on every pip notification. Works well... but sometimes I'll come home to pip being opened up to instead of the last app I used... a very minor inconveniences in my mind.
I'll save you the headache of writing the script and give you mind
ps -ef | grep -v grep | grep pipup || am start nl.rogro82.pipup/.MainActivity
Thanks @TheSpawnMan I have put these in my automation. Before calling the notification:
`- service: androidtv.adb_command data: command: >- ps -ef | grep -v grep | grep pipup || adb shell am start nl.rogro82.pipup/.MainActivity target: entity_id:
Is that not working for you? Here's my adb script that kicks off and then calls the pnp for pip This does not wake the TV and I consider that a plus I only want the TV's on when I turn them on.
alias: G4 to Chromecast description: "" trigger:
It is working for me. Just pasted what I did for people that encounter the same thing :)
Wanted to add a tip here for anyone facing the same issue i was. When I followed the instructions above it would work, but anytime pipUp was restarted it would bring the pipup app to the foreground. I finally figured out how to avoid this. Instead of doing:
am start nl.rogro82.pipup/.MainActivity
i do:
am start-foreground-service nl.rogro82.pipup/nl.rogro82.pipup.PiPupService
This insures the service is running without changing focus on screen. Since it does not change focus on screen, I opted to create an automation that simply does this on all my TVs every 5 minutes to make sure the service is always running. No need to check if it's running first (ie you can skip the 'ps -ef | grep -v grep | grep pipup'.
i was wondering how you guys keep this program running in the background if i open to many apps it auto closes and i obviously dont want this so i was wondering do you guy have a way of keeping this program always running