There are previous discussions here regarding starting a Google Hangout from an intent on Android: start google hangouts in android
How can I start a Google Hangout in Android with an Intent?
The conclusion was that this was not possible. It is a requested enhancement here: https://code.google.com/p/google-plus-platform/issues/detail?id=385
However, yesterday Google released a new Hangouts app, with a new set of intents. Is starting a hangout via intent now possible?
I have been partially successful with action=android.intent.action.VIEW
, data=content://plus.google.com/hangouts
.
However, I want to pass the name or ID of the person I want to call--the recipient name. I can't figure this out.
The new browser-based hangout app starts a hangout with a URL something like this:
https://plus.google.com/hangouts/_/CONVERSATION/[26-character ID]?hl=en_US&hscid=[19-digit ID]&hpe=[14-character value]&hpn=[Google+ Name of Recipient]&hnc=0&hs=41.
I assume that not all of these parameters are necessary to start a hangout, but I cannot decipher how to pass the recipient name in the intent.
Any thoughts? Thank you.
So I don't know if this helps anyone else because I was mostly looking to fire off an intent using tasker. If you go into Google+ > Settings > Contacts you can check "Keep contacts up to date" and it will add some new actions to card that appears when you click on a user in android. Then you can use Intent Intercept to read the values coming through. Here's what I got:
ACTION: android.intent.action.VIEW
DATA: content://com.android.contacts/data/5555
TYPE: vnd.android.cursor.item/vnd.googleplus.profile.comm
FLAGS:
FLAG_ACTIVITY_FORWARD_RESULT
FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET
FLAG_ACTIVITY_PREVIOUS_IS_TOP
1 ACTIVITIES MATCH THIS INTENT:
Hangouts (com.google.android.talk - com.google.android.apps.babel.phone.BabelProfileActionActivity)
I was able to use the top three values to properly open a conversation with that contact. Obviously the number in your data field will change depending on the contact. You can either use the trick with Intent Intercept, or if you have root you can use something like SQLite Debugger to crack open the data table in the contacts database and find rows where the MIMETYPE_ID = 16 and the DATA4 = 10. You'll have to find your out what your RAW_CONTACT_ID is too. Good luck!