Closed ekigamba closed 5 years ago
BLOCKED waiting for the other PRs to be merged
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
library/src/main/java/io/ona/kujaku/downloaders/MapBoxOfflineResourcesDownloader.java | 12 | 16 | 75.0% | ||
library/src/main/java/io/ona/kujaku/services/MapboxOfflineDownloaderService.java | 0 | 4 | 0.0% | ||
sample/src/main/java/io/ona/kujaku/sample/activities/OfflineRegionsActivity.java | 0 | 15 | 0.0% | ||
<!-- | Total: | 12 | 35 | 34.29% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
library/src/main/java/io/ona/kujaku/services/MapboxOfflineDownloaderService.java | 1 | 56.9% | ||
sample/src/main/java/io/ona/kujaku/sample/activities/OfflineRegionsActivity.java | 1 | 0.0% | ||
<!-- | Total: | 2 | --> |
Totals | |
---|---|
Change from base Build 1240: | 0.1% |
Covered Lines: | 1643 |
Relevant Lines: | 4983 |
Getting very many error notification messages when wifi is turned off while downloading map.
Samsung J5 physical phone.
Looks like there are duplicated offline region details when you first open the activity after a period of online and offline wifi resumption.
Opening the offline downloads activity again will then show the correct information.
Not sure if this is an issue but the notification shows 42.29mb downloaded at 100% while the activity above shows 44.34mb?
For some reason, I can still download maps even when wifi is off, after downloading a previous map with wifi available.
When you then turn on the wifi and turn it off, it shows the error notification.
However, on wifi resumption, it takes a while for the app to resume downloading.
For some reason, I can still download maps even when wifi is off, after downloading a previous map with wifi available.
Mapbox shares resources if the two or more maps use the same resources. If you download two areas in the same area, or covering some shared area, Mapbox does not redownload such tiles, fonts or other kind of resources
When you then turn on the wifi and turn it off, it shows the error notification.
However, on wifi resumption, it takes a while for the app to resume downloading.
If it takes less than a minute or around there off, then it is OK. The download progress should be picked up as soon as the device itself establishes that it has a connection/internet connection(If I am not wrong). Longer than that would be an issue
Is it clear after how long the download resumes and does the device connect immediately and internet connectivity resume immediately
When you then turn on the wifi and turn it off, it shows the error notification.
However, on wifi resumption, it takes a while for the app to resume downloading.
If it takes less than a minute or around there off, then it is OK. The download progress should be picked up as soon as the device itself establishes that it has a connection/internet connection(If I am not wrong). Longer than that would be an issue
Is it clear after how long the download resumes and does the device connect immediately and internet connectivity resume immediately
Took about 4 min in this scenario. Internet resumes immediately.
When you then turn on the wifi and turn it off, it shows the error notification.
However, on wifi resumption, it takes a while for the app to resume downloading.
If it takes less than a minute or around there off, then it is OK. The download progress should be picked up as soon as the device itself establishes that it has a connection/internet connection(If I am not wrong). Longer than that would be an issue Is it clear after how long the download resumes and does the device connect immediately and internet connectivity resume immediately
Took about 4 min in this scenario. Internet resumes immediately.
Would it be possible to provide the specific time after which you resumed internet(So that I can test using the same time on my side)? And probably the logs if possible
When you then turn on the wifi and turn it off, it shows the error notification.
However, on wifi resumption, it takes a while for the app to resume downloading.
If it takes less than a minute or around there off, then it is OK. The download progress should be picked up as soon as the device itself establishes that it has a connection/internet connection(If I am not wrong). Longer than that would be an issue Is it clear after how long the download resumes and does the device connect immediately and internet connectivity resume immediately
Took about 4 min in this scenario. Internet resumes immediately.
Would it be possible to provide the specific time after which you resumed internet(So that I can test using the same time on my side)? And probably the logs if possible
Try 5 min.
Are there any special permissions that are not provided on your phone? This was my result after turning off the WIFI at 7:22/23 pm and resuming at 7:28. It started almost immediately. Took around 10 seconds which is justifiable
You can see that the error notification showed up at 7:22 pm and in the second screenshot, my WIFI is on and the download progress had changed
The test flow I mentioned happened after this https://github.com/onaio/kujaku/pull/273#issuecomment-470527505.
Is that what you followed?
If it's still unclear, let's take do this in-person to save on time.
The test flow I mentioned happened after this #273 (comment).
Is that what you followed?
If it's still unclear, let's take do this in-person to save on time.
Cool
Fixed the issue, the ConnectivityReceiver count was going -1 so on reactivating it would be 0 and not 1 which is the point at which the broadcast receiver is enabled
Fixes #194
To test, my guess is turning off the internet(Wifi in case it's the source) and turning it back on after 5 mins and 11-13 mins to see if the download continues. It should resume within a few seconds of connecting back.
You should also monitor the log for error-tag logs from Mapbox. The only error-tag logs from Mapbox should be after disconnecting the internet. Error-tag logs while the internet is off indicates that Mapbox is still retrying the connection
More notes are on the issue