Closed hallahan closed 8 years ago
We're getting cards in a recycle view showing the name and description of deployments coming from a real-live OpenMapKit Server deployments API.
Don't worry about the email fab on the bottom. It's a stub in case we want to have a button there.
Basic UI for Deployment Details
@hallahan these look great. I do especially like the download button on the bottom to download everything.
We're mostly there. I need to keep track of deployments that have been already downloaded so that the UI doesn't suggest downloading it again. Also, we need to show deployments that have completed the downloads in the UI when the device is offline so that the user can check them out.
At this point, I'm showing in the Deployments recycler view the deployments saved to external storage, and then the deployments show from the API.
I'm going to revamp the Deployments
class to have a List
and a HashMap
referencing Deployment objects. When we get a deployment from the API that collides with the name of a deployment from disk, we are going to PUT
overwrite what came from disk so that we have new info about it.
Internally we're going to reference the constructed Deployment
object instead of a JSONObject
, and this is cleaner. (The JSONObject is still in there, and is a member of Deployment
)
Also, we're going to have a persisted
boolean in a Deployment
to show that it came from ExternalStorage
. We'll have an api
boolean if it came from OMK Server.
When I have all of this in there, then we can make a method in Deployment
to check to see if the deployment being described by the API has been updated, based on file names and sizes.
Showing offline deployments has gone smoothly. Next step is to have DeploymentDetails show the right state of the download when the activity is reloaded. I'm going to verify state of a download by looking at the file system and compare with what is stated in the deployment.json
.
For all intensive purposes, we've got full deployment functionality working now. I'm going to pull into master where I'm at. I think we should leave this issue open, because there's a few bugs hanging out there like:
DeploymentsActivity
hangs, since that also needs an AsyncTask
. I need a bigger limit on the thread pool.DeploymentDetails
activity. #138I'm considering 1. and 2. edge cases. Let's file new issues if they come into play. Just completed 3. #138
We need an activity with a RecyclerView that lists all of the available deployments from the server. This activity will have Material Design CardViews inside of a RecyclerView.
Clicking on a card will give you details and actions to retrieve a given deployment. Each card will have a progress bar showing the state of a download.