|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttv.ouya.console.api.OuyaFacade
public class OuyaFacade
Entry point for the OUYA API. Applications should use the singleton instance.
Calls are asynchronous, so
results are returned via client provided OuyaResponseListener
objects.
Constructor Summary | |
---|---|
protected |
OuyaFacade()
Default constructor. |
Method Summary | |
---|---|
boolean |
bindRequestHasBeenMade()
Deprecated. |
static OuyaFacade |
getInstance()
Returns the OuyaFacade singleton. |
void |
init(android.content.Context context,
java.lang.String developerId)
Initializes the facade. |
boolean |
isInitialized()
Returns whether the OuyaFacade has been initialized. |
void |
onServiceConnected(android.content.ComponentName componentName,
android.os.IBinder iBinder)
Called when the service is connected. |
void |
onServiceDisconnected(android.content.ComponentName componentName)
Called when the service is disconnected. |
void |
requestGamerUuid(OuyaResponseListener<java.lang.String> gamerUuidListener)
Requests the current gamer's UUID. |
void |
requestProductList(java.util.List<tv.ouya.console.api.Purchasable> purchasables,
OuyaResponseListener<java.util.ArrayList<tv.ouya.console.api.Product>> productListListener)
Returns a list of Product objects that describe the products (including
current price) associated with the specified list of Purchasable s. |
void |
requestPurchase(tv.ouya.console.api.Purchasable purchasable,
OuyaResponseListener<tv.ouya.console.api.Product> purchaseListener)
Requests that the specified Purchasable be purchased on behalf of the current user. |
void |
requestReceipts(OuyaResponseListener<java.lang.String> receiptListListener)
Requests receipts for all of the purchases that the current gamer has made from a particular vendor. |
protected static void |
setInstance(OuyaFacade instance)
Deprecated. |
void |
shutdown()
Shuts down the facade. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected OuyaFacade()
Protected in order to prevent anyone from accidently creating an OuyaFacade directly.
Method Detail |
---|
public static OuyaFacade getInstance()
@Deprecated protected static void setInstance(OuyaFacade instance)
public void init(android.content.Context context, java.lang.String developerId)
context
- An Android Context object.developerId
- The developer UUID, which is obtained from the developer portal.public void shutdown()
Note: Call shutdown
before the program exits. Otherwise, the internal BroadcastReceiver
will be leaked.
public boolean isInitialized()
public void requestProductList(java.util.List<tv.ouya.console.api.Purchasable> purchasables, OuyaResponseListener<java.util.ArrayList<tv.ouya.console.api.Product>> productListListener)
Product
objects that describe the products (including
current price) associated with the specified list of Purchasable
s.
purchasables
- The Purchasable objects that identify the products to be returned.productListListener
- A listener object that will asynchronously receive the Product
spublic void requestPurchase(tv.ouya.console.api.Purchasable purchasable, OuyaResponseListener<tv.ouya.console.api.Product> purchaseListener)
The IAP client service is
responsible for identifying the user and requesting credentials as appropriate, as well as providing
all of the UI for the purchase flow. When purchases are successful, a Product
object is returned
that describes the product that was purchased.
purchasable
- The Purchasable object that describes the item to be purchased.purchaseListener
- A listener object that will asynchronously receive the results of the purchase
requestpublic void requestReceipts(OuyaResponseListener<java.lang.String> receiptListListener)
receiptListListener
- A listener object that will asynchronously receive the list of receipts for all
purchases ever made by the gamer to whom the console is currently registered.public void requestGamerUuid(OuyaResponseListener<java.lang.String> gamerUuidListener)
gamerUuidListener
- A listener object that will asynchronously receive the UUID of the gamer to whom the
console is currently registered.@Deprecated public boolean bindRequestHasBeenMade()
public void onServiceConnected(android.content.ComponentName componentName, android.os.IBinder iBinder)
This is part of Android's ServiceConnection
interface, and it is not client consumable.
onServiceConnected
in interface android.content.ServiceConnection
componentName
- The name of the service that has been connected.iBinder
- The IBinder
object for that service.public void onServiceDisconnected(android.content.ComponentName componentName)
This is part of Android's ServiceConnection
interface, and it is not client consumable.
onServiceDisconnected
in interface android.content.ServiceConnection
componentName
- The name of the service that has been disconnected.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |