Grab text file from Andoird App to control motor and LED

Hello forums. I've written an Android app that generates a text file in a TinyDB on the phone. The text file contains motor on/off sequences and LED on/off sequences.

What would be the best approach to have the Arduino grab the text file and be able to use the contents to control a DC motor via PWM and a LED to show on/off?