-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[android] - Implements Android bindings for offline API #4085
Conversation
|
||
// Default database name and size (1GB) | ||
private final static String OFFLINE_DATABASE_NAME = "mbgl-offline.db"; | ||
private final static long OFFLINE_MAX_CACHE_SIZE = 1024 * 1024 * 1024; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: this limit is applied to non-offline resources only, i.e. resources added to the database for the "ambient use" caching functionality. There is no size limit for offline resources. So 1GB is probably too high; if a user never creates any offline regions, we want the database to remain fairly small (order tens or low hundreds of megabytes).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. Clarified and corrected with 3e4f8f7, I'm using the default value in src/mbgl/util/constants.cpp
.
Remaining tasks:
|
Handled here: ef6a8fb |
# The first commit's message is: # This is a combination of 2 commits. # The first commit's message is: # This is a combination of 3 commits. # The first commit's message is: # This is a combination of 2 commits. # The first commit's message is: # This is a combination of 21 commits. # The first commit's message is: [android] - Implements Android bindings for offline API Fixes #3891 # The 2nd commit message will be skipped: # [android] #3891 - rename OFFLINE_MAX_CACHE_SIZE to DEFAULT_MAX_CACHE_SIZE and adjust value # The 3rd commit message will be skipped: # [android] #3891 - makes de documentation more relevant to the current android implementation # The 4th commit message will be skipped: # [android] #3891 - rename isRequiredResourceCountIsIndeterminate() to isRequiredResourceCountPrecise() # The 5th commit message will be skipped: # [android] #3891 - rename complete() to isComplete() # The 6th commit message will be skipped: # [android] #3891 - rename OfflineRegionDefinition to OfflineTilePyramidRegionDefinition and make OfflineRegionDefinition an interface. Docs for corresponding classes updated. # The 7th commit message will be skipped: # [android] #3891 - make reason a more idiomatic ErrorReason Android IntDef and remove unnecessary constructor # The 8th commit message will be skipped: # [android] #3891 - reuse the calling object instead of creating a new manager # The 9th commit message will be skipped: # [android] #3891 - location, location, location # The 10th commit message will be skipped: # [android] #3891 - simpler list regions iteration # The 11th commit message will be skipped: # [android] #3891 - proper indeterminate -> precise transition # The 12th commit message will be skipped: # [android] #3891 - improve description for DEFAULT_MAX_CACHE_SIZE # The 13th commit message will be skipped: # [android] #3891 - delete global refs for obj and listCallback # The 14th commit message will be skipped: # [android] #3891 - simplify metadata conversion and fix metadata object # The 15th commit message will be skipped: # [android] - Implements Android bindings for offline API # Fixes #3891 # The 16th commit message will be skipped: # [android] #3891 - avoid exposing the int reason value in the public API # The 17th commit message will be skipped: # [android] #3891 - delete global refs for remaining callbacks and observer # The 18th commit message will be skipped: # [android] #3891 - remove unused offlineManagerClassConstructorId together with unnecessary private java constructor # The 19th commit message will be skipped: # [android] #3891 - remove non-relevant line # The 20th commit message will be skipped: # [android] #3891 - handle requiredResourceCountIsIndeterminate -> requiredResourceCountIsPrecise rename # The 21st commit message will be skipped: # [android] #3891 - revert map changes to allow rebase # The 2nd commit message will be skipped: # [android] #3891 - avoid exposing the int reason value in the public API # The 2nd commit message will be skipped: # [android] #3891 - rename complete() to isComplete() # The 3rd commit message will be skipped: # [android] #3891 - rename OfflineRegionDefinition to OfflineTilePyramidRegionDefinition and make OfflineRegionDefinition an interface. Docs for corresponding classes updated. # The 2nd commit message will be skipped: # [android] #3891 - location, location, location # The 2nd commit message will be skipped: # [android] #3891 - improve description for DEFAULT_MAX_CACHE_SIZE # The 3rd commit message will be skipped: # [android] #3891 - delete global refs for obj and listCallback # The 4th commit message will be skipped: # [android] #3891 - simplify metadata conversion and fix metadata object # The 5th commit message will be skipped: # [android] #3891 - delete global refs for remaining callbacks and observer # The 6th commit message will be skipped: # [android] #3891 - remove unused offlineManagerClassConstructorId together with unnecessary private java constructor # The 7th commit message will be skipped: # [android] #3891 - remove non-relevant line # The 8th commit message will be skipped: # [android] #3891 - handle requiredResourceCountIsIndeterminate -> requiredResourceCountIsPrecise rename
c53578f
to
01e55f1
Compare
Fixes #3891
/cc: @jfirebaugh