I am developing application in which i have to create url request when server side database is updated.Actually I am trying to make url request when its necessary.So,it will reduce number of request.I want detect that server database is changed.That can be done using push notification but i am looking if there is any other-way.
Thanks In Advance.
You can not detect from the phone when db on the server is changed. You have to make frequent request to the server to see if you have new data. This will consume the users battery and its data from the data plan.
That is why you should push from the server to the mobile devices.
Related
I have an app made in flutter that requests data from a rest api. Currently, every time the app starts, it requests new data from the server. It also does that every 5 minutes.
I would like to know if there is any way to tell all apps from the server to request new data.
The purpose of this system is to avoid polling every 5 minutes and have information in the app almost instantly.
One way that occurred to me is to send a push notification indicating that there is new data. But I don't know how to do this. There are examples for sending notifications using firebase, but I am not using that service.
I also thought about web sockets but I think it is very expensive to maintain an open connection between the app and the server.
Any hold will be eternally grateful
I recommend you to use Firebase Cloud Messaging & Firebase Functions:
Firebase Functions could expose an HTTP Event
https://firebase.google.com/docs/functions/http-events
This event can send a push notification to the App and then you could listen to request new data
https://github.com/FirebaseExtended/flutterfire/blob/master/packages/firebase_messaging/example/lib/main.dart
I am developing an iPhone chat application using robbiehanson/XMPPFramework and I am using OpenFire on the server side. I want to implement the user status feature on my app like the whatsapp status concept.
How can I achieve this, is there any default support on the openfire server for storing the user status messages ?
Thanks in advance
I am not sure what you call 'user status'. You can add information about the presence of the user in presence packets. This is purely transient information and is generally not stored in XMPP server.
You can also decide to publish status information in a more persistent way using Personal Eventing Protocol (PEP). The last status is generally stored by server to be resend / retrieved at a later time.
Reference: http://xmpp.org/extensions/xep-0163.html
I'm trying to make an app using Corodva and I want to be able to save the data if there is no internet connection and automatically update when there is an internet connection.
Can someone give me some guidance?
You can done it by using local storage in html 5.First store the user data in local storage,next setup a function that check for internet connection every time app launches,if true make server request to store the data.After success of server request delete data from the local storage
I'm trying to figure out the best way to store data for a mobile chat program.
Basically I will be able to make a group with my friends and they should also see the same group I made.
I'm assuming the best way is to store the data locally on each phone, and then when someone sends a message, it goes to the network, and the network sends that data to each recipients local phone so that it updates the local data.
That way when people are opening up the application, the previous few messages are still visible, since the program will check local data storage.
Is this the proper way to create mobile chat? Or should there be no local storage of data?
The best way will be to store data locally and on the server as well. The reason are as follows
Local data is for the users and will allow the saving on data costs instead of the users always having to get their chat data online everytime they logon. My assumption is that you want to have offline messages the way that Whatsapp chat client has.
Server data is for your reference and also good practice in order to provide the user with data up to a certain point in history if they have lost their device and they login to another device.
I hope this helps and answers your question.
Am trying to integrate Apple Push Notification in my app. I have studied the Apple Document and other tutorials for my understanding. But, still i have a doubt to create a server and store all Apple Push Notification devicetokens in the database. Am not going to work on Server side but, i need to explain the approach to my client. I need to understand to create a APNS server provider and save all the apple push notification device tokens and retrieve all devicetoken and retrieve a single devicetoken to send notificaions. Can you please suggest me any sample code to save all apn devicetokens and retrieve from the server? I suggest my client to create a server in C#.net platform is this correct? Thanks in advance.
Essentially, you just need to decide on a way for your app to let your servers know the device tokens. So, there are many ways to achieve this.
If your server side already involves a website, the easiest way would be to use HTTPS to do a POST request from your app. Then, the server-side code can be written as if it is handling form request from browsers. I can't really give you sample code since I don't know any C#, but this should be familiar to any web developer.