Listening to incoming notifications Flutter - flutter

I am deciding whether to use Flutter for cross platform app. I have investigated in ways to implement other functionalities.
But I need one other feature to implement which needs listening to incoming notification from other app in background. (something like notification listener in Android)
While I was searching came across the issue here which may effect what I intend to implement.
Is there any way to achieve what I want in Flutter?
I am willing to write plugins in native languages if its possible.

You can benefit from platform channels to write a plugin to utilise native code for each platforms. This medium post explains how to execute dart in the background and have example code for Android (Kotlin) and iOS (Objective-C).
However, according to this SO post you are not able to create an similar service like a NotificationListener for iOS.

Related

Can Flutter application function in the background?

I am new to flutter.
I want to build a map application that shows collectable items on a map. When the users are near the item they can collect them. I have to make call to server to indicate that user collect the item.
I understand the application will function when it is in the foreground. But if the application is in the background can it perform these functions? For example: update users location, get items based on the location, collect items etc.
Does flutter can perform these functions normally if it is in the background or we have to create say some service type of application to do this?
I appreciate any advice regarding this.
Yes, you can do it, but you will need to create this methods with kotlin / java and use the platform channels to invoke it.
Yes you can workmanger is for running something on the background in your flutter app and it supports dart directly Workmanager. Alternatively native code will work for you swift or objective-c for ios and kotlin or java for android depending on which default native languages you tell flutter to create project with but that becomes very complex especially over ios side if you have no prior experience. Try your best with workmanager see if that can work.
Put a look to firebase schedule functions and cron as well see if they can do the job as well for you
Firebase Schedule Functions
Cron Flutter

PubNub based opensource web chat

Have anybody heard of some opensource, or one that can be bought, client-side (web, android, ios) chat based on pure pubnub or pubnub ChatEngine?
The reason I'm asking is that it looks like PubNub gives a reliable backend, but it doesn't come up with UI that we can just use as drop in replacement for our current chat, that doesn't perform well, and we don't really have time to build UI from scratch.
I found many examples of really simple chats, but it's still a long way from that to fully functional chat that we need to replace.
We have a multi-room chat, with users being able to access only some subset of rooms and also open one-on-one chats. Similar to Slack, but with way fewer features.
Thanks
There is a well-made UI for ChatEngine using Vue.js. The example has 1 to 1 chats which can also be chat rooms. There is a tutorial for building the app with ChatEngine on the PubNub Website:
Tutorial:
https://www.pubnub.com/tutorials/chatengine/vuejs/chat-app/
Live Demo:
https://ajb413.github.io/chatengine-vue-chatbot-1to1/
GitHub Repository:
https://github.com/ajb413/chat-engine-vue
Screenshot:

Receive mails with Flutter

I want to create an app with Flutter for which it is necessary to receive (and send) mails. Clients share information with eachother in a decentral way using i.e. Googlemail without using an own server.
During my research I found several ways to send mails but no way to receive them since this seems to be not implemented yet in any package.
Flutter offers the option to use platform-specific code with platform channels (flutter plattform-channels) which might be a solution.
However I haven't tested this yet because I write the app for both iOS and Android which means that I'd have to do this for each java and Swift/Objective C.
Maybe someone here knows a better solution.

Conversation ui control for iPhone

Is there any control to show messages on iOS, similar to the SMS app and a lot of other apps (Viber, ICQ)? It seems many of them are using the same control for this.
To expand Noah's Answer, there may not be a control like that in the iOS SDK, but there are people on github, bitbucket, and cocoa controls who have rolled their own. See here for a pretty accurate clone of the messages.app that comes bundled with the iPhone.
Layer is one of the easiest ways to integrate chat and messaging features in your apps. With the recent launch of Atlas, it is even easier to integrate Layer in your app using its fully featured, high performance, 100% customizable UI kit. The important controllers that you can use to simplify chat UI are:
ATLConversationListViewController: A controller that provides an editable list of all Conversations for the authenticated user.
ATLConversationViewController: A controller that a scrollable, auto-paginating view of the Messages in a Conversation.
ATLParticipantTableViewController: A controller that provides a sortable, searchable table view for selecting a set of participants to communicate with.
For full implementation details about integrating Atlas and Layer in your app, see Implementing Chat/Messaging in iOS apps with Layer.
No such control exists in the iOS SDK; the third-party implementations you mention are just mimicking the SMS app’s UI. Most implementations of this are based on a UITableView; you’ll pretty much have to roll your own version of it starting from there.

smart phone UI limitations

I would like to know, what limitations there are for how far one can go in terms of replacing UI components of current touch screen smart phones, in particular iPhone, Blackberry and android based phones.
What I would like to do is create a custom UI for dialing out and incoming calls.
I have some experience with Blackberry development. The theme builder for it, can be used to customize certain items on the incoming call screen, but it doesn't look like that you can increase the size of answer button. I know Blackberry also gives you access to all the phone APIs, but I'm not sure that you can create your own UI that can gain preference over the Blackberry incoming call screen. And if you try to customize the incoming call screen by adding any buttons to it, they would be rendered as pictures.
I could possibly design a complete UI for android, since different manufactures have different UI for android based phones.
Can I do what I want to do using iPhone, Blackberry or android? Or any other phone for that matter? I am guessing may be for Nokia phones using Qt, but I prefer the 3 platforms I listed.
Thanks for all your help.
You can do this on Android. In fact, it's been done. There are several dialler replacements available in the market. Android has a very modular architecture and you can access the phone's contact info regardless of what the actual contacts provider is (at least in 2.0 and above).
I'm pretty sure you can't do this on the iPhone, as it would never get through the App Store approval process. I have no idea about Blackberry though
You can create a custom dialer on iPhone, and it has been done before. However, on iPhone, you cannot override the incoming call screen.
Andorid is different. You can create a custom dialer and override the incoming call screen as well. You just have to listen for incoming call notifications, then start your app.
Sorry, on Blackberry, I have no idea.