sync mobile app with back end to check user update in flutter - flutter-dependencies

recently i develop flutter app that each time after validate if user subscribe to app, should download all content to user phone that user could use content event in offline mode and check what is last state of user send to back end for next time that user open app. my problem is when user subscribe and receive content for next time application does not check if some thing new add.and at the same time does not send last state of user to back end. in dev mode everything is fine but in production nothings works does any one knows what happen and, I thinks maybe it depend on server deployment but i'm not sure? could you please help me.

Related

Expo/React Native : A Continuous Alarm or Sound Notification (like receiving a call ) triggered by remote server

I am using Expo to build an app that will pop up a notification with custom sound and vibration when triggered remotely. The alarm/vibration would play until its dismissed by the user or it times out (say after 1-2 mins) .
Example use case would be when a partner needs my immediate help with baby, they can press a button the app and that would send signal to backend server which would then trigger the notification with alarm on the app at the other end. When the notification is dismissed, an acknowledgement message is sent with Yes or No type message. If the notification times out, then another message is sent like "no response".
Key point to note is that when the app is fully closed, the notification should still be able to pop up.
From my limited understanding , expo notification or push notifications in general cannot achieve this as they don't allow us to create notifications that directly open the app. Even a solution which works like phone or video calling apps (which open when someone calls you ) could work.
Any help would be much appreciated.
Many Thanks!
I looked up expo push notifications but they are limited in terms of customising the notifications.

RemoteNotification TOKEN not received if push notifications are not allowed

Really confused with this one!
I have an Adobe AIR iOS app and I am using the RemoteNotifier to subscribe for PushNotifications. More details http://www.adobe.com/devnet/air/articles/ios-push-notifications.html
I have the following listeners.
remoteNotifier.addEventListener(RemoteNotificationEvent.TOKEN, onToken);
After I reset my iPod to factory settings and reinstall my app (using the adhoc distribution), I click "Don't allow" for the pushnotifications when I get prompted.
I find that I then don't receive any RemoteNotificationEvent.TOKEN, so my app basically hangs waiting for that.
If I go to my Settings, Notifications and have a play with
Toggle Alert Style from the None to Alerts AND
Then back to None again (as it was)
I find that I can go back and launch my app with not problems. It's just that on the very first time user flow, I don't seem to get any TOKEN back.
Any ideas? Has anybody else seen this behaviour?
Or knows how I should handle this?
Thanks!
Hopefully I am correct, someone please correct me if I'm wrong.
From what I am able to find out, you won't get a RemoteNotificationEvent.TOKEN when the user clicks on "Don't Allow".
For some reasons that I am still unclear about, how after you play with the Settings and relaunch the app, you get the RemoteNotificationEvent.TOKEN, regardless of the notification settings you have set. But maybe that's the way it's meant to be?
So, really I have to change the flow such that I don't wait on that RemoteNotificationEvent.TOKEN before loading my first screen. If the TOKEN comes back, it comes back, otherwise if it doesn't, it's not a big deal as that means the user clicked on "Don't allow" and we don't need to send PUSH notifications anyway.
Everytime I relaunch my app, I do make the call to subscribe and get the TOKEN though, such that if the user was to enable the Notifications in the phone's Settings, I do have a TOKEN ID to send the push notification too.
The only problem I see with this though, is that should the user change the Notification to ON via the phone Settings and doesn't relaunch the app (to retrieve the TOKEN) then the device doesn't get push notifications.
Not sure how to handle this?

ToastNotification during Quiet Time

I have developed a desktop application which displays ToastNotifications while the user is in Metro Mode. When clicked it will bring the user back to the desktop mode where a standard desktop notification is presented.
This all works fine except when Windows is in QUNS_QUIET_TIME. The desktop notifications do not get displayed as expected, but the ToastNotfications still get displayed. My client wishes for the ToastNotifications to not display during Quiet Time.
The code calls SHQueryUserNotificationState which returns a QUERY_USER_NOTIFICATION_STATE enumeration. The provided link says the following:
Note that during quiet time, if the user is in one of the other blocked modes (QUNS_NOT_PRESENT, QUNS_BUSY, QUNS_PRESENTATION_MODE, or QUNS_RUNNING_D3D_FULL_SCREEN) SHQueryUserNotificationState returns only that value, and does not report QUNS_QUIET_TIME.
This is what I am experiencing. The call to SHQueryUserNotificationState is returning QUNS_APP (A Windows Store app is running.) and not QUNS_QUIET_TIME.
Does anyone know of another way to determine if QUNS_QUIET_TIME is in effect or a way to force the toast to respect quiet time?
Desktop notifications use different settings than toast notifications. You can find toast notification settings here. When a user sets notifications to one hour from Windows 8 Settings | Notifications, the app will not be able set toast notification. Try the example "sending toast notifications from a desktop" here (either C++ code or C# code).

How to find out user is at desktop instead of start screen or another store app UI at Windows 8

As we know, at windows 8 if user is at start screen or another store app (metro app) UI, the dialog at the desktop won't be visible to user. We are adding some toast notification capability at our application by following Sending toast notifications from desktop apps sample. I am able to get it working. However if user is already at the desktop, we don't want to send out the toast notification. So it would mean that we need to be able to detect if user is current at desktop or not. Somehow I didn't find any API by searching on internet. Could someone let me know how to do so? Thanks very much.
A toast notification can't know in what context the user is located, so this is not possible.

how to delay application quit time in iphone sdk?

I want to register my app for push notification when my application terminates so i think if i delay my app quitting time it could be possible.Does someone knows how to delay application quitting time? I think this method
[self performSelector:(SEL)aSelector onThread:(NSThread *)thr withObject:(id)arg waitUntilDone:(BOOL)wait];
will do my job but i don't know how to use this method if someone knows please tell.I need to send some data to a server along with registering for Push Notification when my app quits.
I can't imagine why you would want to do this. If it were even possible it would be extremely annoying for a user to tap the home button and the app to take x amount of time to shut down. This time 'x' being dependent on the server connection creates even more user headache.
Apple have the home button exit apps immediately for a reason.
If you want to register the Push Notifications like you suggest, do it while the app is running. If your worrying that they won't be properly set if the user exits prematurely... don't.
As users, we all know there are sometimes consequences of exiting a program without giving it time to save your settings.
For push notification it is better to register when the app first starts and then send the push token to your server in the background. However, if you have a good reason why you need to do the registration just as the app terminates, I believe you can do this if you are using iOS 4. iOS 4 has a new feature called "task finishing" that allows an app to stay running for a few minutes after the user closes it so that it may finish up any tasks it was in the middle of (such as saving data).