I have a Bluetooth led bulb that will only work with one specific app. I want to create an app that will open the bulb app (iHomentLight) and gradually increase the brightness slider to wake me up in the morning. I want to know if it is possible to do this, and if so how?
-
Yes it is posible. – Antoniossss Sep 18 '18 at 22:25
-
1You won't have someone here give you the full run-down on how to accomplish this. You'll have to do research and show what you have tried. – Hypino Sep 18 '18 at 22:56
2 Answers
Apps are sandboxed so that someone can't use this kind of thing to take advantage of you (and steal your bank info for example). Some apps work around this via accessibility service.
How to perform Other app list item click using accessibility service like Voice Access app?
However, you are probably better off just figuring out what the bluetooth API for your bulb is and teaching your app to work with it. You'll have your app connect directly to the bulb and do it yourself. Search Google for the bulb name and see if anyone has reverse-engineered the API.
Here is an amazing writeup on how to reverse engineer a bluetooth API: https://medium.com/@urish/reverse-engineering-a-bluetooth-lightbulb-56580fcb7546
Spend some time trying this out, I think it'll be a more useful skill than messing with the accessibility service.

- 470
- 2
- 10
There are around three approaches you can take:
1 - If you have access to iHomentLight's API, you could potentially send a series of intents to the app and have it gradually adjust the light over time.
2 - If that is elusive, I'd recommend trying to sending touch commands via the terminal. For example 'input tap x y android'.
How to run terminal command in Android application?
3 - Or you can use Tasker App to make commands that will adjust the light just as well

- 38
- 1
- 1
- 7