I’m developing a weather alarm application on Android.
I’ve integrated the buzzbox scheduler and I’ve written a task to check the weather condition every 3 hours using the cron string “0 */3 * * 1,2,3,4,5,6,7” as described here http://hub.buzzbox.com/android-sdk/quickstart
I have 2 notification types: “bad-weather” and “weather-alert” and I’m creating the messages like this:
if (ALERT == type) {
notification = new NotificationMessage("weather-alert","Weather Alert!","Tomorrow: Severe Weather",weatherDetails,R.id.icon_weather_alert);
} else {
notification = new NotificationMessage("bad-weather","Bad Weather","Tomorrow: Bad Weather",weatherDetails,R.id.icon_weather_bad);
}
How can I set up vibration for the first notification and a sound for the second type?
Also, I only see one configuration section in the settings activity. Can I open up a different configuration settings for each type of notification?
To use different configuration setting in code just add:
where the parameters are
the Notification Settings include can include different section for each of your notification type if you declare them in the manifest.xml