I have a widget with a prefs activity. In that activity the user is allowed to select his refresh rate.
Does anyone know how I can change the refresh rate via code?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Schedule an update service to start according to the selected refresh rate using AlarmManager. Save the refresh rate to a preference. Update the widget from the service. Schedule next update from the service based on refresh rate in the preference. If the user changes the refresh rate, cancel any alarms and reschedule.