google-research / CVD-paper-mobile-camera-example

Apache License 2.0
33 stars 7 forks source link

With no local.properties file, capturing does not work as intended #77

Closed MJ1998 closed 6 months ago

MJ1998 commented 7 months ago

After PR #61, the application does not crash with no local.properties however on trying to capture videos/ images the thumbnails do not show on screen. PS: They do get captured but the capture event is not relayed back to application and hence no thumbnail.

MJ1998 commented 7 months ago

This is being caused in the following manner:-

  1. No local.properties file leading to SensingEngineConfiguration.serverConfiguration being null
  2. When capture is complete and SensingEngine#onCaptureCompleteCallback is invoked, the code block serverConfiguration?.let {} does not run.
  3. This leads to 2 events (ResourceInfoCreated, ResourcesStored) being emitted one after the other with no delay at all.
  4. The CaptureViewModel.captureResultLiveData updates the application back with only ResourcesStored event
  5. Since application listens only on ResourceInfoCreated the thumbnail is not added.

This will get fixed automatically when implementing for Sensing1.0. Leaving this issue in case someone comes across this issue later and for myself so that I don't go again debugging the reason.

MJ1998 commented 6 months ago

Closing this as this is not a problem anymore.