tags:

views:

70

answers:

2

Hi I don't want to display the any notification service in status bar if i saw one notification service once .For example i am displaying persons who are exceeding the 20 km distance from my location .some persons are displayed.when i saw it once then automatically the icon in the status bar is don't displayed.For this one give me some suggestions .Thanks in advance.

+1  A: 
Roman Nurik
+1  A: 

I do this:

SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
boolean used = sp.getBoolean("notif_used", false);

if ( used )
 return;
else {
 /* show the notification */
 Editor editor = getSharedPreferences().edit();
 editor.putBoolean("notif_used", true);
 editor.commit();
}
Macarse