public abstract class NetworkLinkDownloader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected android.content.Context |
_context |
protected java.util.Set<java.lang.String> |
_downloading |
protected NetworkLinkRefresh |
_refresher |
Modifier | Constructor and Description |
---|---|
protected |
NetworkLinkDownloader(android.content.Context appCtx,
int baseNotificationId) |
Modifier and Type | Method and Description |
---|---|
void |
addRefreshLink(RemoteResource res)
Add a link to the refresher
|
void |
download(RemoteResource resource) |
abstract void |
download(RemoteResource resource,
boolean showNotifications)
Begin downloading a remote resource
|
android.content.Context |
getContext() |
NetworkLinkRefresh |
getLinkRefresh()
Keep for legacy behavior.
|
int |
getNotificationId() |
protected java.lang.String |
getString(int strId,
java.lang.Object... args) |
boolean |
isDownloading(java.lang.String url) |
protected boolean |
isErrorNotification(int iconId) |
protected void |
postNotification(int notifyId,
int icon,
int title,
int msg) |
protected void |
postNotification(int notifyId,
int icon,
java.lang.String title,
java.lang.String msg) |
protected void |
postNotification(com.atakmap.android.importfiles.http.RemoteResourceRequest req,
int icon,
java.lang.String title,
java.lang.String msg) |
protected void |
postNotification(com.atakmap.android.importfiles.http.RemoteResourcesRequest req,
int icon,
java.lang.String title,
java.lang.String msg) |
void |
removeRefreshLink(RemoteResource res) |
void |
shutdown() |
protected final android.content.Context _context
protected final java.util.Set<java.lang.String> _downloading
protected final NetworkLinkRefresh _refresher
protected NetworkLinkDownloader(android.content.Context appCtx, int baseNotificationId)
public android.content.Context getContext()
public NetworkLinkRefresh getLinkRefresh()
public int getNotificationId()
public void addRefreshLink(RemoteResource res)
res
- Remote resourcepublic void removeRefreshLink(RemoteResource res)
public boolean isDownloading(java.lang.String url)
public abstract void download(RemoteResource resource, boolean showNotifications)
resource
- Remote resourceshowNotifications
- True to show notifications during DL/importpublic void download(RemoteResource resource)
public void shutdown()
protected void postNotification(int notifyId, int icon, java.lang.String title, java.lang.String msg)
protected void postNotification(int notifyId, int icon, int title, int msg)
protected void postNotification(com.atakmap.android.importfiles.http.RemoteResourcesRequest req, int icon, java.lang.String title, java.lang.String msg)
protected void postNotification(com.atakmap.android.importfiles.http.RemoteResourceRequest req, int icon, java.lang.String title, java.lang.String msg)
protected java.lang.String getString(int strId, java.lang.Object... args)
protected boolean isErrorNotification(int iconId)