Forcibly bring up a page with continuouse ringing to notify the user (even if the device is locked) in a Flutter app on both Android and iOS platforms - firebase

I'm currently developing an app for restaurants that receives orders from a firebase push notification.
I need a way to notify the users of the app by forcibly opening a page with a high volume of ringing (something like an alarm page, where you have a dismiss and a snooze button, or a phone ringing page with accept or decline call button) when an order arrives, so that they can dismiss and go to their current orders page.
My main issue is that I can't seem to be finding a way that opens this piece of UI forcibly on both Android and iOS platforms (since the app is being used on both), and even when the device is locked (though not mandatory, but could be super helpful).
If the issue is insoluble in one dart code, can someone please provide me with a way to implement on both of the platforms? Any workarounds are welcomed too.

Related

Kill app in ios actually does not kill from OS

I m using Device.BeginInvokeOnMainThread(() => { Thread.CurrentThread.Abort(); });
System.Diagnostics.Process.GetCurrentProcess().Kill(); this in xamarin.forms to kill app in ios through dependency service.
But actually it is not killing the app when i press the home button it is still showing.
Can anyone help me out of this?
This is not possible. From the Apple technical Q&A (https://developer.apple.com/library/archive/qa/qa1561/_index.html):
A: There is no API provided for gracefully terminating an iOS
application.
In iOS, the user presses the Home button to close applications. Should
your application have conditions in which it cannot provide its
intended function, the recommended approach is to display an alert for
the user that indicates the nature of the problem and possible actions
the user could take — turning on WiFi, enabling Location Services,
etc. Allow the user to terminate the application at their own
discretion.
Although the documentation is pretty old, this still stands. Even if you do find some way to implement it, it will never be allowed to the App Store.

Push Notification When App is closed/Quit including

Can anyone please so let me know precisely that how can I accomplish the task in which I need to show Push Notification to user when App is Quit/closed?
Currently, I am able to get the push notification done when App is running in background or opened. But App couldn't receive Notification when it is quit/closed by the user.
Right now, it's a really critical task on my shoulders. It's pretty clear do tell me in case if you guys need me to brief in details.
I am having a very hard time to believe that your scenario is Really the following:
When the app is either: open and in the foreground, or open and in the background, you are able to receive a notification to the device, and have its contents displayed in the app, but
When the app is quit (as in not running), the notification does not arrive to the device at all.
I have tested several devices and several push-enabled applications (event source, tag-based). The notification does arrive to the device, after the user subscribed to either a tag or by logging-in (in the case of event source-based), after which sending a notification always arrived to the device.
I don't understand this sentence:
my app logouts with the user
You need to be CLEAR in your explanation. Is there a logout button that the user clicks? If yes, are you also for some reason perform an unsubscribe API invocation? If no, edit the question and provide DETAILED, step-by-step reproduction instructions, AS WELL as provide your application, or any code that you use so that it could be inspected for possible issues.

Firebase doesn't completely sync when offline client comes back online

When an online client (a desktop) and an offline client (a phone) both enter data, and the phone is brought back online, the phone does not receive the data posted on the desktop during the offline period.
To duplicate, in an empty directory, run firebase bootstrap, enter the name of your app, and choose the react template. Then do firebase deploy and firebase open to visit the page in the desktop browser. Then visit the same page in the phone browser.
Begin entering data alternately in the React + Plain Firebase pane of the desktop and phone browsers. Enter '1' on the desktop, '2' on the phone, '3' on the desktop, etc. So far the series displays 1 2 3 on both browsers as expected. Then put the phone in airplane mode and continue entering numbers alternately. Now the desktop shows only the odd numbers that are being added, and the phone shows only the even. This is also expected.
Now bring the phone back online. The phone will push its data to firebase and the even numbers will show up on the desktop (although oddly in a different order in the React + Plain Firebase pane and the React + ReactFire pane).
But the odd numbers do not show up on the phone, until the app is reloaded. Is this expected? Is there a way to force a complete resync in when a client goes online?
UPDATE: Other questions I have seen on firebase offline usage have been about detecting presence, user auth or other more complicated scenarios. My case is simpler. The docs say:
Once connectivity is reestablished, we'll receive the appropriate set of events so that the client "catches up" with the current server state, without having to write any custom code.
To me, this means that syncing should "just work" without the necessity of the app "knowing" whether or not it is online or doing anything special when it goes online.
I was also assuming that firebase offline data storage is persistent, but Kato's recent comment to this question indicates that it is not. So I guess the answer is that Firebase's offline storage implementation is incomplete, and its limitations are not well documented.

How can I increment a Windows Phone tile notifications counter with Push Notification (not knowing the actual counter value)?

I am sending a XML with the "Count" parameter for tile update, and the tile is updating with that value, no problem here.
But I don't know how many pending notifications the user actually has, to increment. I see WhatsApp increments the counter immediately after I got a message. The only way to do this is to store the "unread" count in the server? I wouldn't like to do this because the user can: receive the notifications, disconnect, open the app (that will reset the counter), close, and connect to internet. When it happens, the "unread" count will be incorrect after a new notification.
(I'm using a standard tile for WP 7 compatibility)
Maybe this is a hint from the design gurus -- you might not need to show the user exactly how many unread notifications s/he has. Instead, you could make the push notification simply set a visual flag that there are some unread notifications. When the user opens the app, it displays all the queued notifications and resets the visual flag. Like a knock at the door: once you go to the door, you're going to let in however many dwarves you find waiting there.
Alternatively, you could use raw push notifications sent directly to the app, and let the app locally update the count on the tile.

Closing a Trigger.io forge mobile app via javascript (Android / iOS) - in order to apply Reload

Is it possible to ask a Trigger.io Forge mobile app to close itself through the forge JS api?
We're seeing users having problems with reloads:
We pop up a message when a reload is available, but it's difficult for us to explain that they have to
come out of the app
wait an unknown amount of time (for the reload update to download)
launch the app again
People either don't understand, or the force-quit the app meaning the reload doesn't download, or they come out and go straight back in before it's downloaded - and then see our 'reload' popup message immediately again.
I wondered if we could close the app for them if this would smooth things out a bit. Unless people have better suggestions for this user flow?
Are you listening for the updateReady events to pop up your message? If so, the Reload update has actually already been downloaded and is ready to go: all the user needs to do at that point is switch away from the app and back again; no delay required.
The only way to programmatically close a Trigger.io is in the backPressed event listener, which won't be of use to you in this situation.

Resources