Using LocalBroadCast instead of sharedPrefrences

sharedPreferences were being used to communicate between activity and
service but that has been replaced by LocalBroadCastManager.