Check if a user is typing using App Engine XMPP - google-app-engine

The XMPP service in GAE is great and all, but I'm really interested in when a user opens up a window to send a message, or when he/she starts typing. I think XMPP supports this, because Pidgin does this, as does Google Talk, so why not the XMPP/GAE service?

Unfortunately App Engine doesn't pass in Chat State notifications to the application, so you won't be able to receive notifications of a user typing a message ("composing") until they actually send it.

Related

Objectify - iOS - Android - Refresh chat UI when a new message is sent

What is a good way to make a chat application between two people using Objectify and Google Datastore?
The main question I have is how can you have a mobile client (iOS/Android) screen refresh itself when a new message is sent? Such as in the following screen:
The main option I see is to send a push notification to the client that a new message has been sent, so query the datastore for new messages.
Web-sockets don't seem to be supported on Google App Engine from what I read. Or if they are they seem buggy?
What other options are there?
It's technically possible, but it's a terrible idea. You would have to poll, which would scale poorly and kill your clients' battery life.
The datastore is the wrong tool for this job. Look for the highest level API that will do what you want, ideally something websocket-oriented like Firebase.

Crossplatform mobile app dev environment for reading SMS inbox

Is there a cross-platform mobile app dev environment that allow us to access the SMS inbox of the phone?
I would like to create messenger apps on different platforms(Android and Symbian at least) that plays around with SMS. I learnt that Phonegap and Mosync is currently not providing such API, and I am still finding it. Any suggestions?
MoSync allows you to send SMS, but like you say, it wont let you receive them.
I guess the reason is, most app only need to send sms, because incoming messages
can be picked up from a server. Also many apps use sms to generate spread/users,
once your app is connected to a IP service of some kind you just talk to the server.
There is of course the cost question, send sms costs app users money, receiving sms
can cost the service provider money.

Google App Engine Xmpp chat how to manage the status of the users?

It is easy to play with xmpp and the channel api to obtain a chat like...
http://www.dev-articles.com/article/Google-App-Engine-sending-messages-with-XMPP-393002
is an example, although I'm fighting a bit to understand the best way to manage the status of the users. Anyone with some experience about it?
I read the part "User Presence" in the documentation http://code.google.com/appengine/docs/java/xmpp/overview.html I still don't have a grasp of it...
Ok I think I know a bit more now, so this is how I manage the status of a xmpp account with google app appengine.
Xmpp status in app engine

Adding Instant Messaging (possibly XMPP) to my website on AppEngine (without using Google Login IDs)

I have developed a dating website built on top of the Google App Engine, to which I would like to add instant messaging, and possibly/probably audio and video conferencing.
Given that the users on the website do not want to share their personal details or real contact information, I am handling all of the login information and sessions without assuming that the clients have (or even want) a google account ID or any other login that is associated with their real identity.
I would like to hear suggestions on how I could go about adding instant messaging to my website given that I cannot just directly access Google Talk or some other existing service.
Would it make sense to use XMPP for this, and if so will Google Talk or any other XMPP service provider allow me to register new user accounts without manual intervention (ie. after a user is registered on my site, automatically register them with the XMPP provider)? Or, if not, perhaps I can use a single google ID with Google Talk with a different resource identifier for each user (me#google.com/user1, me#google.com/user2, etc...), and send messages between the different resources? Could this work, and/or would having thousands of simultaneous connections to a single account get me banned from Google Talk?
Perhaps some kind of AJAX based solution might make more sense given the fact that users are already registered on my website, but are not registered for an XMPP service?
Any suggestions about how I might approach this problem would be greatly appreciated.
Kind Regards
-Alexander
Text chat is the easier problem. You can do either with or without XMPP. Without XMPP, you'll be building a Facebook chat type client on your pages that sends messages from each user to the app, and the app then shows then on the recipient's screen.(The client can be polling, or use comet when it comes out). Check out olark to see how this works.
Once you build code to use the app as a switchboard that routes the correct message to the correct person (anonymously, maybe), you can port this easily to XMPP if you require. Both parties add you.dating.site#appspotchat.com to their buddy lists, and you send all messages from girl#site.com to guy#site.com and vice-versa. (assuming a heterogeneous site.)
Audio and video, I have no clue how to do without sharing details between the parties :-/

Google App Engine Emails Going to SPAM folder

When I send emails through google app engine using the mail's send_mail function, they often get placed in the receiver's SPAM folder. Although this problem does not happen for GMail accounts, it does for Yahoo Mail accounts (and presumably several others)
Is there a way to get the emails GAE sends around the SPAM filter?
This is going to depend a great deal on what about the messages you're sending gets them marked as spam. Google's documentation suggests that it's the app engine that actually does the SMTP, so there might be some other google app engine app that someone's marked as spam and your sending IP (which happens to be the same) is getting tarred with the same brush, or it might be something about the content of your messages. Many big mail providers give you some way to determine how 'spammy' they'll think a particular message will be; perhaps you could get information that way?
Another option is the standard 'be careful to add [some address] to your safe senders list if you want to get email from us!' warning in your app.
See this reasoning, provided by Gmail on how it filters incoming email based on the header information. The key thing to note here is that all emails sent via GAE's SMTP infrastructure are sent via email IDs of the format xyz.apphosting.bounces.google.com, which by Gmail's definition itself brings the emails under the category of falsely / apparently bounced email messages, hence they get categorized as spam. The same would hold true for other email service providers that follow similar logic for spam filtering.
GAE still needs to come up with a good solution to this problem. In the meanwhile, the suggestion I would give you is to use an external email service. Since GAE does not allow you to open arbitrary TCP sockets, you can use the URLFetch service to submit requests to external services that can open SMTP connections and send email on behalf of your email ID.
While this approach shifts your email sending costs to the external service, it consumes additional GAE resources, namely- UrlFetch service API calls and UrlFetch Data sent.
Update: Google App Engine plans to launch support for outbound sockets soon as part of their production feature roadmap, so making external SMTP connections directly would become a possibility.

Resources