So I've decided to use my free time more productively and make an android app. Basically, it's an app that is a timer that will automatically switch your phone to silent mode during a specific time period of the day. This can be useful if you are forgetful and never turn on silent before going to school/office.
The thing is, I don't know the code that will turn on/off silent (OR vibrate ) mode of your phone. I'm using the Google App Inventor to start off, I have everything in place (A list of items to select the required mode and 2 text boxes to indicate the time the mode will be active). I have 2 problems though.
1. I don't know the enable/disable silent/vibrate mode code.
2. I don't know how to connect the text box showing the time with the specified mode, and how 1st text box will turn it on, 2nd text box will turn it off.
Any help is appreciated. Thanks!