How can I make my phone check my website in a background every 30s and activate voice alert that will ignore silent mode if website says for example '1'? Pushing from server to phone is also acceptable but I guess much more difficult and is susseptable to hangs when conectivity is bad. So far i;ve been using Light Flow Lite and additional gmail account - sending myself any email there triggers alarm.
You could try pushover.net, which provides an easy-to-use API for sending notifications to your Android or iOS device.
It should be very efficient, because it's already using Google Cloud Messaging to deliver your push notifications, thus it should not have any adverse effects on the battery life, unlike your proposed solution of manually doing the polling every 30 s.
One possible solution involves the app Tasker (paid app worth every cent; head to the dev's site for a free trial). It's probably the most complete automation solution on Android (see also the tasker tag-wiki), and supported by legions of apps and addons if you need additional features.
Hint to get started: Tasker can do HTTP-GET as well as HTTP-POST. It can write-to and read-from files, play with variables, and more. So for the task you're looking for: HTTP-GET the URL, compare the result with your conditions, and trigger the wanted action. I never tried this myself, so the example below might not be accurate – but it should get you started:
- Condition: Time, all 30s
- HTTP-GET the URI
- Set sound volume to X IF content ~ 1
- Notify-Sound (specify notification text and sound) IF content ~ 1
So basically, this retrieves the URI all 30s, sets the volume to a given value (if content was "1"), and triggers the alert in this case.
You might need to fine-tune this concerning re-setting the original volume, and some other things to your convenience – but the principle should be clear. Good luck, and enjoy!