AguaClara / post.dose-DEPRECATED

Providing a coagulant dosage recomendation to ODK
0 stars 0 forks source link

Different ways to update the stored model #1

Closed asm278 closed 7 years ago

asm278 commented 7 years ago

@ethan92429 gave feedback that there is no internet access when operators fill out ODK forms. Therefore, the background model updating may never be successful.

Currently, this can be handled by this app, as operators can upload the filled forms, then open POST dose and press the button to get new model parameters.

However we want to mitigate this extra step for the operators.

One approach is to edit the source of ODK to send a broadcast intent to all other apps on the device that can notify them that there is a connection. Then this app can receive that intent and use that as a cause to update the model. Pros: This allows future apps that we develop to respond to this broadcast intent to upload or download information i.e logs. Cons: Operators would have to switch from using the released ODK collect app to a new POST collect app.

eak24 commented 7 years ago

@asm278 I am a proponent of modifying the ODK source code. I made a fork that's called post.collect (in this org.) Also, your idea of using a broadcast intent is spot on. I think what you have written as a con is actually a pro, because it means that in the future we'll have more control over that app, meaning we can push other things that are built right into the app. Eventually, I believe we should make this all one, maybe two (collect and graficos) apps. It's very important to make POST as easy to operate as possible especially because I'll be talking to the regulatory agency here about adopting it soon. Thanks @asm278! What are your thoughts on this approach? Are you excited about digging into the source code? It is kindof a bear...

asm278 commented 7 years ago

Didn't auto link this with this commit, solves this. It was pretty straightforward, should I merge into master?

Also using commit in this repo I catch the broadcast message.

I should refactor to make updating the model a separate activity from responding with dosage recommendation.

eak24 commented 7 years ago

Also, Google Play store won't accept this fork with the same package name as ODK's version. I just pushed a commit that changes the file structure and the package name. once you're done with this, you can try pushing both your dosing app and the collect fork to the google play store.

asm278 commented 7 years ago

@ethan92429 Both apps are Ready To Publish on the Play store. Their APKs can be directly downloaded from the developers console. I'd appreciate it if you can look at their descriptions and embellish them where applicable before releasing to the store.