How to show dot badge instead of counter badge in app launcher icon? - flutter

I am using flutter_local_notifications: ^9.7.0 to show notification and that's really nice package, using that package I am available to get badge with icon "1" when notification pops up. What I would like to ask.. instead of showing "1" badge, I would like to show dot badge. Is there a way to do that using flutter_local_notifications or any other package ?

Notification Badges are Platform's entity & unfortunately, you can not do anything to change it.
As mentioned in Android docs
These dots appear by default in launcher apps that support them and there's nothing your app needs to do.

Related

How to make the flutter app shows as it's an IOS version app inside android

I have a flutter app on an android device, it shows the app with the android adaptive things such as the date picker, the app bar, the dialogs...
I want to try a version of the app like it's on IOS, I mean I want that date picker shows as the IOS's, also for the app bar.
I'm pretty sure that this is related to the MediaQuery, but I just don't know what is it.
I know that I can show forcefully the widgets from the Cupertino library, however, I don't want to do it, I want just to get how the app will show when it runs on IOS with the current code.
Thank you !
Wherever you're setting your theme, you can simply set the platform property on it to TargetPlatform.iOS.
This should allow the theming to use iOS-specific widgets rather than their android counterparts. Note that this may not work everywhere; if Dart:io's Platform were used incorrectly in your code or 3rd party code for theming, this would not be overridden.

Is there a way to launch notes application in flutter from button click?

I have a button in my app. On click of the button, I want the notes app in the device to get launched whether iOS or Android. I there a way around this with flutter? I haven't discovered any solution yet.
Yes there is this plugin external_app_launcher will helps you to open another app from your app by providing PackageName for Android and URLscheme for IOS external_app_launcher

Flutter show app icon badge on push notification

I'm looking for a way to show an app icon badge when a user receives a push notification.
I'm using the Firebase_messaging plugin for flutter for the handling of the push notifications and flutter_app_badger for the app icon badges.
But I want to combine the two so that the number is set on the icon without opening the app. Is it possible to make this happen? Or am I overlooking something obvious from the firebase_messaging plugin?
Sorry for the horrible explanation. I hope someone can help me with this issue.
App icon badge depends on the Application Launcher
Some of the Android Application Launcher includes this functionality by default, You can check this on Settings->Apps->Notification
Attached image
FYI
How to show notification count on app icon like Facebook?
How does Facebook add badge numbers on app icon in Android?
adding notification badge on app icon in android
My suspicion is that you have an icon that isn't compatible with the icon guidelines in your device. I suggest trying https://pub.dev/packages/flutter_launcher_icons to make icons for your device.
I think you try to create stream when run app to real time listen doc changes in Firestore. Read here How to listen for document changes in Cloud Firestore using Flutter?
And the icon can be update in background but without opening app is impossible I think.
I don't have a direct answer because I haven't encountered this issue before, but this might fix your problem
Ensure that you have defined the icon for your application properly - for flutter, here are the steps you should have:
Import the package into your pubsec.yaml file - it should be called flutter_launcher_icons: "^0.8.0" and imported under the dev-dependencies section of the pubspec.yaml file.
After the dev-dependencies section, add a new section for flutter icons as so:
flutter_icons:
ios: true
android: true
image_path_ios: "{Icon File Path}"
image_path_android: "{Icon File Path}"
Hopefully this helps, and good luck with fixing your issue!
Using https://pub.dev/packages/firebase_messaging for notifications ,
for Android Background notifications you can add this in your AndroidManifest.xml file in your application tag. And make sure you have androidlogo.png (this is example name) present in your drawable folder.
<application>
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="#drawable/androidlogo" />
</application>
In case of foreground notifications, you must be using Flutter Local Notifications, so you can provide the same while initializing like
var initializationSettingsAndroid = new AndroidInitializationSettings('androidlogo');
flutterLocalNotificationsPlugin.initialize(initializationSettings, onSelectNotification: onNotificationClicked);
And for application icon you can use this library https://pub.dev/packages/flutter_launcher_icons which is also suggested by answers above.
In case of iOS, your launcher icon will your notification icon.
And for display of badge icon you can use https://pub.dev/packages/flutter_app_badger. (For supported phones).
So using all this you will get both app icon with badge and notification icon as your app icon (or specified by you).
You can control the badge count from the notification payload.
If you send a notification manually from Firebase Console, you can set the badge count on Additional options step:
If you send it programmatically, add this payload (iOS example):
{"aps":{"alert":"Enter your message","badge":1,"sound":"default"}}
For more payload options, check out FCM documentation

cordova-plugin-smooch issues with iOS/Android app built using creator.ionic.io

Am using http://creator.ionic.io to create a hybrid iOS/Android app.
Have added cordova-plugin-smooch as a plugin in Code Settings.
Have added ionic-native.min.js.
Have added smoochio.js with following code...
Smooch.init({
"appToken": "MY-TOKEN",
"soundNotificationEnabled": "true",
"imageUploadEnabled": "true",
});
The smooch.io button appears in the app but I think it's not 'native' because when user tries to type in message field, the iOS keyboard goes on top of the message input field so user can't see what they are typing. Also, in the smooch.io message window header, the 'X' or close icon doesn't show up...
Not sure what I'm missing to activate the 'native' plugin so it functions correctly on the phone. Thanks for any help.

Can we write the action for Home button in iphone

I am going to develop an application which will be posted in cydia. My requirement is after unlocking the iphone when the user clicks the home button then my application need to be popedup(run) ..
is it possible to do this?
if yes how?
You can do this without any extra code by changing the settings in Activator. The app doesn't need to be in Cydia, either.
Confirm you have Activator installed from Cydia.
Go to the Settings app, followed by Activator.
Choose which environment you want the action to run in: Anywhere, Home Screen, in an app or Lock Screen.
Scroll down to “Home button” and tap the action you want.
Scroll down again, until you see the app you want. Tap it and confirm there is a check mark next to it.
Now your app will start every time the action occurs. If you want this to be automatically set when your app is installed, however, you'll need to include the libactivator header in your code and use its API to set the action. Because the header isn't included with iOS, you'll need to make the app for Cydia.