I'm developing a mobile application with flutter, everything so far is ok, my app needs to check a web API for some available online courses. The problem is, I want the app to notify me when a new course appear as a result of the API call, but I cannot see a proper way to do this even if I think is very simple, I'm not looking for push notifications, just normal notifications, but I cannot find a way to check the API while the app is not opened.
Reading, the flutter_local_notifications package (https://pub.dev/packages/flutter_local_notifications), is recommended, but this seems only to work while the app is opened, even if the example have a notification schedule for X days or time, is not what I need, I cannot see a proper way to check the API on background as everything I read use Isolates and very complex flutter solutions, or just native code (which sounds no complex for me but too much work for just to show a notification).
There is something I'm missing?, there is a simple way to set a callback to my app to check this API and in a true condition show a notification?, something else to have in mind is that as I'm using APIs I don't really like to use firebase for this, implement firebase just for one notification seems too much for me.
Any hints or help will be really appreciate.
Related
In the past, I have used Firebase Cloud Messaging to send and receive notifications in my Flutter apps, but it is extremely limited in the notification types and ways to send notifications. I do not want to use Cloud Functions because they are complicated and I don't want to use the POST method because that makes it possible for keys and credentials to get leaked. My idea is to make a collection of notifications in each user Firestore document (which would need to be done anyways for in-app notifications) and then check in the app background for new notifications. Then if there are new notifications I would use awsome_notifications or another package to create customized notifications. I know this is possible when the app is open but cannot figure out how to do it in the background. I found a package https://pub.dev/packages/background_fetch but it seems complicated and I don't see any examples of actual code being called. I'm sure other people have tried something similar so are there any examples?
How can I implement WhatsApp/Telegram like call notification when the flutter app is in the background or cleared from the recent task (clearing ram)? Can anyone let me know Exactly How to do this?
There is a great youtube series on this exact topic. In the series, a YouTuber by the name of the CS Guy creates a clone of Skype. I've placed the link to the video where he explains how to create a pop-up screen when a user calls another user, however, you may need to watch the previous videos within the series in order to get everything working. Its quite long but I recommend you watch the entire thing. In terms of displaying notifications when a user is called, I recommend you watch a video by Fireship listed below. In the video, he explains how to send notifications in the background when a certain event occurs in Firestore.
I can't explain the entire process in detail to achieve what you want but I can give a general overview of what you would need to do.
Watch the video/entire series by the CS Guy and complete everything
Learn how to send push notifications in firebase from Fireship
When a new document is created within the calls collection (You will understand once you finish the cs guy series) trigger cloud function.
Find the uid of the receiver of the call within the cloud function and grab the user's token from Firestore.
Finally, send a notification to the receiver telling them about the incoming call.
CS Guy:
https://youtu.be/v9ngriCV0J0
Fireship: https://youtu.be/2TSm2YGBT1s
I have done the exact same thing in my application and can help you out if you need further assistance, however, please go through both videos/series first.
You can use the flutter_local_notifications plugin with the firebase_messaging plugin.
From the documentation of the flutter_local_notifications plugin;
[Android] Support for the following notification styles
Big picture
Big text
Inbox
Messaging
From the documentation of the firebase_messaging plugin;
With this plugin, your Flutter app can receive and process push notifications as well as data messages on Android and iOS.
I am wanting to develop an app similar to 'Notiduino' where it takes android notifications such as whatsapp message notifications or missed calls and retrieve them within the app. Is there any lib for this function? I searched and found nothing ...
Sorry for my bad english
Yes. You can use Overlay widgets. Combining them with a little bit of animation will give you effective UI. One example here and another is here.
You can also use Firebase in-app notification. Using Firebase in-app notification has one more advantage. You can also send push notifications from the same firebase project. Of course, relevant settings have to be made. Having said that, there are a bunch of web pages which will guide you through the step by step process.
I am building a live chat app for the iPhone, and for this it is necessary to ensure that the operator is online and to keep the flow of data going.
After much search it seams to be only two options for similar kind of behavior;
UILocalNotification, only works if I have some scheduled information notice to be sent
Push Notification, for pushing data to the phone
The problem with push notification seams to be that I cannot ensure that the user is available, or in any way talk with the app without the user re-opening it. This way it seams impossible for me to know if the user is online, to update data in the app without the user having to manually open it, etc.
So, what I ask for, is it in any way possible to keep the app active in the background thus ensuring the operator is online and notify of incoming chat sessions?
Thanks a lot for your help guys!
Unfortunately the answer is no. I take it you mean text chat and not VoIP (which CAN run in the background)? Your best bet would be Push Notifications, as you would not be able to monitor anything from the app itself when it is in the background.
So I have searched for this but not finding anything about it and if I missed it sorry about that. What I am trying to do is see how to go about adding some code to my iphone app that will connect to a php script (if connection available) and update a counter so that I can let my clients know that their app is constantly being used? Also, would apple allow that? Or would my app be denied for doing such a thing? Any help would be great! Thanks in advance.
There's a bit of network plumbing to implement this. It's not hard, but a much easier route would be to integrate something like Flurry analytics into your app. They you can make one function call, and have it track and upload the information to Flurry's servers. You can view those stats and get an idea of how people are using your app.
Note: I don't work for Flurry, but I use (and like) their service.