I am using flutter awesome notification.
Wish to send a notification when the app is closed (not running in background). Just like an Alarm Clock, the notification will be send at specific time. Not push from external services like firebase.
Is there a way for doing that? Or I need another package like android_alarm_manager?
I am not sure about awsome_notification but If you want to send a notification at some particular time of the day then you can use flutter_local_notification This package will send you a notification if your app is closed or running
You need to use Scheduled notifications
But if you want to open a screen like an alarm and clock app do you need to use android_alarm_manager or some other plugin.
Related
I am trying to make a new todo tasks app and its offline no intternet needed...
I want to get reminded when the tasks time is up
i tried using local notification it worked as showing notification but for my phone as the README section of the package said that it doesnt work for everybody's phone for such android things... So when i terminate my app or having it on my backgroud and wait for the schedule notification nothing appear...
So any idea of how i can let my app work on backgroud
for the solution i used workmanager so it run my app after a while in the background and push my local notification to the user
welp its hard to it for every 1 sec cause the work manager only make a loop and activate every 15 min..
workmanager is a flutter package you can use for free :3
I have searched Google, YouTube and stack overflow for the answer but I haven't found any real solution.
I want to implement my own push notification solution on flutter, without firebase nor One signal. I do not want to depend on a third party service.
My Backend is on GoLang with graphql.
On the frontend, I am using a block pattern (flutter_bloc v6) and graphql_flutter v4.
I am using graphql subscriptions, so whenever the Backend emits a signal, the flutter app is able to receive it immediately.
I would like to be able to push up notifications to my users whenever the Backend sends some information, no matter if the app is on the foreground, background, closed or whatever. I do not want scheduled notifications either (aka flutter_local_notifications)
Do you want to use a third service other than firebase/one signal?
Then you can try airship(https://docs.airship.com/reference/messages/message-types/push-notifications/)
But if you want to setup your own provider server, please check this page(https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server), this is the start point, from where you can start your investigation and development.
Then you have to create your own backend system to send push notifications to the device. You have to develop Native Application for iOS and Android going beyond flutter. The local push notification could be used but you need to develop a custom notification receiver that will respond to the notification call back from the server in the background.
I have an idea for a unique alarm application on the iPhone. But at the moment the only way I can see of initiating the alarm is by leaving the app running all night getting it to poll for the current time. Is there anyway to make an app "wake up" or initiate at a certain time. I know I can use push or local notifications but they require user input before loading my app. Thinking about it I could leave my app on all night, but literally doing nothing (saving battery if not being charged) and then subscribe to a local notification for the alarm itself.
Alternatively, can I make the iPhone run my app when an alarm sounds so I don't have to deal with alarm settings at all?
No, your only option is to use either Local or Push notifications.
I think using event kit framework add event in default iPhone calender.
I want to invoke a method daily at a specific time in my iPhone application.
How can I achieve this?
There's not a whole lot you can do with the iPhone SDK and a closed app. You can have it send local push notifications at specific times, but that won't execute your code until the user manually opens your app.
See this related question recently asked: Is it possible to have my closed app run code in iOS?
One thing I've seen apps do (like alarm clock apps, etc) is have you leave your app open and just let the phone fall asleep and then it will still execute code when you want it to. But that only works as long as the user doesn't hit the home button.
Schedule a local notification. This is how most basic alarm apps work. The app needs to be running sometime before the method execution time to schedule a local notification. After the local notification has been scheduled, the app can be closed and the method will be invoked at the specific time.
If you have push notifications configured, then your app does not need to run at all to schedule the method. It can all be done from another application.
Check out this documentation on local and push notifications from Apple.
you cannot run a specific code inside your application when its not running ..iOS allow only limited functionality to be run in background or when app is quit.
I'm wondering if it's possible to make an iphone app give the user an alert in a certain time without being run in the background or using notifications?
I see it happening in an app called iPray Pro. It gives an alert for the prayer time even though it's not running in the background or using notifications. I checked under the Setting-Notifications and the app is not there at all.
How is it done?
Scheduled local notifications will trigger even if the app is closed. iPray probably schedules notifications for a given time which are then triggered by the OS without the app having to be open.
Look for Local Notifications in the iOS documentation. They are like push notifications, but don't require a server. They are quite simple API to use too; make a UILocalNotification and use the scheduleLocalNotification: method on UIApplication to add the notification onto the system.
It will then fire in accordance to the fireDate property of the local notification you scheduled.
Local Notifications require iOS4.0 or later.
It is using Local Notifications, not Remote Notifications.