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 committed by maskara
parent 050d878edd
commit bbe58f003f
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);
lastGeneratedCaptureUri = reGenerateImageCaptureUriInCache();

View file

@ -401,7 +401,11 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
distance.setText(place.distance.toString());
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 -> {