while it's possible to send image to glass in a timeline card, it doesn't look like it's possible to to the opposite (take a picture and upload it).
If I'm correct, this operation would be performed as a user action in the mirror APIs (like SHARE, REPLY, NAVIGATE), but I don't see any camera related function.
While you can't add a user action to take a photo directly from one of your timeline cards, you can register a Contact and Subscription to receive photos.
When the user takes a photo using the normal camera function of Glass, they can then SHARE the photo with your Contact and you will get a notification at the endpoint you specified in the Subscription.
See the following URLs as reference:
https://developers.google.com/glass/contacts#how_sharing_works
https://developers.google.com/glass/subscriptions#shared_picture
Related
My app is built in reactjs. There are a lot of "how tos" for the twilio video javascript sdk, but very little for people who are building in reactjs.
My problem is this: I have successfully implemented the construction and subscription of my users to a room. This is the process:
User 1 lands on user 2's profile, and decides to call. He presses the "call" button.
The server creates a call in the database, contacts Twilio with his info, and returns a twilio token to him.
He then connects to the room, publishes his local audio and video track to it, and waits the invitee
User 2's browser is informed of the call through a push notification from firebase messaging. He is sent a Twilio token from the server in that message, as well as information about the call and the room. His browser pulls up the "incoming call" page.
Assuming he answers, he begins publishing his own local audio and video tracks, and connects to the room.
The video and audio tracks of the other participant are attached to a couple react refs pointing to specific divs on the dom.
The video call is now progressing.
All this works well. However, my question is how do I access the actual room object at this point? Specifically, I want to mute the audio and video tracks based on input from the user. There are enable and disable methods in the Twilio library, but how to get to the tracks? The room creation and set up templates I have found online, which work, do not produce an object which can be modified, after the initial set up. All I get from let room = Video.connect... is a promise. If I use the Video.connect method AGAIN, it seems overkill - why contact Twilio again with my token when I already have a room in progress - and doesn't seem to work when I try.
Any help would be appreciated!
I played around with the MS Face API and wonder if there is a possibility to get the uploaded images back? For all uploaded images I get a faceId which can be added to persons and persons to groups and so on. But I have not found a way how to display e.g. the persons which are member in a group.
Or is the concept to save all images on the client and add the received id to the image on the client? Than is the question what happens with the images which are uploaded for face detection?
regards,
Jochen
The API doesn't allow the images to be retrieved back. You're right about the general use case, the IDs help you reference the correct image(s) in the application. Often times you'll want to upload a smaller image to the API than what you want to display to the user.
You can always submit feature requests to the team's public backlog over at: https://cognitive.uservoice.com/
I am building GlassWare that will add a timeline card to indicate one of a user's friends has performed some action. On the card, I would like to show an image of the friend.
If the Glass user has already added that friend as a Glass Contact, then the device may already have the friend's image. I have the friend's email and am trying to get at that image like so:
Call Contacts/List to get the contacts
Cycle through that list looking for one with a matching email address
Grab the imageUrl from the contact and use it in the html for my new timeline card
I'm facing 2 problems with this approach:
The Contacts/List is coming back empty.
The Contact class doesn't appear to have an email property
Is what I'm trying to do even possible? If so, is there a better way to do this?
What you are trying to do is not possible through Glass. The Contacts that you see are only those that your Glassware has created - your Glassware does not have access to the contacts created by other Glassware. This makes sense from a privacy perspective - a Glass Owner does not necessarily want you to have unrestricted access to who their contacts may be.
You may wish to look into using the Google+ Sign In, which can give you access to those people that a user has specifically given you access to. When the user approves your Glassware, they also approve which people your app can find out about. From here, you can use some of that user's information, including their profile picture.
Is it possible to check via MirrorAPI if a user actually owns Glass or if their account has the Mirror API functionality enabled?
There is currently (As of XE10) no way to do this. It is, however, a requested feature, so you may wish to star https://code.google.com/p/google-glass-api/issues/detail?id=107 to register your desire for the feature and to follow progress on it.
The suggestion there, and in other related SO questions, is to do a double-opt-in with the welcome card. This continues with the best practice of creating a welcome card, and also gives it a use to verify that the person can see it.
I think I also read in the mirror api docs, that a user cannot enable the mirror api if they are not a glass explorer: (right under step 2 on https://developers.google.com/glass/quickstart/php):
During this stage of the Mirror API Developer Preview, the API is only available to developers who have Glass as part of the Explorer Program.
If you are not an Explorer with Glass, the toggle is not displayed and you cannot enable the Mirror API.
In my case, the Glassware is inserting a jpeg image as a timeline card as a response to User's Voice query using "Take a note" Voice command. I keep waiting sometimes 10-15 mins before I see that timeline card on Glass. Sometimes, I see the inserted timeline card on Glass device only after I reboot the Glass device.
The way I have implemented this is:-
I do the Boot-strapping, that also includes inserting my Glassware Contact that accepts Voice command "Take a Note". Then on Glass I make a voice query using "Take a note", my Glassware accepts that query, sends an OK message to the Mirror Service and then inserts a new Timeline with jpeg image.
The Glass displays the Voice query however, it is not able to receive the inserted Timeline card in a consistent way.
We're currently investigating the issue, which seems to be affecting multiple users. Please keep an eye on this issue on our issue tracker for more information.
8/23/2013: We believe that the cause of this issue has been tracked down and fixed. If you still find yourself experiencing significant lag times, please let us know via the issue tracker.