Flutter app icon notification badge no longer working - flutter

The app icon's red badge number no longer seems to update on the app icon whenever I get a push notification and I'm not sure why.
Recently, I dealt with the problem of the app icon red badge not going away after push notifications are received, so I implemented the flutter_app_badger package in order to get rid of the app icon badge number after going to a specific part of the app.
But however this introduced a new problem of the app icon badge no longer appearing at all now whenever I receive push notifications.
So instead I tried another package called flutter_dynamic_icon, which has the ability to alter the badge number on the app icon as well and unfortunately the problem of the app icon badge not appearing still persists.
The idea is whenever the user goes to a certain new part of the app that the notification refers to, (or if the notification is clicked on) it gets rid of the notification badge icon on the app icon (or at least decrements it by 1).
So basically, the app icon badge could be altered when I implemented the package but now the app icon badge number no longer appears whenever I receive a push notification.
Can anyone help me understand why this may stop working all of a sudden after adding the flutter_dynamic_icon or flutter_app_badger package?
What would cause the app icon badge to no longer appear after receiving a push notification?
Some info if it helps, I'm currently using:
flutter_dynamic_icon (I was using flutter_app_badger, then when the app icon badge no longer appeared I switched to flutter_dynamic _icon)
Firebase cloud messaging for push notifications (though it was working before I tried using flutter_app_badger, then switched the flutter_dynamic_icon.
Thank you very much.

Related

Navigating to an external link from an ionic 4 app makes the hardware back button close the app where there is navigation history?

Navigate to an external link or display an interstitial Ad (AdMob) and then return to the app by clicking on the hardware back button. At this stage where there are pages in the history (navigation stack), clicking on the hardware back button will cause the app to close! Knowing that I had tried to register to the back button by:
this.platform.backbutton.subscribe(()=>{
this.navCtrl.pop();
// Also tried: this.navCtrl.back();
});
But it is still exiting the app!
Any idea about how to solve this?!
Actually, I had realized that navigating to an external link from the app and returning to it will not cause hardware back button issues, but the problem was that I am displaying the AdMob banner at top of the screen, and when I place it at the bottom (default position) the hardware back button is stable and works as expected even when navigating from the app to an external link and then returning back! So, I kept the banner at bottom where I noticed that positioning banner at bottom was more elegant (at least to my app).
It seems that this is one of the issues in the AdMob plugin, where I had seen other issues about the ionic AdMob plugin without solutions!

Is it possible to avoid showing app to user when tapping on a push notification in iOS?

I want the application not be shown when tapping on the notification.
I want to do some background task or just simply open a URL but not the application.
For instance, I found that I can simply add web view in my application or open the browser to open the url, but how can I prevent showing the application(not bring it to foreground)?
I also don't want to do the background task with silent push notification as I want to show this notification to the user.

How to do a clean app restart (iOS 6.1)?

I realized an app for iOS. It all goes well, works like a charm... until the device is restarted! When I manually close the app (for example, on my iPad I slide four fingers upwards, visualize the menu showing the app "alive", hold the icon of the app and press the red badge, terminating the app) and I try to open it again this is what happens to me:
First the app remains stuck on the last page visited before closing the app (I cannot tap buttons on the tab bar or do anything else)
Then, the only thing I can do is tap the Home button and try to open the app again
At this point all I get is a perfectly black screen
The restart seems to be not a real restart, or not to be clean. This is totally meaningless to me. Am I missing something?
EDIT :
Remove your application by press Hold down Application iCon From simulator/device
And then re-install app. and check it worked or not ???
If your view display with black screen then give it backGround Color redColor or as u wish.
Its iOS app natural behavior only.
When you press Home button on device, While running any iOS app it goes in background but the The app is still in background and its save application's state.
So if you Tap agin app's icon you will get the last screen where did you leave it.
Now, if you want to Restart the app from initial you need to clear it.
Go this way.
Just double press device's Home button you can see running apps on bottom like this
For delete particular app, you simply press and hold, you can see red (-) icon on app
just click on that and you are on way.
Now press Home button and Go to Start app!!
The problem is that Xcode, when it runs an app, attach to it a debbuger which prevents it to close normally and causes problems in the reopening. Thank you very much to this guy who pointed out the problem: https://stackoverflow.com/a/15176137/1272105

Customizing UILocalNotification Alert - with swipe slider or buttons

I know this has been asked before. However...
While until recently I thought that the only possible and accepted Alert is the text with 2 buttons I found some apps which have a different local alert.
So I assume there is an accepted way to customize the lokal Alert. Is this correct or have these apps just "slipped" into the store somehow - as I know this happened before with feature and then the app disappeared from the store suddenly.
I could not find anything about it.
Many thanks
As of iOS 5:
When a UILocalNotification is delivered while the device is locked, it appears on the lockscreen with a swipe slider to open the app.
If the notification is delivered while the device is in use, it can appear either as a banner across the top of the screen, or as an alert with two buttons.
One button is always a cancel button.
The other button opens the application. You can change the text of this button by setting the alertAction property.
You can disable this action button on the alert by setting hasAction = NO on the notification).
There are no other available ways a notification alert can arrive, unless of course the device is jailbroken. In that case, many things are possible.
Before iOS 5, only popup alert notifications were supported.
Due to the nature of iOS, it is technically not possible to deliver a notification in any other way, or customise the alert, as the notification delivery is handled by the system and the app has no access to the system UI, and so cannot display any messages by itself. And even if you did somehow manage that, Apple wouldn't allow it.
Read the UILocalNotification docs here: http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Reference/UILocalNotification_Class/Reference/Reference.html for more detailed information.

Keep specific notification on the top of the notifications center

I want to simulate a lightweight iPhone "widget" by having a specific notification in the notifications center that opens the app and performs a quick action (i.e. "Add new task").
The problem is that when I get new notifications (push or local notifications), the widget task is pushed down, and the most recent notification becomes the first one.
I tried solving this by adding a repeat interval for the "widget" notification, but the problem is that it duplicates this notification, and since I'm in the background I can't cancel the previous ones.
Any ideas?