Skip to content

Commit

Permalink
Auto cancel notifications.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruiaraujo committed Nov 19, 2013
1 parent 3a00e72 commit 81ac156
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions android/src/org/exobel/routerkeygen/NotificationUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public static NotificationCompat.Builder getSimple(Context context,
return new NotificationCompat.Builder(context)
.setSmallIcon(R.drawable.ic_notification).setTicker(title)
.setContentTitle(title).setContentText(text)
.setOnlyAlertOnce(true).setAutoCancel(true)
.setContentIntent(getDefaultPendingIntent(context));
}

Expand All @@ -43,6 +44,7 @@ public static Notification createProgressBar(Context context,
content);
builder.setContentIntent(i);
builder.setOngoing(true);
builder.setAutoCancel(false);
final Notification update;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
builder.setProgress(max, progress, indeterminate);
Expand Down

0 comments on commit 81ac156

Please sign in to comment.