We have developed a google glass ware(timeline based) app. In that first we will send some timeline cards to the glass with some inbuilt menu items and custom menu items.
and we have configured the proxy url for getting notifications for time line.
It worked fine for so many days.
But After Google Glass XE-16 update we are not getting the timeline notifications
Can you please guide us inresolving the issue.
Hi Prisoner,
for inserting timeline we have used the following code:
global $base_url="http:\/\/mysite.com\/mirror";
$client = get_google_api_client();
$client->setAccessToken(get_credentials($_SESSION['userid'])); // A glass service for interacting with the Mirror API
$mirror_service = new Google_MirrorService($client);
$new_timeline_item = new Google_TimelineItem();
$new_timeline_item->setText('Hey I am testing new');
$notification = new Google_NotificationConfig();
$notification->setLevel("DEFAULT");
$new_timeline_item->setNotification($notification);
$menu_items = array();
$custom_menu_item = new Google_MenuItem();
$custom_menu_value = new Google_MenuValue();
$custom_menu_value->setDisplayName("Add Item");
$custom_menu_value->setIconUrl( $base_url . "/static/images/tulip.jpg");
$custom_menu_item->setValues(array($custom_menu_value));
$custom_menu_item->setAction("CUSTOM");
$custom_menu_item->setId("add_to_cart_item"); // This is how you identify it on the notification ping
array_push($menu_items, $custom_menu_item);
$new_timeline_item->setMenuItems($menu_items);
insert_timeline_item($mirror_service, $new_timeline_item, "image/jpeg", file_get_contents($base_url . "/static/images/tulip.jpg"));
for this we are trying to add new custom menus and built in menus like (pin,delete,share,send)
To subscribe to notifications we have used the Google glass Php mirror api function.
subscribe_to_notifications($mirror_service, "timeline", $_SESSION['userid'], $base_url . "/notify.php");
All these are working fine before XE-16 version update. After updation we are not able to get notification for time line card notifications