问题
Long back, android used to have GtalkService that let applications use Gtalk for various purposes, it was removed due to security reasons. Do we still have a method of invoking a Gtalk service that let us interact with gtalk from another application e.g. pinging a friend programmatically.
回答1:
GTalk is nothing else as a Google XMPP Service. So you have 2 options for android:
- Use Asmack, a ported Smack Library for Android
or
- Use AsmackService (not yet releases but functional), together with AsmackLibrary.
回答2:
You may want to check sources of TalkMyPhone application. Don't know if its using GtalkService, but it does gtalk interaction, works nicely for me.
来源:https://stackoverflow.com/questions/3977260/android-gtalk-api