0

I'm trying to add a SEND_MESSAGE menu command to a Google Glass timeline item as per the documentation here:
https://developers.google.com/glass/v1/reference/timeline/insert

SEND_MESSAGE - Initiate sending a message to the timeline item's creator:
If the creator.phoneNumber is set and Glass is connected to an Android phone, the message is an SMS.
Otherwise, if the creator.email is set, the message is an email.

It states that I have to set the creator.email to the email to send to. However, there is no email property on the Google_Contact type, and the API throws an error if I subclass Google_Contact and add one or pass in anything other than a Google_Contact (like an array with email value).

If I set all the other fields to the email, I get an error sound on Glass when I run the menu command:

$new_timeline_item = new Google_TimelineItem ();
$creator = new Google_Contact();
$creator->setDisplayName('admin@acemoda.com');
$creator->setId('admin@acemoda.com');
$creator->setSource('admin@acemoda.com');
$creator->setSpeakableName('admin@acemoda.com');
$new_timeline_item->setCreator($creator);

How do I set the creator.email field in the PHP Google Glass Mirror API?

Lance Nanek
  • 6,377
  • 2
  • 24
  • 19
  • Can you try plugging your Glass in to get some debug information? I'd be curious to see if there is an error that is being put out in the ADB logs. – Jessie A. Morris Jul 31 '14 at 14:34
  • I will next time I try this. I ripped out all the attempt code that wasn't working for now. Was thinking my next attempt will be to login as the admin account we want people to be able to send messages to, capture the Google created user object, and set that as the creator. – Lance Nanek Aug 01 '14 at 16:28

0 Answers0