Make controller method public and add call to initiateCameraUpload() in NearbyMapFragment

This commit is contained in:
misaochan 2018-01-11 18:41:03 +10:00
parent f38d885a78
commit 17e2c9baf3
2 changed files with 6 additions and 2 deletions

View file

@ -61,7 +61,7 @@ public class ContributionController {
} }
} }
void startCameraCapture() { public void startCameraCapture() {
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
lastGeneratedCaptureUri = reGenerateImageCaptureUriInCache(); lastGeneratedCaptureUri = reGenerateImageCaptureUriInCache();

View file

@ -398,7 +398,11 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
distance.setText(place.distance.toString()); distance.setText(place.distance.toString());
fabCamera.setOnClickListener(view -> { fabCamera.setOnClickListener(view -> {
//TODO: Implement camera button Timber.d("Image title: " + place.getName() + "Image desc: " + place.getLongDescription());
controller = new ContributionController(this);
DirectUpload directUpload = new DirectUpload(place.getName(), place.getLongDescription(), this, controller);
directUpload.storeSharedPrefs();
directUpload.initiateCameraUpload();
}); });
fabGallery.setOnClickListener(view -> { fabGallery.setOnClickListener(view -> {