java.lang.Object | |
↳ | com.google.android.gms.panorama.PanoramaClient |
The main entry point for panorama integration.
Use the PanoramaClient after the asynchronous connect()
method
has been called and your listener's
onConnected(Bundle)
method is called.
When your app is done using PanoramaClient, call disconnect()
,
even if the async result from connect()
has not yet been
delivered.
You should instantiate this object in your Activity's
onCreate(Bundle)
method and then call connect()
in
onStart()
and disconnect()
in
onStop()
, regardless of the state.
Nested Classes | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PanoramaClient.OnPanoramaInfoLoadedListener | Callback interface for loading panorama info. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a panorama client.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Connects the client to Google Play services.
| |||||||||||
Closes the connection to Google Play services.
| |||||||||||
Checks if the client is currently connected to the service, so that
requests to other methods will succeed.
| |||||||||||
Checks if the client is attempting to connect to the service.
| |||||||||||
Returns true if the specified listener is currently registered to
receive connection events.
| |||||||||||
Returns true if the specified listener is currently registered to
receive connection failed events.
| |||||||||||
Loads information about a panorama.
| |||||||||||
Loads information about a panorama from a content provider.
| |||||||||||
Registers a listener to receive connection events from this
GooglePlayServicesClient . | |||||||||||
Registers a listener to receive connection failed events from this
GooglePlayServicesClient . | |||||||||||
Removes a connection listener from this
GooglePlayServicesClient . | |||||||||||
Removes a connection failed listener from the
GooglePlayServicesClient . |
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||||||||||||||||||||||||
From interface
com.google.android.gms.common.GooglePlayServicesClient
|
Creates a panorama client.
context | The context to use for the connection. |
---|---|
connectionCallbacks | The callbacks invoked when the client is connected. |
connectionFailedListener | The listener which will be notified if the connection attempt fails. |
Connects the client to Google Play services. This method returns immediately, and connects to
the service in the background. If the connection is successful,
onConnected(Bundle)
is called. On a
failure, onConnectionFailed(ConnectionResult)
is called.
Closes the connection to Google Play services. No calls can be made on this object after calling this method.
Checks if the client is currently connected to the service, so that requests to other methods will succeed. Applications should guard client actions caused by the user with a call to this method.
Checks if the client is attempting to connect to the service.
Returns true if the specified listener is currently registered to receive connection events.
listener | The listener to check for. |
---|
Returns true if the specified listener is currently registered to receive connection failed events.
listener | The listener to check for. |
---|
Loads information about a panorama.
listener | the listener that is called, on the main thread, when the load completes |
---|---|
uri | the URI of the panorama to load info about. May be a file:, content:, or android_resource: scheme. |
Loads information about a panorama from a content provider. This method will also explicitly
grant and revoke access to the URI while the load is happening so images in content providers
may be inspected without giving permission to an entire content provider. The returned viewer
intent will also have the FLAG_GRANT_READ_URI_PERMISSION
set so the viewer has
access.
listener | the listener that is called, on the main thread, when the load completes |
---|---|
uri | the URI of the panorama to load info about. May only be a content: scheme. |
Registers a listener to receive connection events from this GooglePlayServicesClient
.
If the service is already connected, the listener's onConnected(Bundle)
method will be called immediately. Applications should balance calls to this method with
calls to unregisterConnectionCallbacks(ConnectionCallbacks)
to avoid leaking
resources.
If the specified listener is already registered to receive connection events, this
method will not add a duplicate entry for the same listener, but will
still call the listener's onConnected(Bundle)
method if currently
connected.
Note that the order of messages received here may not be stable, so clients should not rely on the order that multiple listeners receive events in.
listener | the listener where the results of the asynchronous connect() call are
delivered.
|
---|
Registers a listener to receive connection failed events from this
GooglePlayServicesClient
. Unlike registerConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks)
, if the service
is not already connected, the listener's
onConnectionFailed(ConnectionResult)
method will not be called immediately.
Applications should balance calls to this method with calls to
unregisterConnectionFailedListener(OnConnectionFailedListener)
to avoid leaking
resources.
If the specified listener is already registered to receive connection failed events, this method will not add a duplicate entry for the same listener.
Note that the order of messages received here may not be stable, so clients should not rely on the order that multiple listeners receive events in.
listener | the listener where the results of the asynchronous connect() call are
delivered.
|
---|
Removes a connection listener from this GooglePlayServicesClient
. Note that removing
a listener does not generate any callbacks.
If the specified listener is not currently registered to receive connection events, this method will have no effect.
listener | the listener to unregister. |
---|
Removes a connection failed listener from the GooglePlayServicesClient
.
Note that removing a listener does not generate any callbacks.
If the specified listener is not currently registered to receive connection failed events, this method will have no effect.
listener | the listener to unregister. |
---|