mueller-ma / Coffee

Android Quick Tile To Keep Screen On
Apache License 2.0
324 stars 30 forks source link

Activity/service/broadcast reciever I can use with `am` to toggle coffee? #325

Closed sudomain closed 6 months ago

sudomain commented 7 months ago

Hello,

Thank you for the app. As the title asks, is there a component that I can use with the am tool to toggle Coffee?

Also it doesn't really affect me since I'm on Android 11, but the FDroid app description reads "Requires Android 7 or higher." But the actual minimum version reads "Android 5+". It seems the minimum version went from Android 7 to Android 5 in Coffee version 1.5. Perhaps the FDroid description didn't reflect this change?

Thanks again

mueller-ma commented 6 months ago

What is am?

A tile in the quick settings, the place that holds the toggles for e.g. Wi-Fi and Bluetooth. Requires Android 7 or higher.

This statement is correct as the quick settings tile requires Android 7. Other features work on Android 5 as well.

sudomain commented 6 months ago

Ah sorry the first time I read it I thought it meant 7+ was required for the app. My mistake.

am is a command line tool that sending intents in Android, allowing users to start activities, services, and send broadcasts to broadcast receivers. The version I use is from Termux. I wish to start the component of coffee that toggles coffee in the background, so hopefully a service or broadcast reciever does this

mueller-ma commented 6 months ago

You can have a look at https://github.com/mueller-ma/Coffee/blob/main/app/src/main/java/com/github/muellerma/coffee/ForegroundService.kt. Maybe there's something you can use with am.