ParkSangGwon / TedBottomPicker

TedBottomPicker is simple image picker using bottom sheet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Camera Option is not working

veeranath opened this issue · comments

Hi... i am getting by this exception Attempt to read from field 'int gun0912.tedbottompicker.TedBottomPicker$Builder.peekHeight' on a null object reference when i select the camera option in the Android 6.0.1 Asus Zenfone 2 laser and also using i the portrait mode

@veeranath Can you show me your code?

Same here. Looks like builder is null on setupDialog method. Here is the stacktrace output.

Attempt to read from field 'int gun0912.tedbottompicker.TedBottomPicker$Builder.peekHeight' on a null object reference

Here is my code. I need an urgent solution. Thanks.

 TedBottomPicker bottomSheetDialogFragment = new TedBottomPicker.Builder(AddNoteActivity.this)
                                .setOnImageSelectedListener(uri -> viewModel.startCropActivity(uri))
                                .setPeekHeight(getResources().getDisplayMetrics().heightPixels / 2)
                                .create();
                        bottomSheetDialogFragment.show(getSupportFragmentManager());

@ParkSangGwon It is crashing only some 4.4 samsung devices. Do you have any solution about that problem?

@veeranath @iammert Did you test sample project?
Download TedBottomPickerDemoand test.
And tell me sample is ok or not

I did not test it actually. But my project is integrated with fabric. So I can not reproduce that error in my devices but that error occurs on some of my users.

@iammert Now I add code null check. You can use this code at v1.0.11