I use Android Automate to do this, following Using Beeminder with Android Automate.
After setting up the Beeminder Service, I use this Automate Flow to Beemind phone checks that are longer than 45 seconds. It gives some false positives but it works well enough for me.