سؤال

Is it possible to email items from the timeline directly from the Google Glass Mirror API. For example can I email a picture I take with my Glass device to a contact you created?

I see it is possible to share items, but not sure if or now that translates to email.

هل كانت مفيدة؟

المحلول

If I understand you correctly, you want to show something on the Glass timeline similar to the Share card which allows you to Email instead. Unfortunately I don't believe that specific way is possible.

The way this should be done instead is writing Glassware, delivered over the Google Mirror API, which inserts itself as a contact on Glass. On the timeline item you want to email, go to Share, select your Glassware, and the item will be sent to your Glassware which then handles emailing it.

From Glass Developers - Contacts:

There are two ways that your Glassware can use contacts:

  • Allow users to share timeline items with your Glassware: Create a contact that represents your Glassware. When users want to share a timeline card, your contact appears as an option. You can also declare a list of acceptable MIME types so that your contact only appears for cards that you are interested in. To get notified of when users share a timeline card with your contact, you can subscribe to timeline notifications.

In other words, your Glassware appears as a contact (like a person) on Glass. When you tap Share to share a timeline item with a contact, you select the Glassware contact. That item will then be sent to the Glassware and you can do whatever you need to do with it (in your case, email).

Hope this helps! Sample code is also available on the above website.

نصائح أخرى

You can use the SendGrid Web API, which adds analytics.

Here is an explanation of how you can do it using Python.

Thanks and have fun!

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top