Question:* Requests to the Google Mirror API must be authorized using:
Answer: • OAuth 2.0 credentials
Question:* Which is the correct URI to request a map on a timeline card?
Answer: • glass://map
Question:* True or False? For better performance, you can ask the server to send only the fields you really need and get a partial response instead.
Answer: • True
Question:* Should “requestCode” match the request code used when starting an image capture intent?
Answer: • Yes.
Question:* Which of these are NOT supported languages with client libraries for development on the Mirror API?
Answer: • All are supported
Question:* To prevent reflows as a map image is being rendered, always specify the width and height of the image in the______ tag.
Answer: • <img>
Question:* Creating an APIs project in Google's APIs console allows you to:
Answer: • All of the above
Question:* In the context of Google Glass, what is a URI?
Answer: • Universal Resource Identifier.
Question:* To capture an image with the camera application, you would set the call, “startActivityForResult(android.content.Intent, int)” to what?
Answer: • ACTION_IMAGE_CAPTURE
Question:* What is the public final class, “LiveCard” responsible for?
Answer: • Letting you create active cards and publish them to the timeline.
Question:* To insert a timeline item, POST a ______ representation of a timeline item to the REST endpoint
Answer: • JSON
Question:* If you were to place two fingers on the touchpad, which public static interface would start reporting?
Answer: • GestureDetector.FingerListener
Question:* Which is the correct syntax for a public constructor?
Answer: • public WindowUtils ()
Question:* True or False? The two ways to bundle content in the timeline is paging or threading.
Answer: • True
Question:* Where can live cards display content from?
Answer: • Either from a layout resource, or directly from their drawing surface.
Question:* How many characters are recommended for menu items?
Answer: • 15 or less.
Question:* How do you turn on USB debugging for Glass?
Answer: • Settings > Device Info > Turn on debug
Question:* True or False? You cannot attach a video to a timeline item.
Answer: • False
Question:* Who is the GDK's intended audience?
Answer: • Those comfortable with Android development.
Question:* True or False? In production, your notification subscription's callback URL must support SSL.
Answer: • True
Question:* Each item in the user's timeline is represented as a "TimelineItem" ______ structure.
Answer: • JSON
Question:* “FLAG_DISABLE_HEAD_GESTURES” is a what?
Answer: • Constant.
Question:* What code do you use to disable head gestures when a window is visible?
Answer: • getWindow().addFlags(WindowUtils.FLAG_DISABLE_HEAD_GESTURES);
Question:* What is the recommended aspect ratio for timeline images?
Answer: • 16:9
Question:* The public static interface, “GestureDetector.BaseListener” does what, exactly?
Answer: • Interprets discrete gestures.
Question:* If specifying an icon when designing a menu, what is the required image size?
Answer: • 50x50px
Question:* When handling authorization requests, the authorization code is a one-time code that your server can exchange for:
Answer: • An access token
Question:* What is the “card” class responsible for?
Answer: • Providing a model for the card in the timeline.
Question:* What is the class, “MenuUtils” used for?
Answer: • It is a collection of extensions for Menu and related classes.
Question:* What is the constant value for the string. “ACTION_VOICE_TRIGGER”?
Answer: • com.google.android.glass.action.VOICE_TRIGGER
Question:* Why is it best to manage cards in a background service?
Answer: • Cards require long-running ownership to own them the entire time that they are published.
Question:* What does the class VoiceTriggers do?
Answer: • It allows apps to insert new items into the main voice menu.
Question:* “THREE_LONG_PRESS” is an example of what?
Answer: • A gesture.
Question:* In the context of Google Glass, what is an intent?
Answer: • An abstract description of an operation to be performed.
Question:* What call do you use to capture video with the camera application?
Answer: • startActivityForResult(android.content.Intent, int)
Question:* What patterns should be used for the sake of consistency across all Glassware?
Answer: • UX
Question:* How is it best to manage live cards?
Answer: • In a background service.
Question:* To reduce the bandwidth needed for each request is to enable:
Answer: • Gzip compression
Question:* When using a server-side flow when your application needs to access Google APIs on behalf of the user such as when the user is offline, you pass an authorization code that is used to acquire _______ tokens for your server.
Answer: • an access and refresh
Question:* True or False? If the user deletes an item from their timeline, it's recommended that you delete this content from your systems too.
Answer: • True
Question:* To use a built-in menu item, you only need to populate the _____ of each "menuItem."
Answer: • action
Question:* If you're having trouble verifying an image path, what should you use?
Answer: • A FileObserver.
Question:* When a user triggers one of your custom menu items, a notification is sent to your service with the ______ populated
Answer: • menuItem.id
Question:* If you have metadata that you want to send along with the data to upload, you can make a single ______ request
Answer: • multipart/related
Question:* When an item is being clicked and selected, what will notify you using the listener interfaces from AdapterView?
Answer: • CardScrollView
Question:* Users must enable your contact at the ______ site before they can share timeline items with your contact.
Answer: • MyGlass
Question:* When would you create your card with the help of a RemoteViews class?
Answer: • When your application only requires standard widgets and infrequent updates.
Question:* What is a gesture that “GestureDetector.BaseListener” would be listening for?
Answer: • TAP
Question:* What must happen to your card content when direct rendering is enabled?
Answer: • The card content will have to be rendered directly onto a surface.
Question:* A notification from the Mirror API is sent as a POST request to the subscribed endpoint containing a JSON:
Answer: • Request body
Question:* If your firewall does not allow HTTP "PATCH" requests, then do _______ request and set the override header to PATCH, as shown below:
Answer: • an HTTP "POST"
Question:* What should the result code match before capturing?
Answer: • RESULT_OK
Question:* To subscribe to notifications in a production environment, you must provide a callback URL with a valid ______ to handle the notification.
Answer: • SSL certificate
Question:* How many gestures are recognized per event sequence?
Answer: • One.
Question:* What does the throw, “IllegalArgumentException” mean?
Answer: • It means that your target device is missing.
Question:* To send updated data only for the specific fields that you’re changing, use the HTTP ______ verb.
Answer: • "PATCH"
Question:* What does a page curl in the top right corner of a timeline card denote?
Answer: • A bundle
Question:* Which is the recommended "uploadType" request parameter for larger files?
Answer: • "uploadType=resumable"
Question:* “CardScrollAdapter” should be used in conjunction with what?
Answer: • CardScrollView to implement horizontally scrolling views.
Question:* What three parameters are included to measure a two-finger scroll on the touchpad?
Answer: • Displacement, delta, and velocity.
Question:* True or False? The "Delete" and "Dismiss" menu items are functionally identical
Answer: • False
Question:* True or False? You do NOT need to send an authorization token with every request that is marked (AUTHENTICATED)
Answer: • False
Question:* Which of the following is a protected method?
Answer: • dispatchGenericFocusedEvent
Question:* When rendering a map on a timeline card, how many pixels wide will the following polyline be? polyline=8,ffff0000;47.6,-122.34,47.62,-122.40
Answer: • 8
Question:* If you want additional text on a menu item, what public method do you use?
Answer: • setDescription
Question:* What class do CardScrollView's child views come from?
Answer: • CardScrollAdapter
Question:* What class is recommended for creating CardScrollAdapter's views?
Answer: • Card.
Question:* When creating a contact, you must specify a displayName and at least one ______, which Glass uses to display the contact information to the user.
Answer: • imageUrls
Question:* When working with a fields request parameter, use _____ to select a field "c" nested within "b".
Answer: • a/b/c
Question:* True or False? The subscription proxy provided by Google is one of the most secure options and should be used in a production environment, as well as a development environment.
Answer: • False
Question:* What do clients define?
Answer: • Card contents.
Question:* Paged cards in a bundle all share the same "timelineId" and therefore have the same set of:
Answer: • Menu items
Question:* To use a simple upload, make a POST or PUT request to the method's /upload URI and add the query parameter:
Answer: • "uploadType=media"
Question:* Which of these are NOT a provided method to design timeline cards with the Mirror API?
Answer: • Use Google's provided image editor
Question:* If your application needs a new refresh token it must send a request with the _______ query parameter set to "force".
Answer: • "approval_prompt"
Question:* What does a card scroller display?
Answer: • A key-value database.
Question:* Which of these is NOT a valid API method?
Answer: • go
Question:* Your Glassware receives location updates every:
Answer: • 10 minutes
Question:* Can the setDescription attribute be written in XML?
Answer: • No.
Question:* With updates that use the HTTP ______ verb, the request fails if you don't supply required parameters, and it clears previously set data if you don't supply optional parameters.
Answer: • "PUT"
No comments:
Post a Comment