I am familiar in using xmpp library,for android i'm using asmack library.In Google chat also asmack is used.i can write an application to send/receive messages using xmpp.But now i want to track google chat messages in my application.what ever the user do in google chat the same sholud be happening in my application.Suppose that user logged in google chat,in my appication also he is logged in.Sent messages /Incomming messages also should be in sync.i m able to do every thing except synchronizing outgoing sms.How to capture the packet when user is send a message from google chat into my application. ?
You should not be able to do that (unless rooted) as it would be security issue - anyone could sniff your any network activity that way. If your app sign in to the google talk server (as any other client) then you should receive copies of all the conversations, but that's it.
Related
I have my own app server which communicate with FCM server. And I have Android/iOS mobile apps working well.
I want to set a third party program using Java which send a message to FCM server repeatedly so I can keep tracking my own app server is working fine.
I tried to find a solution but official website mention about upstream message only with Android/iOS app.
Is it possible to send a upstream message to FCM server using Java?
(Or any other good idea to monitor the server? I faced the server sometimes goes down for some reason without notice it :( )
There is currently no way to send upstream messaging other than what is shown in the docs -- currently available for Android and iOS.
Even if you are able to send an upstream message, it wouldn't make sense. The flow of upstream messaging is:
Client App > FCM Server > App Server
So the result/response that you would get when sending a message, should it succeed/fail, will point out the communication between the FCM server and the Client App, not with the App Server.
I have created an IM app that uses asmack to connect to various xmpp protocols such as google talk and facebook.
Occasionally some messages are lost in transit (both sent and received messages) when switching between Wifi/Data or when you lose signal altogether. Is there any way to retrieve the last received messages for that particular protocol when the app manages to reconnect? I find myself having to constantly check the default messaging app to see if any messages came through while I was disconnected.
Also, how about a way to get obtain delivery confirmation upon sending a message?
Thanks!
If you use a server that supports XEP-0136: Message Archiving or XEP-0313: Message Archive Management, you'll be able to obtain all messages previously sent.
However, neither Google Talk nor Facebook Chat implements these, and afaik they have no alternative XMPP API for it either.
I am trying to make an app that connect to the server.
The app is used by some devices.
If one of the devices upload something to the server, I would like other devices receive the notification about the server has something new.
My question is, how to check the server is change or not? How often we must check the server?
I wonder how the Online Messaging work, because someone send something, we receive the message ASAP
Is the concept can be use with my app?
Sounds like you want to take advantage of Google Could Messaging or GCM for short.
http://developer.android.com/guide/google/gcm/index.html
This could be a lightweight message telling the Android application that there is new data to be fetched from the server (for instance, a movie uploaded by a friend), or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly).
GCM is the standard for how your apps "talk" to your servers. Either for a message in it's entirety or just a message to go check the server because it's been updated.
I am writing a chat application on app engine using xmpp. My idea is to allow users to chat to one another. I can get messages to send to a google talk account, by taking the logged in user and removing the #gmail.com part of the address and replacing it with #appid.appspotchat.com )so for example if the logged in user is bob#gmail.com, the jid used to send from will be bob#appid.appspotchat.com). You can then send messages to an google talk account, e.g. jeff#gmail.com.
My problem is in receiving the messages back again. The developer pages show how the app itself can receive messages to the appid#appspot.com jid, but how do you get it to receive messages to the appid.appspot.com jid, and then present these messages tp the logged in user? The overall idea is when a user logs in, I will retrieve thri contact list, get the presence of their contacts (replacing gmail.com with appid.appspotchat.com) then present the available contacts to the user.
If this is not possible, is there a way to let the logged in user chat to other users in a different way? Ive briefly looked at the channel api but i don't think this is suitable?
You could use the Channel API to send a message down to a client when your server gets a message intended for that user. There's no facility to direct a XMPP message directly to a user on your own page; the XMPP API is used to send messages to users signed in to XMPP clients (such as Gmail, Pidgin, etc).
You can't use anything#your_app_id.appspot.com. Instead you must use anything#your_app_id.appspotchat.com as described in XMPP Addresses.
Im trying to make a simple app (just for learning sake) that will be able to send and receive emails from my own server. I don't have a problem sending emails from my app, my problem is:
How do you receive push notifications from the email server
Have the app check inbox, refresh the inbox list
I have tried searching for this, but have found nothing.
Thanks for your help
C2DM does push notifications, depending on your server. Search stackoverflow for it.
The app can check the inbox with whatever API is available to get the server's status. Even HTTP is possible.
The SampleSyncAdapter sample app is an example of using a sync adapter to regularly synchronize data between the server and the device, but you can use the same idea for download-only.