I am new to flutter and i am trying to make a todo task app that will remind me of my tasks in there time but what if my user doesnt have internet..
so my app should remind him even if he is not connected.
i saw alot of things about local notification package for flutter..
but it doesn't work on all Android Devices for some reasons (READE.ME of the package)...
so my question is there anyway to push notification without internet (it would be better to push it without firebasee if its not possible).
thanks for everyone
Firebase sends remote notifications and you plug it into the native device notifications API.
So you can of course use another library to pop local notifications. I suggest this one: https://pub.dev/packages/flutter_local_notifications
A cross platform plugin for displaying and scheduling local notifications for Flutter applications with the ability to customise for each platform.
It's a widely used library with a ton of users and documentation available.
Related
I am building my first Android app and need to know how I could use push notification.
My project is a home alarm system and also I have built my own local web server. Now I want to push a notification from my server to my Android app when an alarm appears in my server.
Currently my garage doors use the MyQ app and when the garage door opens or closes I get a notification on my phone, I want to implement the same thing in my app.
I've been reading about the Google Firebase Cloud Messaging but it seems exceeding my need.
If you need push notification on your cell phone then you definitely need to integrate your app with Google Firebase. (or at least that's the right way of doing it).
Alternatively, there is something called as local notifications & background process in Android you could do long polling to check if the garage door is open (probably every 2 mins or something). However, I don't recommend that as it can drain your mobile battery.
Also I recommend using Flutter as oppose to using Native Android. As there are some pre-built libraries for android and Google Firebase integration.
Take a look at this Youtube video - https://www.youtube.com/watch?v=2TSm2YGBT1s
Ouh, maybe thats a little bit too much for starting with android - nevertheless I want to help you.
You need a communication protocol between your server and your phone (i.e. Firebase as you mentioned or Websockets).
If your server sends a message to you client (your phone) you have to create a notification. (Android Developer Guide). That's the theoretical part. You will also stumble across a lot of
challenges with
asynchronous programming.
Firebase might actually be the simplest option. You could build your own web socket service too, but that would probably be more than you need. See this previous question for more options: Android push notification without firebase
Android has some services that communicate with firebase to receive notifications.
You'll need to implement a service on top of your web server (using backend languages such as Python, Node.js, PHP,...) so it can send notifications when an event happened (like the door closed) witch isn't a simple way for a beginner.
then your web server sends a message to firebase and tells it to send a notification to my client.
so I highly recommend using firebase because of the simplicity of usage. otherwise, you should implement a separate service on your android phone to get the notification (if you want to run it locally) also as explained do the backend side.
I want to send android push notification to the selected user without using gcm or firebase. The application is already built without firebase. Now I need to integrate push notification too.
Question:
How it's possible without firebase?
Actually I want a feature that, when an admin update the value in the one field in database table of particular user, the that user will get a push notification regarding the update. How it is possible?
The way is to create custom Service https://developer.android.com/reference/android/app/Service.html , which is holding connection via socket or polling some remote server with intervals.
But, I suggest that Firebase service is more advanced and optimized in battery consumption and, particularly, in utilizing the sleep mode. It's not trivial to make a service which will have fast response and CPU consumption. I think that a custom service development will lead to native (C++) coding of networking routines libs.
Also, take into account that Firebase provides own Authentication service with ability to seamless convert your anonymous user to registered. There is a lot of pros of Firebase services. And cons are: your users have to install Google Play Services, if your app will grow - you will pay to Firebase.
Look here Android push notification without Google service
It's possible using VAPID authentication.
Google for VAPID and you will find a very tortuous road that could lead to the answer you are looking for.
another option is Gotify. Gotify is self-hosted open source notification solution that you can use it to send push notification to your android app without need of Firebase.
with help of UnifiedPush you can receive push notifications in your android app.
you can easily host Gotify server on Docker and use it's Api or cli,... to send notifications.
here is a good article about Gotify: https://www.linux-magazine.com/Issues/2020/230/Gotify
I wish to be able to push notifications from my own asp.net Web API REST service to be received by an Ionic 2 application, whether or not it is running, perhaps show a notification and then be able to click on this to open the Ionic2 application. I know nothing about Mobile notifications and want to know if I am on the right track.
I see there is an Ionic Native plugin here to enable the app itself to run in background, but going here for more information, there is the following statement...
Store Compliance ‼️
The plugin focuses on enterprise-only distribution and may not compliant with all public store vendors.
This makes me think I will have problem particularly with the apple store.
I then wondered if the other option is to run a separate service (perhaps using Xamarin as it seems to be able to do this) on the Android/iOS devices, send the notifications to this, and then have the service open the application perhaps using the Deep Linking
Alternatively, I found this article on something called PushSharp. I am a little confused with this as it used this library, and also seems to use SignalR (why both - not sure where the SignalR comes into it)
Also, is mentions "Google Cloud Messaging for Android". Even though I am sending notifications from me own server, is this something I use as an "in between", ie my server sends notifications via the "Google Cloud Messaging"?
Am I on the right track here, do I need a separate service, or the Mobile platforms have notifications built in, so I can use this can have this open my perhaps not running application?
Thanks in advance for any pointers here
If I store a specific time (a stringified Date object in localStorage perhaps, or some equivalent local persistent storage facility on the native device… I'm new to this so I'm not sure what is best yet, and any suggestions would be appreciated!), how can I trigger an alert (vibration, noise, push notification) to iOS or Android at that specific time?
I'm trying to make an alarm-clock type application that notifies the user each specific time stored in a local storage facility. Maybe there is even a way to simply say, “Push a notification at 11:00 am” or something like that. I'm working with Appgyver which uses PhoneGap and Cordova technologies, and I'm trying to build an app using Angular.js for iOS and Android. Thank you in advance!
you must use android services for keep codes running even when your app is closed.
i think this answer is for you:
creating-an-android-service-with-phonegap-have-phonegap-app-run-even-when-close
You could schedule a push notification from your backend. In-app push notifications are not yet supported on AppGyver, but push notifications from the network can be used with https://github.com/AppGyver/PushNotifications
I have an Event management solution with web and mobile app (for both android and ios).
I am using Phonegap 2.7 for mobile app.
In my mobile app, I'm just displaying the data that is created and updated using web solution. I have a list of "Tasks" and "On-Site Tasks" in the mobile app with Date and Time and have scheduled local notifications for all the items using Phonegap's local notification plugin. The notifications are working as expected and I am recieving them on time.
But when the data is updated using web solution I have to reschedule the local notification on device and for this I have to launch the app every time I want to update the previously scheduled notifications.
My question is, Is there a way to update the local notifications whenever the data is updated on web solution without launching the app ??
I want the local notifications to be updated automatically when the data is updated from web solution.
iOS dev here, I don't know Phonegap nor do I know Android. But in general for iOS:
You need to use push notifications instead. The purpose of local notifications is to maintain them completely client-side. If the notification depends on server-side state, and you do not want to launch the app to update notifications, you need to dispatch the notifications using push.
https://en.wikipedia.org/wiki/Apple_Push_Notification_Service
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW9