Elance Google Glass (Development) Test Answers 2015



Requests to the Google Mirror API must be authorized using:
OAuth 2.0 credentials
G+ accounts
OpenID
Gmail accounts


The public static interface, “GestureDetector.BaseListener” does what, exactly?
Places the gestures in queue.
Initiates non-discrete gestures.
Blocks discrete gestures.
Interprets discrete gestures.


True or False? You cannot attach a video to a timeline item.
False
True


Creating an APIs project in Google's APIs console allows you to:
Share API management with a team
Monitor API usage and control API access
All of the above
Use Google APIs beyond anonymous limits


Should “requestCode” match the request code used when starting an image capture intent?
Yes.
No. It will cause your video API to crash.
No.
No, because it will cause a conflict and destroy the image.


To prevent reflows as a map image is being rendered, always specify the width and height of the image in the______ tag.
<a href>
<p>
<section>
<img>


Which of these are NOT supported languages with client libraries for development on the Mirror API?
Python
Go
Ruby
All are supported


If you were to place two fingers on the touchpad, which public static interface would start reporting?
Fingertools.Listen
TwoFingersDetected
GestureDetector.FingerListener
Finger.Listener.Express


To capture an image with the camera application, you would set the call, “startActivityForResult(android.content.Intent, int)” to what?
ACTION_IMAGE_CAPTURE
IMAGE
IMAGE_CAPTURE
IMAGE_YES


In the context of Google Glass, what is a URI?
Useful Resource Identity
Universal Rescue Identity
Universal Resource Identifier.
United Resource Identity


Where can live cards display content from?
From a secondary background card.
From a layout resource only.
Either from a layout resource, or directly from their drawing surface.
From their drawing source only.


What is the public final class, “LiveCard” responsible for?
It does nothing.
Carrying an object to the timeline.
Letting you create active cards and publish them to the timeline.
Letting you create real-time card sequence.


True or False? The two ways to bundle content in the timeline is paging or threading.
False
True


To insert a timeline item, POST a ______ representation of a timeline item to the REST endpoint
HTML
Eclipse
JSON
Java


Which is the correct syntax for a public constructor?
Utils ()public Window
public WindowUtils ()
WindowUtils (public)
public (WindowUtils


Who is the GDK's intended audience?
Those who are experts with word processors.
Beginners with no programming experience.
Those comfortable with Android development.
People well-versed in Access programming.


How do you turn on USB debugging for Glass?
Turn on debug > Device Info > Settings
It cannot be turned on.
Settings: Turn on debug > Device Info
Settings > Device Info > Turn on debug


How many characters are recommended for menu items?
More than 15.
15 or less.
50 or more.
20 or more.


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.
True
False


True or False? In production, your notification subscription's callback URL must support SSL.
False
True


Each item in the user's timeline is represented as a "TimelineItem" ______ structure.
JSON
SOAP
YAML
XML


What is the “card” class responsible for?
Inserting a card into the timeline.
Introducing the card into the timeline.
Placing a card into the timeline.
Providing a model for the card in the timeline.


What code do you use to disable head gestures when a window is visible?
getWindow().addFlags(WindowUtils.FLAG_DISABLE_HEAD_GESTURES);
getWindow().addFlags(WindowUtils.FLAG_ENABLE_HEAD_GESTURES);
(WindowUtils.FLAG_DISABLE_HEAD_GESTURES);
getWindow().addFlags(WindowUtils);


“FLAG_DISABLE_HEAD_GESTURES” is a what?
Variable.
Constant variable.
Constant.
Variable constant.


Why is it best to manage cards in a background service?
None of these. It is NOT best to manage cards in a background service.
Cards require long-running ownership to own them the entire time that they are published.
Cards require exponentially increasing memory
Cards require multiple owners


What is the recommended aspect ratio for timeline images?
12:25
16:9
30:10
3:1


What is the class, “MenuUtils” used for?
It is a collection of extensions for Menu and related classes.
It is a collection of Menus for Card and related classes.
It is a collection of elements for Panel and related classes.
It is a collection of cards for Pictures and related classes.


When handling authorization requests, the authorization code is a one-time code that your server can exchange for:
A user ID
An OpenID token
A sign-in token
An access token


If specifying an icon when designing a menu, what is the required image size?
150x50px
50x100px
30x10 px
50x50px


In the context of Google Glass, what is an intent?
An abstract description of a set of configurations.
An abstract description of an operation to be performed.
A description of an operation to be isolated.
An abstract description of an operation already performed.


What is the constant value for the string. “ACTION_VOICE_TRIGGER”?
glass.action.VOICE_TRIGGERcom.google.android
VOICE_TRIGGER_com.google.android.glass.action.
App.com.google.android.glass.action
com.google.android.glass.action.VOICE_TRIGGER


True or False? If the user deletes an item from their timeline, it's recommended that you delete this content from your systems too.
False
True


What call do you use to capture video with the camera application?
GO_CAMERA
ACTIVATE_VIDEO
Start_CAMERA
startActivityForResult(android.content.Intent, int)


What does the class VoiceTriggers do?
It allows apps to insert new items into the main text menu.
It allows apps to delete new items from the main voice menu.
It deletes apps which insert new items into the main video menu.
It allows apps to insert new items into the main voice menu.


Which is the correct URI to request a map on a timeline card?
mirror/v1/render
glass://map
GET/mirror/v1/map
map://draw


If you're having trouble verifying an image path, what should you use?
A file manager.
A compiler.
A FileObserver.
A browser.


What should the result code match before capturing?
Nothing.
OK_RESULT
RESULT
RESULT_OK


“THREE_LONG_PRESS” is an example of what?
An extension.
A gesture.
A movement.
A trigger.


To use a built-in menu item, you only need to populate the _____ of each "menuItem."
get
menuDo
action
card_Slide


What patterns should be used for the sake of consistency across all Glassware?
TU
UT
XU
UX


To reduce the bandwidth needed for each request is to enable:
PKZIP compression
Gzip compression
LZ compression
HTTP lossless compression


How is it best to manage live cards?
In the foreground.
With an external program.
In a background service.
In a sandbox.


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.
an access and refresh
entry
listen
an HTTP and JSON


What must happen to your card content when direct rendering is enabled?
The card content will have to be manually rendered.
The card content will have to be rendered directly into a sandbox.
The card content must be backed up accordingly.
The card content will have to be rendered directly onto a surface.


When a user triggers one of your custom menu items, a notification is sent to your service with the ______ populated
application/JSON
iconURL
menuItem.id
tagMenu.user


If you have metadata that you want to send along with the data to upload, you can make a single ______ request
simple/metadata
multipart/related
uploadType=metadata
upload/single


If your firewall does not allow HTTP "PATCH" requests, then do _______ request and set the override header to PATCH, as shown below:
a SSL
an HTTP "PUT"
an HTTP "POST"
an XPath "PATCH"


Users must enable your contact at the ______ site before they can share timeline items with your contact.
Glassware
Notebook
MyGlass
API


What is a gesture that “GestureDetector.BaseListener” would be listening for?
PAT
PTA
TAP
TPA


When would you create your card with the help of a RemoteViews class?
When your application only requires standard tools and constant patches.
When your application only requires advanced widgets and constant updates.
When your application is broken.
When your application only requires standard widgets and infrequent updates.


If you want additional text on a menu item, what public method do you use?
setText
setDescription
setMenu
setMethod


A notification from the Mirror API is sent as a POST request to the subscribed endpoint containing a JSON:
Tag
Validation code
Header request
Request body


When an item is being clicked and selected, what will notify you using the listener interfaces from AdapterView?
CardScroll
ViewCardScroll
CardScrollView
CardView


True or False? The "Delete" and "Dismiss" menu items are functionally identical
True
False


How many gestures are recognized per event sequence?
Four
Seven
Two
One.


Which of the following is a protected method?
dispachEventProtection
dispachProtectEvent
dispatchGenericFocusedEvent
GenericEvent


What three parameters are included to measure a two-finger scroll on the touchpad?
Displacement, gamma, and velocity.
Displacement, delta, and velocity.
Engagement, delta, and velocity.
Displacement, delta, and friction.


To subscribe to notifications in a production environment, you must provide a callback URL with a valid ______ to handle the notification.
username
SSL certificate
JSON representation
REST endpoint


“CardScrollAdapter” should be used in conjunction with what?
CardScrollView to implement horizontally scrolling views.
ScrollCard to implement horizontally scrolling views.
ViewCard to implement horizontally scrolling views.
HorizontalCard to implement vertically scrolling views.


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
34
47
8
6


To send updated data only for the specific fields that you’re changing, use the HTTP ______ verb.
"PATCH"
"access_grant"
"PARTIAL"
"UPDATE"


What does the throw, “IllegalArgumentException” mean?
It means your target program is malfunctioning.
It is a recursive error.
It is a system error.
It means that your target device is missing.


What does a page curl in the top right corner of a timeline card denote?
A video card
Map directions
A bundle
A link to an outside source


What do clients define?
API contents.
Program contents.
Client contents.
Card contents.


What class do CardScrollView's child views come from?
CardScrollMonitor
CardScrollAdapter
CardScrollCreator
CardScrollGenerator


True or False? You do NOT need to send an authorization token with every request that is marked (AUTHENTICATED)
False
True


Which of these is NOT a valid API method?
get
go
list
delete


Paged cards in a bundle all share the same "timelineId" and therefore have the same set of:
Endpoints
Boundaries
Threads
Menu items


Which is the recommended "uploadType" request parameter for larger files?
"uploadType=massive"
None of these are recommended
"uploadType=resumable"
"uploadType=media"


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.
False
True


To use a simple upload, make a POST or PUT request to the method's /upload URI and add the query parameter:
"upload=simple"
"uploadType=media"
"typeUpdate=media"
"uploadType=image"


When creating a contact, you must specify a displayName and at least one ______, which Glass uses to display the contact information to the user.
imageUrls
locationCoord
nameID
pictureDisplay


Which of these are NOT a provided method to design timeline cards with the Mirror API?
Creating your own HTML template
Using Google's HTML templates
Providing text
Use Google's provided image editor


What class is recommended for creating CardScrollAdapter's views?
Element.
Card.
Action.
Gesture.


When working with a fields request parameter, use _____ to select a field "c" nested within "b".
a/b/c
c$b$a
c:b
c/b/a


If your application needs a new refresh token it must send a request with the _______ query parameter set to "force".
"Google_auth"
"glass_script"
"approval_prompt"
"access_grant"


Your Glassware receives location updates every:
Hour
30 seconds
10 minutes
15 seconds


What does a card scroller display?
A key-value database.
A glass-value database.
A scroller-value database.
A card-value database.


Can the setDescription attribute be written in XML?
Only in the prior version.
No.
Only if the configuration file is edited accordingly.
Yes.


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.
"REST"
"PATCH"
"PUT"
"POST"