removing number from notification icon
you can remove the span on click.
$(".glyphicon").on("click",function(){ $(".badge").remove(); });
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><h2>Click on ICON below to remove the number </h2><li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <span class="glyphicon glyphicon-globe">(ICON) </span>Notifications <span class="badge">10</span></a> <ul class="dropdown-menu"><li>
Swift- Remove Push Notification Badge number?
You can "remove" the app badge icon by setting it to 0:
Swift < 3.0
UIApplication.sharedApplication().applicationIconBadgeNumber = 0
Swift 3.0+
UIApplication.shared.applicationIconBadgeNumber = 0
This question shows when you can use it: How to clear push notification badge count in iOS?
Removing the badge number when local notification is canceled
I guess that you are trying to remove the badgeNumber
from the badge icon and show only an empty(without any number) badge icon.
You can not just remove the badge number alone from the badge icon. If you set applicationIconBadgeNumber
to 0
, the badge icon itself will be removed from the application icon.
If the badge to be shown then there should be a number, not a 0
. 0
is inteneted to remove the badge icon.
Remove LocalNotification Badge Number from launcher icon
[UIApplication sharedApplication].applicationIconBadgeNumber = 0;
Add that line in whatever code handles the user's interaction with the local notification. If you want the badge to be cleared when the local notification fires, you can't (because setting the notification's applicationIconBadgeNumber
property to 0
would simply mean "don't change the existing badge.")
Can I disable notification badge on android and small notification icon?
To disable Notification badge you can use setShowBadge(false) on your NotificationChannel
object.
Checkout more Modify a Notification Badge.
The other part of i.e removing small icon . AFAIK its not possible since its a mandatory in place of large icon. Although I am not completely sure about it .
As a work around you can use a small icon with transparent background.
Related Topics
Call a Function from an If-Statement Inside a Function
Regular Expression to Check Only One Decimal Point
How to Manipulate a Select Options Based on Another Select Option in HTML
How to Have Multiple Buttons of Same Id Value and When Click on Any Button the Pop-Up Should Come
Random Numbers Between 1 and 50; 50 Times
Postman: How to Check Whether the Field Is Returning Null in the Postman Automation
Pass Dynamic Object in Onclick - Javascript/Jquery
How to Add Node Module to Angular Project If Is Not Schematics Enabled
Changing the Value of Json Object's Key, Changes Other Values Also
How to Vertically and Horizontally Center a Component in React
React-Native: Application Has Not Been Registered Error
How to Check If a Textbox Is Empty Using JavaScript
Accessing Variables from Other Functions Without Using Global Variables
How to Access Session Variables and Set Them in JavaScript
Append Data to Json Array Issue
Redirect Another Page After Successful Form Submission
How Display Selected Item from Bootstrap 4 Drop-Down Item Menu