In my application i need one functionality say: Appointment. Appointment will be created from website.
Once it is created, at particular time(Say appointment time) webservice will be triggered and send
response.From android, i have to wait for that particular response and catch that response and i will
send to notification.the question is ..how do i find that webservice is sending response,and how do i
recieve that response whenever service sends response.
It will be more helpful if any1 provide me with clear answer...
Thanks in Advance...
What you're looking for is called push notifications.
Google provides this through c2md (deprecated) and the new, but nearly the same, GCM.
You can find a lot of info about this by searching those 2 terms.
Also I can recommend using UrbanAirship.com, as they simplify the process greatly and are free up until a great amount of notifications.
They've got extensive documentation and examples on how to send and receive from both client as server.
Related
I need to fetch live data in Android App from a NodeJS/MongoDB API. For exemple, I have a list of tasks on the Android screen (fetched from the API). Then one of this documents (tasks) have changed in the MongoDB, the Android screen needs to update the data on the screen once this data have been changed on the server.
Can anyone help with some workflow? I am not looking for code. Ideias (Arquitecture/Libs) only.
Thanks in advance!
You can do this in two way.
Use silent push notification.
When data change in server then server send push notification
to app.
App receive notification Then app get call API to update Data.
Your app sends a request(s) to server periodically (After some
interval of time)
Reference link for same: link1, link2
I'm working on two seperate apps that need at some point to exchange messages, both apps share a MYSQL database, I want the first app to be able to send some data to one of the other app's users (specified by his id, email or phone number ), and this last to be able to reply to the request by accepting or rejecting with a button click.
Now, I don't know what is the best:
Something similar to chat ?Is it possible to extract the necessary data from the rest of the chat message ?
A broadcast.
A push notification.
Or something else ?
Help me please I'm a total newbie, I would use an expert opinion.
What you are describing is basically every other Chat App that exists.
I can only suggest you to read this code example to get an idea how to approach this:
Android Chat Example code
Am using GCM in my android project, the connection is XMPP, I wonder if there is a way to know if the user is currently connected from within the server service?
One way to do it is that I can send the user a ping and wait for a reply to see if he is connected but I was hoping for a better solution like to query GCM directly and it will tell you if the user is currently online or his last activity date.
I am trying to avoid using socket.io or signalr, because it will add load to the server specially if you have like half million users who are pinging the server regulary.
Thanks
The API you are looking for is not very well advertised, but it exist!
HEADERS: Authorization:key=SERVER-KEY
GET: https://iid.googleapis.com/iid/info/GCM-TOKEN?details=true
Full documentation here: https://developers.google.com/instance-id/reference/server
I have developed an app in which i am collecting data from server through parsing. So , i want to add push notification in my app whenever the service adds new data. I have searched the web bt cldn't fnd smthn useful.
The best way is to either get a webserver with cronjob this will send information directly to your mobile ... or, to make an backgroundservice in your application.
It's not a simple thing to do, in the upcomming few days I'll be posting a tutorial on http://p-xr.com wich explains it in detail.
Is it possible to make a app on Android such that whoever downloads this app receives a message from me weekly? I want to be the only person who can write on this message board and no one else. If this is possible, where should I start looking for tutorials about doing this sort of stuff?
You can create a RSS/Atom feed for yourself. Your android app can then just sync to this feed. Update the feed as often as you like. If you like this approach I can give more details.
yes , you can send periodic messages see this
in that SendMessage(); function is there so you have to make code for send message to recipient