Game Over, 16/100 Days of Code
I did what I could for my mother’s phone. In the end, I failed. It turns out there’s no way to build this Tile for her phone. My application was unable to obtain the proper permissions.
I found the TelephonyManager class on the Android API. It has a method called setDataEnabled which can toggle mobile data on and off. Apps require permission to MODIFY_PHONE_STATE to Import the Telephonymanager class. Unfortunately, this permission isn’t available for third-party applications like the one I’m building.
This leaves me with a couple options. I thought about rooting her phone. She’d gain administrator privileges, giving her access to the app. However, malware would execute easily since root access provides access to all files on the phone.
The best course of action is to buy her a new phone. Only this time, I’ll confirm the features she needs before making the final purchase. Even though it didn’t work out, I learned a lot about setting up Tiles for Android. This gives me a few ideas for future projects too.
-CF