-1

I recently bought a Philips Android TV, and I want to add it to my home automation setup.

The expected behavior would be: - Runs in the background, and listens on a certain port for HTTP request. - Upon request by the home automation request (HTTP request), change channel, change volume, ... - Maybe when the TV is on standy, listen and turn it on if asked. I don't fully understand Android TV's behavior on stand-by.

I have looked over the Internet, and I haven't found anything matching my needs, so I figured I would do it myself.

The situation:

I am a 'practical developer'. My job is chemical engineering. I learned FORTRAN in school, and once in a while, when needed, I write a bit of code to help, whether JS, C, VB, etc...

I have never used Java nor Android SDK.

I have tinkered around with Android Studio and have been able to display an "Hello World" on my TV.

The TV can't be rooted, but I can sideload apps with adb.

The question is: Is this a reasonable thing to do when self-learning Android development completely, or will I run into important roadblocks doing this?

Thanks a lot for your help evaluating the difficulty of this, as I am a bit in the dark :)

Maxime
  • 143
  • 2
  • 3
  • Despite being clear and well-written, this question is opinion-based and too broad for a Q&A site like SO. SO is for concrete programming questions. – Janus Varmarken Aug 09 '16 at 23:41

1 Answers1

0

Android has the ability to run a Service in the background which can listen to a port and do other things.

Android TV has two stand-by modes. When the user has not been inactive for too long, it displays a screen saver. When the inactivity is longer, the device will enter a lower-power mode, although it can be woken up.

This beginner project may have a number of different parts, though it shouldn't be too hard to do because each step is relatively easy.

Nick Felker
  • 11,536
  • 1
  • 21
  • 35
  • Thanks a lot for all this information. A few follow-up questions: - Is it possible for a service, without root, to switch channels on the TV app, without root? - What about 'old-fashioned' stand-by, meaning that I hit the power button on the remote control? What is the status of Android TV at this point? Thanks a lot. – Maxime Aug 10 '16 at 18:48
  • * It is technically possible to switch channels in the TV app by calling a particular intent, although I don't know if third-party apps can access information about channels they don't own. * I don't know, but I believe hitting the power button on an Android TV is akin to locking your phone (aside from it actually locking). – Nick Felker Aug 11 '16 at 18:03