Comments (6)
The work on our queue is to add the following methods:
- setBadgeNumber
- getBadgeNumber
- setAutoBadgeEnabled
- isAutoBadgeEnabled
You probably will be able to get to the work before we do, so if you wan't to add to the plugin I can help you. The react-native module has these methods already so you could take a look at how that is done.
from airship-flutter.
Thanks for the feedback, Ill add this request to our work queue
from airship-flutter.
Thanks for the feedback, Ill add this request to our work queue
Thank you, also the flutter SDK doesn't provide a method to reset the badge counter.
Working on native swift code it is possible to hide it when the user open the app, but on a new notification message the counter will just increment by 1. (the backend payload is configured to do so).
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
override func applicationWillEnterForeground(_ application: UIApplication) {
application.applicationIconBadgeNumber = 0;
}
override func applicationDidBecomeActive(_ application: UIApplication) {
application.applicationIconBadgeNumber = 0;d
}
}
from airship-flutter.
You send absolute values through the payload, not increment. In order to use the increment feature, we have to sync the count from the device to our backend. If you are in native code, you could add a call to UAirship.push().isAutobadgeEnabled = true
from airship-flutter.
You send absolute values through the payload, not increment. In order to use the increment feature, we have to sync the count from the device to our backend. If you are in native code, you could add a call to
UAirship.push().isAutobadgeEnabled = true
While this has become clear over numerous trials and errors, a very important feature I'd wish this library had is the possibility to:
-
set auto badge enabled from the flutter library's dart code (initializing Airship through native code when you have already done so by using this lib is not ideal and a bit of a pain);
-
ability to have the Airship.resetBadge() method in Flutter too. I feel like this is a very important feature missing for the Flutter Library.
Thanks for the reply!
from airship-flutter.
While I've already solved this server side I truly appreciate the reactivity and the work you put on your side.
Also, nice cat!
P.s. you can mark this thread as closed if you wish so
from airship-flutter.
Related Issues (20)
- NoClassDefFoundError. HOT 7
- The size of the iOS installation package is abnormal HOT 3
- Update to Airship iOS 16.10? HOT 4
- Airship.onChannelRegistration is never called on iOS HOT 2
- iOS Notification Options support HOT 5
- Airship.activeNotifications not parsing on iOS HOT 3
- Airship.addEvent doesn't work if CustomEvent's value is null HOT 2
- iOS production key HOT 3
- Flutter 3.10.0 support HOT 1
- Airship setUserNotificationsEnabled malfunction on Android HOT 1
- iOS push messages in foreground not working HOT 6
- iOS app icon badge behaves inconsistently HOT 1
- Android device debug issue HOT 5
- Android notifications are not displayed as Heads-up notifications HOT 2
- Airship.push.iOS.resetBadge is not calling the correct method name HOT 2
- Calling Airship.push.iOS.resetBadge crashes the app HOT 1
- Airship.messageCenter.onDisplay not parsing DisplayMessageCenterEvent properly HOT 2
- Crash on launch when using FlutterEngineGroup HOT 3
- Not able to get a push notification on my iOS device from a TEST Airship project HOT 5
- Push Icon Not Appearing in Android Release Build HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from airship-flutter.