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?