Skip to content

Can't get version 2.2.1 to work from Android Java project #62

@AZOM

Description

@AZOM

I've upgraded my project to use AndroidX and RxImagePicker 2.2.1, which broke my code:

@Override
public void onPhotoReadyAction(final Sources pickerSource, final int imageTargetId) {
    Log.d(TAG, String.format("onPhotoReadyAction() --> requestImage() for sources: %s and imageTargetId: %d", pickerSource, imageTargetId));
    photoConverterDisposable = RxImagePicker.Companion.with(activity.getSupportFragmentManager()).requestImage(pickerSource)
            .flatMap((Function<Uri, ObservableSource<Base64Wrapper>>) uri -> ImageConverter.uriToBase64(activity, uri))
            .subscribe(base64Wrapper -> {
                Log.i(TAG, "onPhotoReadyAction() --> requestImage() DONE --> setPhoto() for base64Wrapper: " + base64Wrapper);
                setPhoto(imageTargetId, base64Wrapper);
            });
    activeRequests.add(photoConverterDisposable);
}

My code breaks on the line RxImagePicker.with(activity.getSupportFragmentManager()).requestImage(pickerSource)

with the error: "Cannot resolve method 'with(androidx.fragment.app.FragmentManager)"

Please help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions