–First off I am aware this is invasive, I’m trying to make an alarm–
I’m looking to create an Android app that sets an alarm which will play Twitch audio without any interaction from the user. For the alarm part I’m using AlarmManager However I am struggling to get twitch to autoplay on the locked phone screen when the alarm triggers.
My two leading ideas for how to do this (on Android) are:
Idea#1: Embed twitch player in a webpage that is shown on the lockscreen when the alarm triggers: Twitch Embed Fullscreen intent However the player is muted and I haven’t been able to find a way around this (and doesn’t seem like it is supported) [Similar issue #1]I am unable to mute/unmute video/clips in twitch preview [Similar issue #2]How to unmute clips on load? - #2 by BarryCarlyon
Idea #2: Just launch a stream using the Twitch app while the screen is locked. This is currently how I am starting a stream for Youtube audio and it launches while the phone is locked in the background fine. I know there is some functionality for this in the Twitch android app due to being able to play streams without the app open by changing settings in a stream. However currently if I try to launch a stream using Twitch while the screen is locked, as far as I can tell the video doesn’t load until the user opens the phone.
Any tips hints or ideas from anyone?
Cheers
Hamish