Receiving GTalk messages in your own application?

I am new to Android development. I'm a big fan of the Android Inbuilt Talk app, but I hate it - the lack of a custom notification, so I decided to develop an app for it.

My requirement is an application that monitors GTalk and displays pre-configured notifications when a message is received.

Please note that I do not want my application to request a GTalk username or password from a user. I know the Asmack library, but it is more useful for the IM client, so I just need to capture the incoming message event. (Something like BroadcastReceiver for SMS?)

Is it possible to receive Gtalk messages, how can you receive SMS messages using BroadcastReceiver ?

+6
source share
2 answers

There are no documented and supported tools for this, and I sincerely hope that Google has not left with some undocumented, unsupported and unsecured tools for this.

+3
source

Until it's documented, Google Services Framework provides permissions that give you access to the Google Talk content provider (GTalk Super Notifier uses one of them to do its magic). However, I could not find the documentation for this content provider, so you have to redesign it.

Here are the relevant permissions:

 + group:android.permission-group.MESSAGES + permission:com.google.android.providers.talk.permission.READ_ONLY package:com.google.android.gsf label:read instant messages description:Allows apps to read data from the Google Talk content provider. protectionLevel:dangerous + permission:com.google.android.providers.talk.permission.WRITE_ONLY package:com.google.android.gsf label:write instant messages description:Allows apps to write data to the Google Talk content provider. protectionLevel:dangerous 

As an aside, it is strange that Google will set permissions with Level = "dangerous" protection and not document their use.

+2
source

All Articles