Adding a time line card using Mirror API, that can make call from Google Glass (C#.net)

To call a person you need contact details of a person so we will create a contact first.

Contact Amalan = new Contact();
Amalan.PhoneNumber = "+940711111111";

Now create a Timeline card and add call function on the menu item of the  card. When create the timeline card add the contact we created as the Creator

TimelineItem contactNumber = new TimelineItem()
{

Text = "Call Amalan",
BundleId = "8081",
Creator = Amalan,
MenuItems = new List<MenuItem>() {
new MenuItem() {Action = "VOICE_CALL"},
new MenuItem() {Action = "DELETE"}},
Notification = new NotificationConfig() { Level = "DEFAULT" },

};

Now we will insert the card that we created

controller.Service.Timeline.Insert(contactNumber).Fetch();

That’s it now you can make the call using the timeline card. Don’t forget to pair your phone with the GLASS

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s