public static void showFinishedNotification(String content,int time,boolean error,Context context,Intent intent){
  if (context == null)   return;
  NotificationManager mNotMan=(NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
  int icon=R.drawable.icon;
  CharSequence title=String.format((String)context.getText(R.string.Utils_DownloadFinishedTitle),time);
  CharSequence ticker=context.getText(R.string.Utils_DownloadFinishedTicker);
  CharSequence text=content;
  if (content == null)   text=context.getText(R.string.Utils_DownloadFinishedText);
  if (error) {
    icon=R.drawable.icon;
    title=context.getText(R.string.Utils_DownloadErrorTitle);
    ticker=context.getText(R.string.Utils_DownloadErrorTicker);
  }
  Notification notification=buildNotification(context,icon,ticker,title,text,true,intent);
  mNotMan.notify(ID_FINISHED,notification);
}

public static void showFinishedNotification ( String content , int time , boolean error , Context context , Intent intent ) { if ( context == null ) return ; NotificationManager mNotMan = ( NotificationManager ) context . getSystemService ( Context . NOTIFICATION_SERVICE ) ; int icon = R . drawable . icon ; CharSequence title = String . format ( ( String ) context . getText ( R . string . Utils_DownloadFinishedTitle ) , time ) ; CharSequence ticker = context . getText ( R . string . Utils_DownloadFinishedTicker ) ; CharSequence text = content ; if ( content == null ) text = context . getText ( R . string . Utils_DownloadFinishedText ) ; if ( error ) { icon = R . drawable . icon ; title = context . getText ( R . string . Utils_DownloadErrorTitle ) ; ticker = context . getText ( R . string . Utils_DownloadErrorTicker ) ; } Notification notification = buildNotification ( context , icon , ticker , title , text , true , intent ) ; mNotMan . notify ( ID_FINISHED , notification ) ; }
shows a notification with the given parameters
