When the preferences activity loads the pebble preference item is removed from the preference category if the pebble app is not installed. I hope this is sufficiently simple.