public class RemoteProductProvider extends BaseProductProvider
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
REMOTE_REPO_CACHE_PATH |
_cache, _context| Constructor and Description |
|---|
RemoteProductProvider(android.app.Activity context,
android.content.SharedPreferences prefs) |
| Modifier and Type | Method and Description |
|---|---|
static void |
cleanup(java.io.File infz,
java.io.File dest)
Dumb cache clear for now
|
static boolean |
extract(java.io.File infz)
Extract the repo cache into apk/support/remote
|
static boolean |
extract(java.io.File infz,
java.io.File dest)
Extract the repo cache into the specified destination directory
|
java.io.File |
getAPK(ProductInformation product)
Runs on UI thread, must be quick (i.e.
|
void |
install(ProductInformation product)
Leverage HTTPRequestService to download APK
|
boolean |
isRemote()
Check if the repo is hosted remotely (not on this device)
|
protected ProductRepository |
load()
Load cached index
|
ProductRepository |
parseRepo(java.lang.String repoType,
java.io.File repoIndex)
Override to convert to use java.io.FileReader outside of IO Abstraction
|
ProductRepository |
rebuild(ProductProviderManager.ProgressDialogListener l)
Only execute from non-UI thread
|
contains, dispose, get, installed, toString, uninstall, uninstalledpublic RemoteProductProvider(android.app.Activity context,
android.content.SharedPreferences prefs)
protected ProductRepository load()
BaseProductProviderload in class BaseProductProviderpublic ProductRepository rebuild(ProductProviderManager.ProgressDialogListener l)
l - public static boolean extract(java.io.File infz)
infz - public static void cleanup(java.io.File infz,
java.io.File dest)
public static boolean extract(java.io.File infz,
java.io.File dest)
infz - dest - public java.io.File getAPK(ProductInformation product)
BaseProductProvidergetAPK in class BaseProductProviderproduct - the product informationpublic void install(ProductInformation product)
install in interface ProductProviderManager.Providerinstall in class BaseProductProviderproduct - public boolean isRemote()
ProductProviderManager.ProviderisRemote in interface ProductProviderManager.ProviderisRemote in class BaseProductProviderpublic ProductRepository parseRepo(java.lang.String repoType, java.io.File repoIndex)
parseRepo in class BaseProductProviderrepoType - The type of repo; such as remote in this caserepoIndex - The file for the repo index