public class ProductProviderManager
extends android.content.BroadcastReceiver
Modifier and Type | Class and Description |
---|---|
static interface |
ProductProviderManager.ProgressDialogListener |
static class |
ProductProviderManager.ProgressDialogUpdate
Container with progress update
|
static interface |
ProductProviderManager.Provider |
static interface |
ProductProviderManager.RepoSyncListener
Listener for repo sync
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PRODUCT_REPOS_REFRESHED |
static java.lang.String |
VIEW_APP_MGMT |
Constructor and Description |
---|
ProductProviderManager(android.app.Activity activity) |
Modifier and Type | Method and Description |
---|---|
void |
checkForAvailableUpdates()
See if any installed apps are out of date (have an update available)
|
void |
dispose() |
java.util.List<ProductInformation> |
getAllProducts()
Get all products from all repos
Note a given app (package name) is only included once, from the first repo it is found in
|
static java.util.List<ProductInformation> |
getAllProducts(java.util.List<ProductRepository> repos)
Get all products from all repos
Note a given app (package name) is only included once, from the first repo it is found in
|
ProductProviderManager.Provider |
getProvider(ProductInformation product)
Get the best provider for the specified product
Prefer the "parent" repo
Prefer those that have a compatible update available
Finally, take first repo that contains this package
|
ProductProviderManager.Provider |
getProvider(java.lang.String pkg)
Get the provider for the specified product
|
java.util.List<ProductProviderManager.Provider> |
getProviders() |
void |
init()
Always check providers for updates if the ATAK version code has changed
Also check during startup based on user pref
|
void |
onReceive(android.content.Context context,
android.content.Intent intent) |
void |
sync(boolean bSilent,
boolean bCheckForIncompat) |
void |
sync(android.content.Context uiContext,
boolean bSilent,
ProductProviderManager.RepoSyncListener l) |
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
public static final java.lang.String PRODUCT_REPOS_REFRESHED
public static final java.lang.String VIEW_APP_MGMT
public ProductProviderManager(android.app.Activity activity)
public void dispose()
public java.util.List<ProductProviderManager.Provider> getProviders()
public ProductProviderManager.Provider getProvider(ProductInformation product)
product
- the product information to turn into a providerpublic ProductProviderManager.Provider getProvider(java.lang.String pkg)
pkg
- public java.util.List<ProductInformation> getAllProducts()
public static java.util.List<ProductInformation> getAllProducts(java.util.List<ProductRepository> repos)
public void init()
public void checkForAvailableUpdates()
public void onReceive(android.content.Context context, android.content.Intent intent)
onReceive
in class android.content.BroadcastReceiver
public void sync(boolean bSilent, boolean bCheckForIncompat)
public void sync(android.content.Context uiContext, boolean bSilent, ProductProviderManager.RepoSyncListener l)