public abstract class BaseProductProvider extends java.lang.Object implements ProductProviderManager.Provider
| Modifier and Type | Field and Description |
|---|---|
protected ProductRepository |
_cache |
protected android.app.Activity |
_context |
| Constructor and Description |
|---|
BaseProductProvider(android.app.Activity context) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(java.lang.String pkg) |
void |
dispose() |
ProductRepository |
get()
Get cached repo contents
|
protected abstract java.io.File |
getAPK(ProductInformation product)
Runs on UI thread, must be quick (i.e.
|
void |
install(ProductInformation product)
Base impl ignores bForce
|
boolean |
installed(java.lang.String pkg)
Notification that an app has been installed
|
boolean |
isRemote()
Check if the repo is hosted remotely (not on this device)
|
protected abstract ProductRepository |
load()
Load cached index
|
protected ProductRepository |
parseRepo(java.lang.String repoType,
java.io.File repoIndex) |
java.lang.String |
toString() |
void |
uninstall(ProductInformation product)
User has requested to uninstall the product
This is done on UI thread by default, so if operation may be long running, implementations
should off load to another thread
|
boolean |
uninstalled(java.lang.String pkg)
Notification that an app has been uninstalled
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitrebuildprotected ProductRepository _cache
protected android.app.Activity _context
public void dispose()
dispose in interface ProductProviderManager.Providerpublic ProductRepository get()
ProductProviderManager.Providerget in interface ProductProviderManager.Providerprotected abstract ProductRepository load()
protected abstract java.io.File getAPK(ProductInformation product)
product - the product informationpublic boolean contains(java.lang.String pkg)
contains in interface ProductProviderManager.Providerpublic void install(ProductInformation product)
install in interface ProductProviderManager.Providerproduct - install the product described by the passed in product informationpublic void uninstall(ProductInformation product)
ProductProviderManager.Provideruninstall in interface ProductProviderManager.Providerpublic boolean installed(java.lang.String pkg)
ProductProviderManager.Providerinstalled in interface ProductProviderManager.Providerpublic boolean uninstalled(java.lang.String pkg)
ProductProviderManager.Provideruninstalled in interface ProductProviderManager.Providerpublic boolean isRemote()
ProductProviderManager.ProviderisRemote in interface ProductProviderManager.Providerprotected ProductRepository parseRepo(java.lang.String repoType, java.io.File repoIndex)
public java.lang.String toString()
toString in class java.lang.Object