Skip to content
Coding Fanatic
  • Android Development
  • News and Reviews
  • Road2Pro
  • Tutorials
  • Services
  • About

Game Over, 16/100 Days of Code

  • March 5, 2019March 14, 2019
  • by Richard Clarke

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

Related

Tracing is Fun! 15/100 Days of Code
Hello Trello, 17/100 Days of Code
Richard Clarke
Richard is currently a developer using Java and Android Studio to build custom applications for Android. Richard tutored in mathematics at Montgomery College, and worked in Information Technology before entering the Software Development industry as a Quality Engineer.
100daysofcode AndroidDev Java Tiles

Related articles

Your New Favorite Stopwatch App!…
Two for Two BABY! 7…
…But the App is for…
Play Store Blues – 5…
Top 4 Tips for Android…
No Dice – 3 of…

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Join the mailing list!

This field is required.

Check your inbox or spam folder to confirm your subscription.

Follow me on social media!

  • GitHub
  • YouTube
  • X
  • Instagram
  • LinkedIn
My Tweets

Join the mailing list!

This field is required.

Check your inbox or spam folder to confirm your subscription.

Follow me on social media!

  • X
  • GitHub
  • LinkedIn
  • YouTube

Archives

Theme by Colorlib Powered by WordPress