Repository navigation
Notifications #516
Description
Activity
Some (possibly) useful links:
somewhat related to #547
Another package, but this one seems to promise all the same platforms as Flet: https://pub.dev/packages/awesome_notifications, but it seems to require firebase.
I think it may end up being the best to implement notifications yourself in a flutter app that loads flet (https://pub.dev/packages/flet), simply because of the complications caused by each platform, I'm not sure how maintainable and up-to-date an integrated flet solution will be
Article: https://medium.com/@ndonkohenri/sending-desktop-notifications-in-python-flet-97f0834f993d
Repo: https://github.com/ndonkoHenri/Python-Desktop-Notifications
Hope it helps while waiting for a native solution.
- addedplatform: mobileSpecific to the mobile platformSpecific to the mobile platformplatform: desktopSpecific to the desktop platformSpecific to the desktop platformfeature requestSuggestion/Request for additional featureSuggestion/Request for additional feature
on Mar 4, 2024 Article: https://medium.com/@ndonkohenri/sending-desktop-notifications-in-python-flet-97f0834f993d
Repo: https://github.com/ndonkoHenri/Python-Desktop-Notifications
Hope it helps while waiting for a native solution.
I have come across these links in some Google searches, plyer is a good candidate to solve the problem, what is not clear is how to integrate it with flet. In the test I did, at the moment I execute the notification, the application is closed on the Android emulator.
Reacted by Heoder and NHLOCALme too
Reacted by Islam Asabaev, baseplate-admin and vivekSome (possibly) useful links:
How can I add this package to my python project?
hey, @ndonkoHenri
now that we have the ability to use flutter packages in flet,
we can make a control using any of the flutter packages to send notification.
Please add this to the roadmap.
34 remaining items
Flet OneSignal - Flutter OneSignal package integration.
-
2024-12-21_01-13-47.1.mp4
Reacted by Muddassir Farooq, VEGAS and Jayasurya JMuddassir-Farooq-official commented
on Dec 26, 2024 More actionsFlet OneSignal - Flutter OneSignal package integration.
-
2024-12-21_01-13-47.1.mp4
To send specific notifications to a specific user's device using OneSignal in your Flutter app, you'll need to identify and target that specific device (or user). OneSignal provides several ways to achieve this, such as tags, player IDs, or segments.
Here’s a step-by-step guide to send notifications to a specific device using OneSignal:
- Identify the User Device
To send notifications to a specific user, you need to capture and store a unique identifier for that user’s device. OneSignal provides a Player ID for each device, which is unique to that device and is required to target notifications to a specific device.
Getting the OneSignal Player ID in Flutter:
Once a device is registered with OneSignal, it gets a Player ID. You can capture this ID and store it in your backend or database for later use.Here’s how you can get the Player ID in your Flutter app:
import 'package:onesignal_flutter/onesignal_flutter.dart'; void main() { runApp(MyApp()); // Initialize OneSignal OneSignal.shared.setAppId("YOUR_ONESIGNAL_APP_ID"); // Get the Player ID (device identifier) OneSignal.shared.getDeviceState().then((deviceState) { String playerId = deviceState?.userId ?? "No Player ID"; print("Player ID: $playerId");
Muddassir-Farooq-official commented
on Dec 26, 2024 More actionsHow can we get user device player I'd using this flet-onesignal
Hi bro,
What I did was just the beginning of a potential integration for the package. Things have been quite hectic for me lately with other tasks and activities, and I haven’t had the time to dive into the Flutter package to add new features to flet-onesignal.
Also, my knowledge of Flutter is minimal or almost nonexistent, so I need to study and understand the OneSignal Flutter logic to implement it in flet-onesignal. If you'd like to help implement new features, I’d be grateful and would be more than happy to add you as a collaborator on the project.
What do you think?
My invitation also extends to others involved in this issue who may want to contribute.
Muddassir-Farooq-official commented
on Dec 28, 2024 More actionsFlet OneSignal - Flutter OneSignal package integration.
- https://github.com/brunobrown/onesignal-flet
- 2024-12-21_01-13-47.1.mp4
To send specific notifications to a specific user's device using OneSignal in your Flutter app, you'll need to identify and target that specific device (or user). OneSignal provides several ways to achieve this, such as tags, player IDs, or segments.
Here’s a step-by-step guide to send notifications to a specific device using OneSignal:
- Identify the User Device
To send notifications to a specific user, you need to capture and store a unique identifier for that user’s device. OneSignal provides a Player ID for each device, which is unique to that device and is required to target notifications to a specific device.
Getting the OneSignal Player ID in Flutter: Once a device is registered with OneSignal, it gets a Player ID. You can capture this ID and store it in your backend or database for later use.
Here’s how you can get the Player ID in your Flutter app:
import 'package:onesignal_flutter/onesignal_flutter.dart'; void main() { runApp(MyApp()); // Initialize OneSignal OneSignal.shared.setAppId("YOUR_ONESIGNAL_APP_ID"); // Get the Player ID (device identifier) OneSignal.shared.getDeviceState().then((deviceState) { String playerId = deviceState?.userId ?? "No Player ID"; print("Player ID: $playerId");
its stucks during build apk for android at
[14:17:54] Generated splash screens ✅
Run subprocess: ['C:\src\flutter_windows_3.19.6-stable\flutter\bin\dart.BAT', 'run', 'serious_python:main', 'package', 'G:\Projects\Bistro New', '--platform', 'Android', '--requirements',
'flet>=0.25.2,onesignal_flet@git+https://github.com/brunobrown/onesignal-flet.git@main', '--exclude', 'build', '--cleanup', '--verbose']
( ● ) Packaging Python app ⏳...Hi bro.
I use Flutter v3.24.2 and Poetry for managing and configuring my projects. All configuration is done in the
pyproject.tomlfile. Then, I simply runflet build apk.Below is an example of a pyproject.toml file configuration in case you also use Poetry:
[tool.poetry] name = "example-flet-app" version = "0.1.0" description = "" authors = ["brunobrown <example@test.com>"] readme = "README.md" [tool.poetry.dependencies] python = "^3.12" flet = "^0.25.2" onesignal_flet = {git = "https://github.com/brunobrown/onesignal-flet.git", rev = "main"} [tool.flet] org = "com.mycompany" # --org product = "Product name" # --product company = "My Company" # --company copyright = "Copyright (C) 2024 by MyCompany" # --copyright build_number = 1 # --build-number app.module = "main" # --module-name compile.cleanup = false # --cleanup-on-compile [tool.flet.flutter.dependencies] # <--- here flet_onesignal = "^0.0.1" # <--- Flutter package here [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api"
Even if you don't use Poetry, you can just create a
pyproject.tomlfile in the root of your project and follow the various configuration examples shared here by Feodor:Muddassir-Farooq-official commented
on Mar 22, 2025 More actionsHi bro,
Maybe this video in the link below or the source code in the repository can help you. Feel free to use it or contribute if you'd like.@brunobrown can you merge it in flet as a pull request
Muddassir-Farooq-official commented
on Mar 22, 2025 More actions@FeodorFitsner as flet now supporting pyjnius when will flet support plyer?
Hey everyone! 👋
I finally found a solution for sending notifications in Flet mobile applications using Pyjnius!
Since I know that many of you have been struggling with this issue, I decided to make a video tutorial explaining the entire process.
Check it out, and let me know what you think!🔗 Video Link: How to Send Notifications in Flet using Pyjnius
Hope it helps! 😊
Muddassir-Farooq-official commented
on Apr 7, 2025 More actionsHere is solution for local push notifications in flet
I've noticed that the solution for @Ayberk-Irmak and @Muddassir-Farooq-official doesn't allow using ft.Container, ft.Buttons, or any other non-string control as notification content. How could you put, for example, a container with buttons inside the notification content?
Hey everyone! 👋
I’ve successfully implemented push notifications on Android in my Flet mobile app using Pyjnius.
Now, I’m trying to get push notifications working on iOS, but I’m stuck. 😕
Has anyone managed to enable iOS push notifications in a Flet app?
What’s the right approach or library for iOS?
Do I need to configure anything specific in Xcode or Apple Developer settings (like provisioning profiles, certificates, etc.)?
Do I need to use Swift/Objective-C or is there a Python-based solution for iOS like Pyjnius for Android?
Any help or guidance is greatly appreciated — thanks in advance! 🙏- locked and limited conversation to collaborators
on Aug 20, 2025
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fields✅ Done
Please Describe The Problem To Be Solved
I want a way to send notifications to the user for example when the app is minimized.