Giter Site home page Giter Site logo

bsimagepicker's Introduction

BSImagePicker

BS stands for BottomSheet.

Single Selection Demo     Multi Selection Demo

Deprecated (Since April 2021)

I am not maintaining this library anymore, let me explain why.

Some of the assumptions I made when building this library, I now consider them wrong or invalid. For example, showing camera tile on multiple selection has been a valid and common use case but not supported; it is also common for apps to implement their own permission control UI as well so dedicating it to the library was actually a bad idea.

Besides, this repository has successfully gain the attention of the author of TedBottomPicker, which was the reference of this library and improving it was the reason why I tried to make this one. I find that the author has continuous updates and may be he has solved some problems I mentioned in the past.

So, instead of contributing to this library, may be submitting pull requests there or even forking from it will be a better choice.

Why this library?

When your app needs user to pick one or more images from their device, it is still quite painful in Android.
Without any customization, you first need to ask user whether he/she wants to take a picture using camera, or select one from a Gallery app.
Then you have to write quite some code to launch a Camera intent.
Not to mention that you cannot even let user select multiple images.

So an image picker that solve all these pains is almost present in every app.
And this library does the below:

  1. Without the need to ask user whether to take photo or select from gallery, these options are all in one dialog;
  2. Works for both single and multiple selections;
  3. Handle asking permissions for you;
  4. You just need to show this dialog, and register callbacks that give you a Uri or List<Uri>.

The UI design of this library is referenced from TedBottomPicker.
I like the design of his library! And in fact I have used his library in 2 production apps already.
But there are still some defects that annoyed me:

  1. You need to handle permissions by yourself; but as a Fragment, it is a perfect place to handle by itself;
  2. I don't like the design of his multiple selection mode;
  3. He query media files on the Main Thread. If you query all images in the device, that will absolutely block your app's response! I implemented using CursorLoader instead;
  4. He does not handle fragment lifecycle correctly. Quite some number of crashes due to referencing a null Context has been reported from my production apps, and his library cannot survive configuration change (e.g. device rotation);
  5. He hard-coded to use his own FileProvider, which will crash if your app has your own FileProvider.

But note that BSImagePicker does not allow selection from camera and gallery when in multi selection mode, which is possible in TedBottomPicker, due to the difference in UI/UX.
Also, a recent release of TedBottomPicker also supports selecting vidoes. This is not supported by BSImagePicker as well.

How to Use

Minimum SDK: 16

Add to Project

First make sure jcenter() is included as a repository in your project's build.gradle:

allprojects {
    repositories {
        jcenter()
    }
}

And then add the below to your app's build.gradle:

Download

    implementation 'com.asksira.android:bsimagepicker:{refer to the version badge above}}'

You also need to make sure you have included 'com.android.support:support-v4:{supportLibraryVersion} in your dependencies.

Step 1: Create your own FileProvider

Just follow the guide from Official Android Document.

Step 2: Create a BSImagePicker using a builder

After you have defined your own FileProvider, pass the authority String to the constructor of BSImagePicker.Builder.

The below code snippet also shows all configurables, with some description.

Single Selection:

       BSImagePicker singleSelectionPicker = new BSImagePicker.Builder("com.yourdomain.yourpackage.fileprovider")
               .setMaximumDisplayingImages(24) //Default: Integer.MAX_VALUE. Don't worry about performance :)
               .setSpanCount(3) //Default: 3. This is the number of columns
               .setGridSpacing(Utils.dp2px(2)) //Default: 2dp. Remember to pass in a value in pixel.
               .setPeekHeight(Utils.dp2px(360)) //Default: 360dp. This is the initial height of the dialog.
               .hideCameraTile() //Default: show. Set this if you don't want user to take photo.
               .hideGalleryTile() //Default: show. Set this if you don't want to further let user select from a gallery app. In such case, I suggest you to set maximum displaying images to Integer.MAX_VALUE.
               .setTag("A request ID") //Default: null. Set this if you need to identify which picker is calling back your fragment / activity.
               .dismissOnSelect(true) //Default: true. Set this if you do not want the picker to dismiss right after selection. But then you will have to dismiss by yourself.
               .useFrontCamera(true) //Default: false. Launching camera by intent has no reliable way to open front camera so this does not always work.
               .build();

Multiple Selection:

       BSImagePicker multiSelectionPicker = new BSImagePicker.Builder("com.yourdomain.yourpackage.fileprovider")
               .isMultiSelect() //Set this if you want to use multi selection mode.
               .setMinimumMultiSelectCount(3) //Default: 1.
               .setMaximumMultiSelectCount(6) //Default: Integer.MAX_VALUE (i.e. User can select as many images as he/she wants)
               .setMultiSelectBarBgColor(android.R.color.white) //Default: #FFFFFF. You can also set it to a translucent color.
               .setMultiSelectTextColor(R.color.primary_text) //Default: #212121(Dark grey). This is the message in the multi-select bottom bar.
               .setMultiSelectDoneTextColor(R.color.colorAccent) //Default: #388e3c(Green). This is the color of the "Done" TextView.
               .setOverSelectTextColor(R.color.error_text) //Default: #b71c1c. This is the color of the message shown when user tries to select more than maximum select count.
               .disableOverSelectionMessage() //You can also decide not to show this over select message.
               .build();

Step 3: Register callbacks

In order to survive configuration change, I cannot let you simply pass an anonymous interface to the builder. That callback will become null when device orientation changes.
So, your caller Activity or Fragment must implements OnSingleImageSelectedListener or OnMultiImageSelectedListener.

public class MainActivity extends AppCompatActivity implements BSImagePicker.OnSingleImageSelectedListener,
        BSImagePicker.OnMultiImageSelectedListener,
        BSImagePicker.ImageLoaderDelegate,
        BSImagePicker.OnSelectImageCancelledListener {

    //...

    @Override
    public void onSingleImageSelected(Uri uri, String tag) {
        //Do something with your Uri
    }

    @Override
    public void onMultiImageSelected(List<Uri> uriList, String tag) {
        //Do something with your Uri list
    }

    @Override
    public void loadImage(File imageFile, ImageView ivImage) {
        //Glide is just an example. You can use any image loading library you want;
        //This callback is to make sure the library has the flexibility to allow user to choose their own image loading method.
        Glide.with(MainActivity.this).load(imageFile).into(ivImage);
    }

    //Optional
    @Override
    public void onCancelled(boolean isMultiSelecting, String tag) {
        //Do whatever you want when user cancelled
    }
}

You can set a tag in the picker's builder. This is useful when you need to show more than 1 picker in the same page, so that you have a way to distinguish which one is calling back to your Activity / Fragment.

Step 4: Show the picker, which is essentially just a DialogFragment

If you called from an Activity:

       //pickerDialog is the one your created in Step 2
       pickerDialog.show(getSupportFragmentManager(), "picker");

If you called from a Fragment:

       //pickerDialog is the one your created in Step 2
       pickerDialog.show(getChildFragmentManager(), "picker");

Android Q Scoped Storage issue

If you target Android SDK Version 29 or higher, you will encounter the problem brought by scoped storage.
This library assumes you will just add android:requestLegacyExternalStorage="true" to your <application> tag in AndroidManifest.xml.

If you want to stick with the scoped storage approach, i.e. do not want to add that legacy attribute, you can consider forking the library and change the code yourself.
Or I would appreciate your help by suggesting in issue #33.

Customization of layouts

You can easily customize various layouts and string resources by simply overriding the original resource I defined in the library.

Customize layout of camera tile or gallery tile

Define your own R.layout.item_picker_camera_tile.xml or R.layout.item_picker_gallery_tile.xml. But make sure the root ViewGroup is a FitWidthRelativeLayout with app:view_aspectRatio="1".
You do not need to specify any View id.

Customize String resources of the bottom bar of multi-selection

Define below String resources with the same ID in your own app:

    <string name="imagepicker_multiselect_done">Done</string>
    <string name="imagepicker_multiselect_not_enough_singular">You have to select 1 more image</string>
    <string name="imagepicker_multiselect_not_enough_plural">You have to select %d more images</string>
    <string name="imagepicker_multiselect_enough_singular">You have selected 1 image</string>
    <string name="imagepicker_multiselect_enough_plural">You have selected %d images</string>
    <string name="imagepicker_multiselect_overselect">You cannot select more than %d images</string>
    <string name="imagepicker_no_image_text_view">There are no image in your device.</string>

IMPORTANT: Your string resources must match the number of replaceables (%d) with the original resources above.

You ask why don't I use plurals? See this post.

Limitations

  1. You cannot filter the images showing in the picker, e.g. From only a specific folder.
  2. Since the customization of layouts are done by resource overriding, it is impossible to set different style for different pickers in the same app. I consider this as an edge case.

Release notes

v1.3.2

  • Added cancel callback
  • Added front facing camera option, but it is just a hack so does not always work.

v1.3.0

  • Changed support libraries to AndroidX

v1.2.2

  • Fixed issue #32 because the imageLoaderDelegate is passed to the adapter before assigning nor throwing exceptions

v.1.2.1

  • Caller Activity or Fragment now needs to implement ImageLoaderDelegate and provides its own way to load the image file into the file ImageView. This allows user to use any image loading library they want instead of binding to Glide v4.

v1.1.0

  • Picker now supports a tag (String) as an identifier, so that you can identify which picker calls back your fragment / activity. This is useful if you need to launch more than 1 picker in the same fragment / activity. (Solves #3)
  • Picker now displays a TextView if there is nothing to show, instead of just dimming the screen. (Solves #9)
  • You can now decide whether to dismiss the picker after a selection. (Solves #6)

v1.0.1 First Release.

License

Copyright 2018 Sira Lam

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

bsimagepicker's People

Contributors

ikakus avatar siralam avatar sirawiz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bsimagepicker's Issues

Background sticky concurrent mark sweep

Application Freeze when open camera and backpressed button.

HTC Desire 626
Android: 5.1
RAM: 1 GB
Disk: 8 GB

I/Glide: Root cause (1 of 3)
java.io.IOException: File unsuitable for memory mapping
at com.bumptech.glide.util.ByteBufferUtil.fromFile(ByteBufferUtil.java:40)
at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:65)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:269)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
I/Glide: Root cause (2 of 3)
java.io.IOException: java.lang.RuntimeException: setDataSource failed: status = 0xFFFFFFEA
at com.bumptech.glide.load.resource.bitmap.VideoDecoder.decode(VideoDecoder.java:160)
at com.bumptech.glide.load.engine.DecodePath.decodeResourceWithList(DecodePath.java:72)
at com.bumptech.glide.load.engine.DecodePath.decodeResource(DecodePath.java:55)
at com.bumptech.glide.load.engine.DecodePath.decode(DecodePath.java:45)
at com.bumptech.glide.load.engine.LoadPath.loadWithExceptionList(LoadPath.java:58)
at com.bumptech.glide.load.engine.LoadPath.load(LoadPath.java:43)
at com.bumptech.glide.load.engine.DecodeJob.runLoadPath(DecodeJob.java:498)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher(DecodeJob.java:469)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromData(DecodeJob.java:455)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:407)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:376)
at com.bumptech.glide.load.engine.SourceGenerator.onDataReady(SourceGenerator.java:112)
at com.bumptech.glide.load.model.FileLoader$FileFetcher.loadData(FileLoader.java:76)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:415)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:376)
at com.bumptech.glide.load.engine.SourceGenerator.onDataReady(SourceGenerator.java:112)
at com.bumptech.glide.load.model.FileLoader$FileFetcher.loadData(FileLoader.java:76)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherFailed(DecodeJob.java:394)
at com.bumptech.glide.load.engine.SourceGenerator.onLoadFailed(SourceGenerator.java:119)
at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:70)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:269)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
Caused by: java.lang.RuntimeException: setDataSource failed: status = 0xFFFFFFEA
at android.media.MediaMetadataRetriever.setDataSource(Native Method)
at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:221)
at com.bumptech.glide.load.resource.bitmap.VideoDecoder$ParcelFileDescriptorInitializer.initialize(VideoDecoder.java:219)
at com.bumptech.glide.load.resource.bitmap.VideoDecoder$ParcelFileDescriptorInitializer.initialize(VideoDecoder.java:214)
at com.bumptech.glide.load.resource.bitmap.VideoDecoder.decode(VideoDecoder.java:155)
at com.bumptech.glide.load.engine.DecodePath.decodeResourceWithList(DecodePath.java:72) 
at com.bumptech.glide.load.engine.DecodePath.decodeResource(DecodePath.java:55) 
at com.bumptech.glide.load.engine.DecodePath.decode(DecodePath.java:45) 
at com.bumptech.glide.load.engine.LoadPath.loadWithExceptionList(LoadPath.java:58) 
at com.bumptech.glide.load.engine.LoadPath.load(LoadPath.java:43) 
at com.bumptech.glide.load.engine.DecodeJob.runLoadPath(DecodeJob.java:498) 
at com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher(DecodeJob.java:469) 
at com.bumptech.glide.load.engine.DecodeJob.decodeFromData(DecodeJob.java:455) 
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:407) 
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:376) 
at com.bumptech.glide.load.engine.SourceGenerator.onDataReady(SourceGenerator.java:112) 
at com.bumptech.glide.load.model.FileLoader$FileFetcher.loadData(FileLoader.java:76) 
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62) 
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299) 
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:415) 
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:376) 
at com.bumptech.glide.load.engine.SourceGenerator.onDataReady(SourceGenerator.java:112) 
at com.bumptech.glide.load.model.FileLoader$FileFetcher.loadData(FileLoader.java:76) 
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62) 
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299) 
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherFailed(DecodeJob.java:394) 
at com.bumptech.glide.load.engine.SourceGenerator.onLoadFailed(SourceGenerator.java:119) 
at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:70) 
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62) 
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299) 
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:269) 
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:230) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
at java.lang.Thread.run(Thread.java:818) 
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446) 
I/Glide: Root cause (3 of 3)
java.io.IOException: java.lang.RuntimeException: setDataSource failed: status = 0xFFFFFFEA
at com.bumptech.glide.load.resource.bitmap.VideoDecoder.decode(VideoDecoder.java:160)
at com.bumptech.glide.load.resource.bitmap.BitmapDrawableDecoder.decode(BitmapDrawableDecoder.java:58)
at com.bumptech.glide.load.engine.DecodePath.decodeResourceWithList(DecodePath.java:72)
at com.bumptech.glide.load.engine.DecodePath.decodeResource(DecodePath.java:55)
at com.bumptech.glide.load.engine.DecodePath.decode(DecodePath.java:45)
at com.bumptech.glide.load.engine.LoadPath.loadWithExceptionList(LoadPath.java:58)
at com.bumptech.glide.load.engine.LoadPath.load(LoadPath.java:43)
at com.bumptech.glide.load.engine.DecodeJob.runLoadPath(DecodeJob.java:498)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher(DecodeJob.java:469)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromData(DecodeJob.java:455)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:407)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:376)
at com.bumptech.glide.load.engine.SourceGenerator.onDataReady(SourceGenerator.java:112)
at com.bumptech.glide.load.model.FileLoader$FileFetcher.loadData(FileLoader.java:76)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:415)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:376)
at com.bumptech.glide.load.engine.SourceGenerator.onDataReady(SourceGenerator.java:112)
at com.bumptech.glide.load.model.FileLoader$FileFetcher.loadData(FileLoader.java:76)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherFailed(DecodeJob.java:394)
at com.bumptech.glide.load.engine.SourceGenerator.onLoadFailed(SourceGenerator.java:119)
at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:70)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:269)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
Caused by: java.lang.RuntimeException: setDataSource failed: status = 0xFFFFFFEA
at android.media.MediaMetadataRetriever.setDataSource(Native Method)
at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:221)
at com.bumptech.glide.load.resource.bitmap.VideoDecoder$ParcelFileDescriptorInitializer.initialize(VideoDecoder.java:219)
at com.bumptech.glide.load.resource.bitmap.VideoDecoder$ParcelFileDescriptorInitializer.initialize(VideoDecoder.java:214)
at com.bumptech.glide.load.resource.bitmap.VideoDecoder.decode(VideoDecoder.java:155)
at com.bumptech.glide.load.resource.bitmap.BitmapDrawableDecoder.decode(BitmapDrawableDecoder.java:58) 
at com.bumptech.glide.load.engine.DecodePath.decodeResourceWithList(DecodePath.java:72) 
at com.bumptech.glide.load.engine.DecodePath.decodeResource(DecodePath.java:55) 
at com.bumptech.glide.load.engine.DecodePath.decode(DecodePath.java:45) 
at com.bumptech.glide.load.engine.LoadPath.loadWithExceptionList(LoadPath.java:58) 
at com.bumptech.glide.load.engine.LoadPath.load(LoadPath.java:43) 
at com.bumptech.glide.load.engine.DecodeJob.runLoadPath(DecodeJob.java:498) 
at com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher(DecodeJob.java:469) 
at com.bumptech.glide.load.engine.DecodeJob.decodeFromData(DecodeJob.java:455) 
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:407) 
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:376) 
at com.bumptech.glide.load.engine.SourceGenerator.onDataReady(SourceGenerator.java:112) 
at com.bumptech.glide.load.model.FileLoader$FileFetcher.loadData(FileLoader.java:76) 
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62) 
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299) 
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:415) 
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:376) 
at com.bumptech.glide.load.engine.SourceGenerator.onDataReady(SourceGenerator.java:112) 
at com.bumptech.glide.load.model.FileLoader$FileFetcher.loadData(FileLoader.java:76) 
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62) 
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299) 
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherFailed(DecodeJob.java:394) 
at com.bumptech.glide.load.engine.SourceGenerator.onLoadFailed(SourceGenerator.java:119) 
at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:70) 
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62) 
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299) 
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:269) 
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:230) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
at java.lang.Thread.run(Thread.java:818) 
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446) 
D/skia: image header:[0 0 0 0 0 0 0 0], stream len = 0, read byte count = 8, valid byte count = 0, []
--- SkImageDecoder::Factory returned null
image header:[0 0 0 0 0 0 0 0], stream len = 0, read byte count = 8, valid byte count = 0, []
--- SkImageDecoder::Factory returned null
image header:[0 0 0 0 0 0 0 0], stream len = 0, read byte count = 8, valid byte count = 0, []
--- SkImageDecoder::Factory returned null
image header:[0 0 0 0 0 0 0 0], stream len = 0, read byte count = 8, valid byte count = 0, []
--- SkImageDecoder::Factory returned null

W/art: Suspending all threads took: 6.820ms
I/art: Background sticky concurrent mark sweep GC freed 657(3MB) AllocSpace objects, 93(3MB) LOS objects, 23% free, 21MB/27MB, paused 29.079ms total 92.402ms
W/art: Suspending all threads took: 6.656ms
I/art: Background sticky concurrent mark sweep GC freed 629(3MB) AllocSpace objects, 89(2MB) LOS objects, 22% free, 21MB/27MB, paused 29.433ms total 99.488ms
W/art: Suspending all threads took: 6.659ms
I/art: Background sticky concurrent mark sweep GC freed 601(3MB) AllocSpace objects, 85(2MB) LOS objects, 22% free, 21MB/27MB, paused 29.654ms total 92.221ms
W/art: Suspending all threads took: 6.656ms

.show()

Hello,

I have implemented everything as you wanted but I still have a problem with this -> pickerDialog.show(getSupportFragmentManager(), "picker");

there is apparently no show attributes in your BSImagePicker.

Thank you for your time !

Arthur

Library not working on Android Q (API 29)

There is an issue with permissions because of Scoped Storage and it's giving this stacktrace:

java.io.FileNotFoundException: /storage/emulated/0/DCIM/Camera/IMG_20190606_105527.jpg: open failed: EACCES (Permission denied) at libcore.io.IoBridge.open(IoBridge.java:496) at java.io.RandomAccessFile.<init>(RandomAccessFile.java:289) at com.bumptech.glide.util.ByteBufferUtil.fromFile(ByteBufferUtil.java:43) at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:65) at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62) at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:302) at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:272) at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:233) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919) at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446) Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied) at libcore.io.Linux.open(Native Method) at libcore.io.ForwardingOs.open(ForwardingOs.java:167) at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252) at libcore.io.ForwardingOs.open(ForwardingOs.java:167) at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7218) at libcore.io.IoBridge.open(IoBridge.java:482) at java.io.RandomAccessFile.<init>(RandomAccessFile.java:289)  at com.bumptech.glide.util.ByteBufferUtil.fromFile(ByteBufferUtil.java:43)  at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:65)  at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)  at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:302)  at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:272)  at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:233)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)  at java.lang.Thread.run(Thread.java:919)  at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446) 

Tested on Android Studio 3.5 Beta 3 with Pixel 3 API 29 emulator. To test it you need to set compileSdkVersion and targetSdkVersion to 29.

launchCamera error

Fatal Exception: java.lang.NullPointerException
Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference

I invoke it within my fragment, not activity.

** Not working with Android X **

Couldn't find meta-data for provider with authority packagename.fileprovider
at androidx.core.content.FileProvider.parsePathStrategy

Preview not working

I am using androidx instead of support and i think this makes library preview stop from working


        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="com.behkameh.daggersample.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths" />
        </provider>

Screen Shot 2019-07-01 at 11 25 56 AM

Cannot open camera if minSdkVersion = 21

Description

Not able to open camera (nothing happens and no errors in logs)
My project:

compileSdkVersion = 28
minSdkVersion = 21
targetSdkVersion = 28

library version:
implementation 'com.asksira.android:bsimagepicker:1.1.0'
tested on emulator with API lvl 23 25 28
and real device API 28.

During debug i found that

public static boolean isWriteStorageGranted (Context context) {

always returning false. Even after i granted WRITE_EXTERNAL_STORAGE permission.
Unfortunately, this check is mandatory to open camera.

According to official documentation

Beginning with Android 4.4 (API level 19), reading or writing files in your app's private external storage directory—accessed using getExternalFilesDir()—does not require the READ_EXTERNAL_STORAGE or WRITE_EXTERNAL_STORAGE permissions.

This leads to described behaviuor i my project with minSdkVersion = 21:
ContextCompat.checkSelfPermission(context, Manifest.permission.WRITE_EXTERNAL_STORAGE) always returns -1 even after i explicitly granted permission -> camera cannot be opened.

File not Found

uriList.path is returning wrong path something like this " content://media/external/images/media/172775" and returning error statement as "open failed: ENOENT (No such file or directory)".

Samsung S8 - Unable to resolve image path

Hi @siralam,

I'm using your plugin for an application that should support users to take picture and upload them to a server.
Your plugin tool works great - but i have noticed a few small 'compatibility' issues when i comes to selecting images from the gallery on certain devices.

We develop on a number of devices, but Samsung generally seems to show the most amount of issues when it comes to working with the camera / gallery in general.
The picker works fine on one of our Samsung devices (SM-G360F), but has issues on one of our later devices: Samsung Galaxy A5 (2017).
The issues tends to be that it can't resolve the path of the selected image. Do you have any suggestion on how to fix this ?

I can send you more details about replicating the issue if you like, as well as some detailed error logging if that helps ?

I look forward to hearing from you.

Liam

Handling an exception when user does not have any images in the device

For now, in case mentioned in the title, screens goes dark (fragment dialog launches) but it has nothing to show. How about displaying some kind of message in the picker in that case? Or displaing a Toast?

I know this issue occurs very rarely but still it is worth investigating.

Glide does not show images on Android Q

Hi,

so far everything worked perfect for me with your library.
I only struggle with Android Q.
It does not show the images on api 29.

Your sample project does show the images but when i am using your library it doesn't show on api 29. It works only below api29.

Here is the Logcat:
I/Glide: Root cause (3 of 3)
java.io.FileNotFoundException: open failed: EACCES (Permission denied)
at android.os.ParcelFileDescriptor.openInternal(ParcelFileDescriptor.java:315)
at android.os.ParcelFileDescriptor.open(ParcelFileDescriptor.java:220)
at com.bumptech.glide.load.model.FileLoader$FileDescriptorFactory$1.open(FileLoader.java:164)
at com.bumptech.glide.load.model.FileLoader$FileDescriptorFactory$1.open(FileLoader.java:161)
at com.bumptech.glide.load.model.FileLoader$FileFetcher.loadData(FileLoader.java:68)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:309)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherFailed(DecodeJob.java:405)
at com.bumptech.glide.load.engine.SourceGenerator.onLoadFailed(SourceGenerator.java:119)
at com.bumptech.glide.load.model.FileLoader$FileFetcher.loadData(FileLoader.java:73)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:309)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherFailed(DecodeJob.java:405)
at com.bumptech.glide.load.engine.SourceGenerator.onLoadFailed(SourceGenerator.java:119)
at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:70)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:309)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:279)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:235)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)

Of course i gave permission to the app and checked that again in my settings.

Do you have any idea why?

Thank you.

Bottombar Done TextView set enable

Hi!

How can I set Enabled the Done textView in the buttomBar?
I tried this in onViewCreated, but not work:
CoordinatorLayout parentView = (CoordinatorLayout) (getView().getParent().getParent()); View bottomBarView = LayoutInflater.from(getContext()).inflate(R.layout.item_picker_multiselection_bar, parentView, false); this.tvDone = bottomBarView.findViewById(R.id.tv_multiselect_done); this.tvDone.setEnabled(false);

Thank you

Camera and gallery tiles do not appear

Hello,

It seems camera and gallery tiles are broken in version 1.0.1 - they simply do not appear in the image picker.

nocameratile

I checked the build method and both showCameraTile and showGalleryTile properties are set to true:

showcameratile

Here is a snippet I use to display the image picker:

val multiSelectionPicker = BSImagePicker.Builder("com.visualwatermark.fileprovider")
        .isMultiSelect //Set this if you want to use multi selection mode.
        .setMultiSelectBarBgColor(android.R.color.white) //Default: #FFFFFF. You can also set it to a translucent color.
        .setMultiSelectTextColor(R.color.primary_text) //Default: #212121(Dark grey). This is the message in the multi-select bottom bar.
        .setMultiSelectDoneTextColor(R.color.colorAccent) //Default: #388e3c(Green). This is the color of the "Done" TextView.
        .setOverSelectTextColor(R.color.error_text) //Default: #b71c1c. This is the color of the message shown when user tries to select more than maximum select count.
        .disableOverSelectionMessage() //You can also decide not to show this over select message.
        .build()
multiSelectionPicker.show(supportFragmentManager, "picker")

Image taken with the camera doesn't get selected.

The image picker works great if I choose an image from the list of the newest images. But if I click on the camera and take a picture or click on the gallery and choose an image from there then it just takes me back to the list and the image doesn't get selected.
I tested it on an OnePlus 5T (Android 8.1, Oxygen OS) and an Xperia Z3 (Android 8.0, Lineage OS).
My code that opens the dialog:

final BSImagePicker singleSelectionPicker = new BSImagePicker.Builder("com.*******.********.fileprovider")
                .setMaximumDisplayingImages(25)
                .build();

        imageContainer.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                singleSelectionPicker.show(getSupportFragmentManager(), "picker");
            }
        });

Getting NullPointerException using getChildFragmentManager in Fragment

Hi,

i really appreciate your work. Unfortunately I am getting an error using pickerDialog.show(getChildFragmentManager(), "picker");

When I am using pickerDialog.show(getActivity().getSupportFragmentManager(), "picker");
I have to implement the listeners to the parent activity.

Do you have a solution why it doesn't work.

Below is the error log:

java.lang.NullPointerException: Attempt to invoke interface method 'void com.asksira.bsimagepicker.BSImagePicker$ImageLoaderDelegate.loadImage(java.io.File, android.widget.ImageView)' on a null object reference
at com.asksira.bsimagepicker.ImageTileAdapter$ImageTileViewHolder.bind(ImageTileAdapter.java:257)
at com.asksira.bsimagepicker.ImageTileAdapter.onBindViewHolder(ImageTileAdapter.java:100)
at com.asksira.bsimagepicker.ImageTileAdapter.onBindViewHolder(ImageTileAdapter.java:19)
at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6781)
at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6823)
at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5752)
at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6019)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5858)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5854)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2230)
at android.support.v7.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:557)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1517)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:612)
at android.support.v7.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:171)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3924)
at android.support.v7.widget.RecyclerView.onMeasure(RecyclerView.java:3336)
at android.view.View.measure(View.java:24967)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7134)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:24967)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7134)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:24967)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7134)
at android.support.design.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:733)
at android.support.design.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:805)
at android.view.View.measure(View.java:24967)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7134)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:24967)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7134)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:143)
at android.view.View.measure(View.java:24967)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7134)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:24967)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7134)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:24967)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7134)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1535)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:825)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:704)
at android.view.View.measure(View.java:24967)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7134)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at com.android.internal.policy.DecorView.onMeasure(DecorView.java:992)
at android.view.View.measure(View.java:24967)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:3266)
2019-05-20 14:07:39.418 5839-5839/com.example.user E/AndroidRuntime: at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1993)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2295)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1853)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8476)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
at android.view.Choreographer.doCallbacks(Choreographer.java:761)
at android.view.Choreographer.doFrame(Choreographer.java:696)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7032)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)

Thank you.

Implementin bsimagepicker givin me an error

hi ,
when i tried to implement this i am having one error that i can resolve, my app always crash, here some log details.

2019-01-15 09:54:48.465 32585-32585/com.cabureweb.imprmiapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.cabureweb.imprmiapp, PID: 32585
java.lang.NoSuchMethodError: No static method with(Landroid/view/View;)Lcom/bumptech/glide/RequestManager; in class Lcom/bumptech/glide/Glide; or its super classes (declaration of 'com.bumptech.glide.Glide' appears in /data/app/com.cabureweb.imprmiapp-DrnreZ3clRRa9Kc25zdbvg==/split_lib_dependencies_apk.apk)
at com.asksira.bsimagepicker.ImageTileAdapter$ImageTileViewHolder.bind(ImageTileAdapter.java:248)
at com.asksira.bsimagepicker.ImageTileAdapter.onBindViewHolder(ImageTileAdapter.java:93)
at com.asksira.bsimagepicker.ImageTileAdapter.onBindViewHolder(ImageTileAdapter.java:21)
at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6781)
at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6823)
at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5752)
at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6019)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5858)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5854)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2230)
at android.support.v7.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:557)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1517)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:612)
at android.support.v7.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:171)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3924)
at android.support.v7.widget.RecyclerView.onMeasure(RecyclerView.java:3336)
at android.view.View.measure(View.java:22024)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6584)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:22024)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6584)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:22024)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6584)
at android.support.design.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:733)
at android.support.design.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:805)
at android.view.View.measure(View.java:22024)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6584)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:22024)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6584)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:143)
at android.view.View.measure(View.java:22024)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6584)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:22024)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6584)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:22024)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6584)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1514)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:806)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:685)
at android.view.View.measure(View.java:22024)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6584)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at com.android.internal.policy.DecorView.onMeasure(DecorView.java:721)
at android.view.View.measure(View.java:22024)
2019-01-15 09:54:48.466 32585-32585/com.cabureweb.imprmiapp E/AndroidRuntime: at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2438)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1526)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1779)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1414)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6827)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
at android.view.Choreographer.doCallbacks(Choreographer.java:723)
at android.view.Choreographer.doFrame(Choreographer.java:658)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6673)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:769)
2019-01-15 09:54:55.941 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:54:56.009 1657-2574/? E/ActivityManager: Found activity ActivityRecord{98e5b4e u0 com.cabureweb.imprmiapp/.NavigationDrawer t-1 f} in proc activity list using null instead of expected ProcessRecord{aa5079a 32585:com.cabureweb.imprmiapp/u0a254}
2019-01-15 09:55:56.483 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:55:57.032 2549-2549/? E/mot.actions.quickscreenshot.UserLockUnlockReceiver: Disable quick screenshot due to screen being locked/off
2019-01-15 09:55:57.117 27265-27265/? E/SensorManager: sensor or listener is null
2019-01-15 09:55:57.122 27265-27265/? E/MotoDisplay: Exception getting package info. Name not found - com.android.calculator2
2019-01-15 09:55:57.125 27265-27265/? E/MotoDisplay: Exception getting package info. Name not found - com.motorola.tools.batterytracer
2019-01-15 09:55:57.156 3292-3292/? E/NfcService: screen state android.intent.action.SCREEN_OFF
2019-01-15 09:55:57.157 3292-3292/? E/NfcService: screen state OFF required
2019-01-15 09:55:57.159 3292-3292/? E/NfcService: screen state 1
2019-01-15 09:55:57.159 3292-3292/? E/NfcService: screen state mScreenState 8
2019-01-15 09:55:57.160 3292-3292/? E/BrcmNfcJni: nfcManager_doSetScreenOrPowerState: Enter
2019-01-15 09:55:57.161 902-3764/? E/NxpTml: _i2c_write() errno : 5
2019-01-15 09:55:57.161 902-3764/? E/NxpTml: PN54X - Error in I2C Write.....
2019-01-15 09:55:57.161 902-3766/? E/NxpHal: write error status = 0x1ff
2019-01-15 09:55:57.162 902-902/? E/NxpHal: write_unlocked failed - PN54X Maybe in Standby Mode - Retry
2019-01-15 09:55:57.164 3292-32764/? E/NfcService: applyRouting -2
2019-01-15 09:55:57.198 3292-3731/? E/BrcmNfcJni: nfaConnectionCallback: unknown event ????
2019-01-15 09:55:59.406 1657-8049/? E/BatteryStatsService: no controller energy info supplied
2019-01-15 09:56:47.618 1657-1827/? E/BatteryStatsService: no controller energy info supplied
2019-01-15 09:57:13.777 27265-27265/? E/MotoDisplay: Notification not found: [Key: 1764691466, groupKey: 1764691466]
2019-01-15 09:57:14.087 455-562/? E/YouTube: Failed delayed event dispatch, no dispatchers.
2019-01-15 09:57:14.771 27265-27265/? E/MotoDisplay: Notification not found: [Key: -1529027347, groupKey: -1529027347]
2019-01-15 09:57:18.320 3042-3042/? E/com.motorola.faceunlock.service.CameraFaceUnlockService: unlock start failed
2019-01-15 09:57:18.323 3042-3042/? E/com.motorola.faceunlock.service.FaceAuthService: cancelUnlock failed: current state: INITING
2019-01-15 09:57:18.399 3042-3042/? E/com.motorola.faceunlock.service.CameraFaceUnlockService: unlock start failed
2019-01-15 09:57:18.403 3042-3042/? E/com.motorola.faceunlock.service.FaceAuthService: cancelUnlock failed: current state: INITING
2019-01-15 09:57:18.536 3292-3292/? E/NfcService: screen state android.intent.action.SCREEN_ON
2019-01-15 09:57:18.537 3292-3292/? E/NfcService: screen state on
2019-01-15 09:57:18.539 3292-3292/? E/NfcService: screen state 4
2019-01-15 09:57:18.539 3292-3292/? E/NfcService: screen state mScreenState 1
2019-01-15 09:57:18.539 3292-3292/? E/BrcmNfcJni: nfcManager_doSetScreenOrPowerState: Enter
2019-01-15 09:57:18.541 902-3764/? E/NxpTml: _i2c_write() errno : 5
2019-01-15 09:57:18.541 902-3764/? E/NxpTml: PN54X - Error in I2C Write.....
2019-01-15 09:57:18.541 902-3766/? E/NxpHal: write error status = 0x1ff
2019-01-15 09:57:18.542 902-902/? E/NxpHal: write_unlocked failed - PN54X Maybe in Standby Mode - Retry
2019-01-15 09:57:18.544 3292-738/? E/NfcService: applyRouting -2
2019-01-15 09:57:18.577 2549-2549/? E/mot.actions.quickscreenshot.UserLockUnlockReceiver: Disable quick screenshot due to screen being locked/off
2019-01-15 09:57:18.578 3292-3731/? E/BrcmNfcNfa: UICC/ESE[0x402] is not activated
2019-01-15 09:57:19.838 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:57:20.235 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:57:20.488 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:57:20.661 1657-2547/? E/BatteryStatsService: no controller energy info supplied
2019-01-15 09:57:20.800 3292-3292/? E/NfcService: screen state android.intent.action.USER_PRESENT
2019-01-15 09:57:20.803 3292-3292/? E/NfcService: screen state user present
2019-01-15 09:57:20.805 3292-3292/? E/NfcService: screen state 8
2019-01-15 09:57:20.805 3292-3292/? E/NfcService: screen state mScreenState 4
2019-01-15 09:57:20.805 3292-3292/? E/BrcmNfcJni: nfcManager_doSetScreenOrPowerState: Enter
2019-01-15 09:57:20.807 902-3764/? E/NxpTml: _i2c_write() errno : 5
2019-01-15 09:57:20.807 902-3764/? E/NxpTml: PN54X - Error in I2C Write.....
2019-01-15 09:57:20.808 902-3766/? E/NxpHal: write error status = 0x1ff
2019-01-15 09:57:20.808 902-902/? E/NxpHal: write_unlocked failed - PN54X Maybe in Standby Mode - Retry
2019-01-15 09:57:20.820 3292-769/? E/NfcService: applyRouting -2
2019-01-15 09:57:20.897 3292-3731/? E/BrcmNfcJni: nfaConnectionCallback: unknown event ????
2019-01-15 09:57:20.897 3292-3731/? E/BrcmNfcNfa: UICC/ESE[0x402] is not activated
2019-01-15 09:57:23.093 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:57:23.532 2549-2549/? E/mot.actions.quickscreenshot.UserLockUnlockReceiver: Disable quick screenshot due to screen being locked/off
2019-01-15 09:57:23.618 27265-27265/? E/SensorManager: sensor or listener is null
2019-01-15 09:57:23.634 27265-27265/? E/MotoDisplay: Exception getting package info. Name not found - com.android.calculator2
2019-01-15 09:57:23.639 27265-27265/? E/MotoDisplay: Exception getting package info. Name not found - com.motorola.tools.batterytracer
2019-01-15 09:57:23.732 897-1962/? E/DlbDapEndpointParamCache: getParam() No cache defined for device 0x00000002
2019-01-15 09:57:23.861 3292-3292/? E/NfcService: screen state android.intent.action.SCREEN_OFF
2019-01-15 09:57:23.863 3292-3292/? E/NfcService: screen state OFF required
2019-01-15 09:57:23.864 3292-3292/? E/NfcService: screen state 2
2019-01-15 09:57:23.864 3292-3292/? E/NfcService: screen state mScreenState 8
2019-01-15 09:57:23.864 3292-3292/? E/BrcmNfcJni: nfcManager_doSetScreenOrPowerState: Enter
2019-01-15 09:57:23.865 902-3764/? E/NxpTml: _i2c_write() errno : 5
2019-01-15 09:57:23.865 902-3764/? E/NxpTml: PN54X - Error in I2C Write.....
2019-01-15 09:57:23.865 902-3766/? E/NxpHal: write error status = 0x1ff
2019-01-15 09:57:23.865 902-902/? E/NxpHal: write_unlocked failed - PN54X Maybe in Standby Mode - Retry
2019-01-15 09:57:23.870 3292-810/? E/NfcService: applyRouting -2
2019-01-15 09:57:23.907 3292-3731/? E/BrcmNfcJni: nfaConnectionCallback: unknown event ????
2019-01-15 09:57:26.007 1657-2547/? E/BatteryStatsService: no controller energy info supplied
2019-01-15 09:57:39.613 875-5198/? E/[email protected]_lock: Release wakelock is released
2019-01-15 09:57:41.621 875-5198/? E/[email protected]_lock: Release wakelock is released
2019-01-15 09:57:58.756 31014-31014/? E/Spotify: [main] The application has been idle too long, stopping service
2019-01-15 09:57:58.794 31014-31014/? E/Spotify: [main] Error deleting directory: shareablesdir
2019-01-15 09:58:18.740 3292-3292/? E/RegisteredServicesCache: Skipping virtual uicc payment app while device does not support multi-sim
2019-01-15 09:58:18.745 3292-3292/? E/RegisteredServicesCache: Next Tag=services
2019-01-15 09:58:18.745 3292-3292/? E/RegisteredServicesCache: 1invalidateCache:WriteServiceStateToFile
2019-01-15 09:58:18.745 3292-3292/? E/RegisteredServicesCache: Writing service state Data Always
2019-01-15 09:58:18.761 3292-3292/? E/RegisteredServicesCache: 3updateStatusOfServices:WriteServiceStateToFile
2019-01-15 09:58:18.762 3292-3292/? E/RegisteredServicesCache: Writing service state Data Always
2019-01-15 09:58:18.774 3292-3292/? E/NfcService: applyRouting -9
2019-01-15 09:58:19.985 29591-29591/? E/adbd: failed to connect to socket 'localabstract:com.asksira.imagepickersheetdemo': Connection refused
2019-01-15 09:58:22.928 3042-3042/? E/com.motorola.faceunlock.service.CameraFaceUnlockService: unlock start failed
2019-01-15 09:58:22.930 3042-3042/? E/com.motorola.faceunlock.service.FaceAuthService: cancelUnlock failed: current state: INITING
2019-01-15 09:58:22.932 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:58:23.048 946-2277/? E/SurfaceFlinger: Failed to find layer (AOD#0) in layer parent (no-parent).
2019-01-15 09:58:23.192 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:58:23.194 3292-3292/? E/NfcService: screen state android.intent.action.USER_PRESENT
2019-01-15 09:58:23.196 3292-3292/? E/NfcService: screen state user present
2019-01-15 09:58:23.197 3292-3292/? E/NfcService: screen state 8
2019-01-15 09:58:23.197 3292-3292/? E/NfcService: screen state mScreenState 2
2019-01-15 09:58:23.197 3292-3292/? E/BrcmNfcJni: nfcManager_doSetScreenOrPowerState: Enter
2019-01-15 09:58:23.199 902-3764/? E/NxpTml: _i2c_write() errno : 5
2019-01-15 09:58:23.199 902-3764/? E/NxpTml: PN54X - Error in I2C Write.....
2019-01-15 09:58:23.199 902-3766/? E/NxpHal: write error status = 0x1ff
2019-01-15 09:58:23.199 902-902/? E/NxpHal: write_unlocked failed - PN54X Maybe in Standby Mode - Retry
2019-01-15 09:58:23.210 3292-1125/? E/NfcService: applyRouting -2
2019-01-15 09:58:23.264 3292-3731/? E/BrcmNfcJni: nfaConnectionCallback: unknown event ????
2019-01-15 09:58:23.264 3292-3731/? E/BrcmNfcNfa: UICC/ESE[0x402] is not activated
2019-01-15 09:58:23.512 1657-2237/? E/WifiScanningService: Got invalid work source request: WorkSource{} from ClientInfo[uid=10039,android.os.Messenger@82bae92]
2019-01-15 09:58:25.043 1657-14689/? E/ActivityManager: Sending non-protected broadcast com.motorola.location.instrumentation from system 1657:system/1000 pkg android
java.lang.Throwable
at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:19374)
at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:19908)
at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:20155)
at android.app.ContextImpl.sendBroadcast(ContextImpl.java:974)
at com.android.server.location.GnssLocationProvider.reportStatus(GnssLocationProvider.java:1839)
2019-01-15 09:58:25.044 1657-14689/? E/ActivityManager: Sending non-protected broadcast com.motorola.location.instrumentation from system 1657:system/1000 pkg android
java.lang.Throwable
at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:19374)
at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:20001)
at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:20155)
at android.app.ContextImpl.sendBroadcast(ContextImpl.java:974)
at com.android.server.location.GnssLocationProvider.reportStatus(GnssLocationProvider.java:1839)
2019-01-15 09:58:25.048 3292-3292/? E/NfcService: screen state android.intent.action.SCREEN_ON
2019-01-15 09:58:25.049 3292-3292/? E/NfcService: screen state on
2019-01-15 09:58:25.050 3292-3292/? E/NfcService: screen state 8
2019-01-15 09:58:25.050 3292-3292/? E/NfcService: screen state mScreenState 8
2019-01-15 09:58:25.050 3292-3292/? E/BrcmNfcJni: nfcManager_doSetScreenOrPowerState: Enter
2019-01-15 09:58:25.052 3292-1219/? E/NfcService: applyRouting -2
2019-01-15 09:58:25.186 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:58:25.598 1110-2474/? E/IzatSvc_ComboNetworkProvider: Exiting with error proc line 208 "1"
2019-01-15 09:58:25.903 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:58:25.904 905-964/? E/ANDR-PERF-OPTSHANDLER: Failed to read /sys/module/process_reclaim/parameters/enable_process_reclaim
2019-01-15 09:58:25.904 905-964/? E/ANDR-PERF-RESOURCEQS: Failed to apply optimization [11, 6]
2019-01-15 09:58:25.903 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:58:25.904 905-964/? E/ANDR-PERF-OPTSHANDLER: Failed to read /sys/module/process_reclaim/parameters/enable_process_reclaim
2019-01-15 09:58:25.904 905-964/? E/ANDR-PERF-RESOURCEQS: Failed to apply optimization [11, 6]
2019-01-15 09:58:27.115 1657-6627/? E/BatteryStatsService: no controller energy info supplied
2019-01-15 09:58:27.883 31715-1288/? E/LocalSocketProxyDataSource: Inconsistent headers [179966] [bytes 0-524299/179966]
2019-01-15 09:58:28.189 1108-2070/? E/OMX-VDEC-1080P: Enable/Disable allocate-native-handle allowed only on input port!
2019-01-15 09:58:28.189 1108-2070/? E/OMX-VDEC-1080P: set_parameter: Error: 0x80001019, setting param 0x7f00005d
2019-01-15 09:58:28.189 1108-2070/? E/OMXNodeInstance: setParameter(0xf475d984:qcom.decoder.avc, OMX.google.android.index.allocateNativeHandle(0x7f00005d): Output:1 en=0) ERROR: UnsupportedSetting(0x80001019)
2019-01-15 09:58:28.199 1108-2137/? E/OMXNodeInstance: getConfig(0xf475d984:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
2019-01-15 09:58:28.261 1108-2070/? E/OMXNodeInstance: getConfig(0xf2809f60:google.aac.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
2019-01-15 09:58:28.274 31715-1288/? E/LocalSocketProxyDataSource: Inconsistent headers [171465] [bytes 8501-532800/179966]
2019-01-15 09:58:28.397 1108-2137/? E/OMXNodeInstance: getConfig(0xf475d984:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
2019-01-15 09:58:28.426 1108-2070/? E/OMXNodeInstance: getConfig(0xf475d984:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
2019-01-15 09:58:28.847 897-29274/? E/ACDB-LOADER: Error: ACDB_CMD_GET_AFE_COMMON_TABLE_SIZE Returned = -19
2019-01-15 09:58:28.847 897-29274/? E/ACDB-LOADER: Error: ACDB AFE returned = -19
2019-01-15 09:58:28.921 905-964/? E/ANDR-PERF-OPTSHANDLER: perf_lock_rel: updated /sys/class/mmc_host/mmc0/clk_scaling/enable with 1
return value 2
2019-01-15 09:58:29.882 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:58:35.587 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:58:36.418 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:58:37.134 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:58:37.454 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:58:37.485 1108-2086/? E/OMX-VDEC-1080P: Enable/Disable allocate-native-handle allowed only on input port!
2019-01-15 09:58:37.485 1108-2086/? E/OMX-VDEC-1080P: set_parameter: Error: 0x80001019, setting param 0x7f00005d
2019-01-15 09:58:37.485 1108-2086/? E/OMXNodeInstance: setParameter(0xf1e45a44:qcom.decoder.avc, OMX.google.android.index.allocateNativeHandle(0x7f00005d): Output:1 en=0) ERROR: UnsupportedSetting(0x80001019)
2019-01-15 09:58:37.498 1108-2086/? E/OMXNodeInstance: getConfig(0xf1e45a44:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
2019-01-15 09:58:37.597 1108-2070/? E/OMXNodeInstance: getConfig(0xf1e45a44:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
2019-01-15 09:58:37.668 1108-2086/? E/OMXNodeInstance: getConfig(0xf1e45a44:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
2019-01-15 09:58:37.671 1108-2137/? E/OMXNodeInstance: getConfig(0xf1e45a44:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
2019-01-15 09:58:37.744 1092-2989/? E/installd: Failed to delete /data/app/vmdl1626766886.tmp: No such file or directory
2019-01-15 09:58:38.036 905-964/? E/ANDR-PERF-OPTSHANDLER: Failed to read /sys/module/process_reclaim/parameters/enable_process_reclaim
2019-01-15 09:58:38.036 905-964/? E/ANDR-PERF-RESOURCEQS: Failed to apply optimization [11, 6]
2019-01-15 09:58:38.125 3292-3292/? E/RegisteredServicesCache: Skipping virtual uicc payment app while device does not support multi-sim
2019-01-15 09:58:38.127 946-1010/? E/SurfaceFlinger: Failed to find layer (AtchDlg:com.instagram.android/com.instagram.modal.TransparentModalActivity#0) in layer parent (no-parent).
2019-01-15 09:58:38.131 3292-3292/? E/RegisteredServicesCache: Next Tag=services
2019-01-15 09:58:38.131 3292-3292/? E/RegisteredServicesCache: 1invalidateCache:WriteServiceStateToFile
2019-01-15 09:58:38.131 3292-3292/? E/RegisteredServicesCache: Writing service state Data Always
2019-01-15 09:58:38.208 3292-3292/? E/RegisteredServicesCache: 3updateStatusOfServices:WriteServiceStateToFile
2019-01-15 09:58:38.216 3292-3292/? E/RegisteredServicesCache: Writing service state Data Always
2019-01-15 09:58:38.242 3292-3292/? E/NfcService: applyRouting -9
2019-01-15 09:58:38.249 902-3764/? E/NxpTml: _i2c_write() errno : 5
2019-01-15 09:58:38.249 902-3764/? E/NxpTml: PN54X - Error in I2C Write.....
2019-01-15 09:58:38.249 902-3766/? E/NxpHal: write error status = 0x1ff
2019-01-15 09:58:38.250 902-902/? E/NxpHal: write_unlocked failed - PN54X Maybe in Standby Mode - Retry
2019-01-15 09:58:38.261 3292-3731/? E/BrcmNfcNfa: CE_T4tRegisterAID (): only one wildcard AID can be registered at time.
2019-01-15 09:58:38.261 3292-3731/? E/BrcmNfcNfa: Unable to register AID
2019-01-15 09:58:41.040 905-964/? E/ANDR-PERF-OPTSHANDLER: perf_lock_rel: updated /sys/class/mmc_host/mmc0/clk_scaling/enable with 1
return value 2
2019-01-15 09:58:41.422 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:58:41.723 946-1842/? E/SurfaceFlinger: Failed to find layer (Splash Screen com.asksira.imagepickersheetdemo#0) in layer parent (no-parent).
2019-01-15 09:58:42.541 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:58:43.957 1110-2474/? E/IzatSvc_ComboNetworkProvider: Exiting with error proc line 208 "1"
2019-01-15 09:58:48.243 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:58:50.648 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 09:58:50.661 905-964/? E/ANDR-PERF-OPTSHANDLER: Failed to read /sys/module/process_reclaim/parameters/enable_process_reclaim
2019-01-15 09:58:50.661 905-964/? E/ANDR-PERF-RESOURCEQS: Failed to apply optimization [11, 6]
2019-01-15 09:58:50.661 905-964/? E/ANDR-PERF-OPTSHANDLER: Failed to read /sys/module/process_reclaim/parameters/enable_process_reclaim
2019-01-15 09:58:50.661 905-964/? E/ANDR-PERF-RESOURCEQS: Failed to apply optimization [11, 6]
2019-01-15 09:58:51.096 2991-32352/? E/ctxmgr: [ProducerStatusImpl]updateStateForNewContextData: inactive, contextName=7
2019-01-15 09:58:51.244 25961-32176/? E/PlaceStateUpdater: Received no places
2019-01-15 09:58:53.052 2549-2549/? E/mot.actions.quickscreenshot.UserLockUnlockReceiver: Disable quick screenshot due to screen being locked/off
2019-01-15 09:58:53.099 27265-27265/? E/SensorManager: sensor or listener is null
2019-01-15 09:58:53.123 27265-27265/? E/MotoDisplay: Exception getting package info. Name not found - com.android.calculator2
2019-01-15 09:58:53.125 27265-27265/? E/MotoDisplay: Exception getting package info. Name not found - com.motorola.tools.batterytracer
2019-01-15 09:58:53.169 897-3495/? E/DlbDapEndpointParamCache: getParam() No cache defined for device 0x00000002
2019-01-15 09:58:53.272 3292-3292/? E/NfcService: screen state android.intent.action.SCREEN_OFF
2019-01-15 09:58:53.272 3292-3292/? E/NfcService: screen state OFF required
2019-01-15 09:58:53.274 3292-3292/? E/NfcService: screen state 2
2019-01-15 09:58:53.274 3292-3292/? E/NfcService: screen state mScreenState 8
2019-01-15 09:58:53.274 3292-3292/? E/BrcmNfcJni: nfcManager_doSetScreenOrPowerState: Enter
2019-01-15 09:58:53.275 3292-1760/? E/NfcService: applyRouting -2
2019-01-15 09:58:53.275 902-3764/? E/NxpTml: _i2c_write() errno : 5
2019-01-15 09:58:53.275 902-3764/? E/NxpTml: PN54X - Error in I2C Write.....
2019-01-15 09:58:53.275 902-3766/? E/NxpHal: write error status = 0x1ff
2019-01-15 09:58:53.275 902-902/? E/NxpHal: write_unlocked failed - PN54X Maybe in Standby Mode - Retry
2019-01-15 09:58:53.308 3292-3731/? E/BrcmNfcJni: nfaConnectionCallback: unknown event ????
2019-01-15 09:58:53.676 905-964/? E/ANDR-PERF-OPTSHANDLER: perf_lock_rel: updated /sys/class/mmc_host/mmc0/clk_scaling/enable with 1
return value 2
2019-01-15 09:58:55.431 1657-15540/? E/BatteryStatsService: no controller energy info supplied
2019-01-15 09:59:47.637 1657-1827/? E/BatteryStatsService: no controller energy info supplied
2019-01-15 10:00:01.046 1657-1827/? E/BatteryStatsService: no controller energy info supplied
2019-01-15 10:01:19.865 3042-3042/? E/com.motorola.faceunlock.service.CameraFaceUnlockService: unlock start failed
2019-01-15 10:01:19.901 3042-3042/? E/com.motorola.faceunlock.service.FaceAuthService: cancelUnlock failed: current state: INITING
2019-01-15 10:01:20.106 3292-3292/? E/NfcService: screen state android.intent.action.SCREEN_ON
2019-01-15 10:01:20.108 3292-3292/? E/NfcService: screen state on
2019-01-15 10:01:20.109 3292-3292/? E/NfcService: screen state 4
2019-01-15 10:01:20.109 3292-3292/? E/NfcService: screen state mScreenState 2
2019-01-15 10:01:20.109 3292-3292/? E/BrcmNfcJni: nfcManager_doSetScreenOrPowerState: Enter
2019-01-15 10:01:20.111 3292-1868/? E/NfcService: applyRouting -2
2019-01-15 10:01:20.111 902-3764/? E/NxpTml: _i2c_write() errno : 5
2019-01-15 10:01:20.111 902-3764/? E/NxpTml: PN54X - Error in I2C Write.....
2019-01-15 10:01:20.111 902-3766/? E/NxpHal: write error status = 0x1ff
2019-01-15 10:01:20.112 902-902/? E/NxpHal: write_unlocked failed - PN54X Maybe in Standby Mode - Retry
2019-01-15 10:01:20.155 3292-3731/? E/BrcmNfcNfa: UICC/ESE[0x402] is not activated
2019-01-15 10:01:20.169 2549-2549/? E/mot.actions.quickscreenshot.UserLockUnlockReceiver: Disable quick screenshot due to screen being locked/off
2019-01-15 10:01:20.460 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 10:01:21.640 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 10:01:22.087 2549-2549/? E/mot.actions.quickscreenshot.UserLockUnlockReceiver: Disable quick screenshot due to screen being locked/off
2019-01-15 10:01:22.173 27265-27265/? E/SensorManager: sensor or listener is null
2019-01-15 10:01:22.179 27265-27265/? E/MotoDisplay: Exception getting package info. Name not found - com.android.calculator2
2019-01-15 10:01:22.181 27265-27265/? E/MotoDisplay: Exception getting package info. Name not found - com.motorola.tools.batterytracer
2019-01-15 10:01:22.194 3292-3292/? E/NfcService: screen state android.intent.action.SCREEN_OFF
2019-01-15 10:01:22.195 3292-3292/? E/NfcService: screen state OFF required
2019-01-15 10:01:22.196 3292-3292/? E/NfcService: screen state 2
2019-01-15 10:01:22.196 3292-3292/? E/NfcService: screen state mScreenState 4
2019-01-15 10:01:22.196 3292-3292/? E/BrcmNfcJni: nfcManager_doSetScreenOrPowerState: Enter
2019-01-15 10:01:22.197 902-3764/? E/NxpTml: _i2c_write() errno : 5
2019-01-15 10:01:22.197 902-3764/? E/NxpTml: PN54X - Error in I2C Write.....
2019-01-15 10:01:22.197 902-3766/? E/NxpHal: write error status = 0x1ff
2019-01-15 10:01:22.197 902-902/? E/NxpHal: write_unlocked failed - PN54X Maybe in Standby Mode - Retry
2019-01-15 10:01:22.197 3292-1889/? E/NfcService: applyRouting -2
2019-01-15 10:01:22.238 3292-3731/? E/BrcmNfcJni: nfaConnectionCallback: unknown event ????
2019-01-15 10:01:22.249 1657-6953/? E/BatteryStatsService: no controller energy info supplied
2019-01-15 10:01:24.357 1657-6953/? E/BatteryStatsService: no controller energy info supplied
2019-01-15 10:02:25.327 3042-3042/? E/com.motorola.faceunlock.service.CameraFaceUnlockService: unlock start failed
2019-01-15 10:02:25.337 3042-3042/? E/com.motorola.faceunlock.service.FaceAuthService: cancelUnlock failed: current state: INITING
2019-01-15 10:02:25.587 3292-3292/? E/NfcService: screen state android.intent.action.SCREEN_ON
2019-01-15 10:02:25.590 3292-3292/? E/NfcService: screen state on
2019-01-15 10:02:25.591 3292-3292/? E/NfcService: screen state 4
2019-01-15 10:02:25.591 3292-3292/? E/NfcService: screen state mScreenState 2
2019-01-15 10:02:25.591 3292-3292/? E/BrcmNfcJni: nfcManager_doSetScreenOrPowerState: Enter
2019-01-15 10:02:25.594 902-3764/? E/NxpTml: _i2c_write() errno : 5
2019-01-15 10:02:25.594 902-3764/? E/NxpTml: PN54X - Error in I2C Write.....
2019-01-15 10:02:25.594 902-3766/? E/NxpHal: write error status = 0x1ff
2019-01-15 10:02:25.594 3292-2125/? E/NfcService: applyRouting -2
2019-01-15 10:02:25.595 902-902/? E/NxpHal: write_unlocked failed - PN54X Maybe in Standby Mode - Retry
2019-01-15 10:02:25.627 3292-3731/? E/BrcmNfcNfa: UICC/ESE[0x402] is not activated
2019-01-15 10:02:25.640 2549-2549/? E/mot.actions.quickscreenshot.UserLockUnlockReceiver: Disable quick screenshot due to screen being locked/off
2019-01-15 10:02:26.915 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 10:02:27.758 1657-2576/? E/BatteryStatsService: no controller energy info supplied
2019-01-15 10:02:28.164 905-964/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-01-15 10:02:28.605 2549-2549/? E/mot.actions.quickscreenshot.UserLockUnlockReceiver: Disable quick screenshot due to screen being locked/off
2019-01-15 10:02:28.666 27265-27265/? E/SensorManager: sensor or listener is null
2019-01-15 10:02:28.673 27265-27265/? E/MotoDisplay: Exception getting package info. Name not found - com.android.calculator2
2019-01-15 10:02:28.675 27265-27265/? E/MotoDisplay: Exception getting package info. Name not found - com.motorola.tools.batterytracer
2019-01-15 10:02:28.723 3292-3292/? E/NfcService: screen state android.intent.action.SCREEN_OFF
2019-01-15 10:02:28.724 3292-3292/? E/NfcService: screen state OFF required
2019-01-15 10:02:28.726 3292-3292/? E/NfcService: screen state 2
2019-01-15 10:02:28.726 3292-3292/? E/NfcService: screen state mScreenState 4
2019-01-15 10:02:28.726 3292-3292/? E/BrcmNfcJni: nfcManager_doSetScreenOrPowerState: Enter
2019-01-15 10:02:28.727 902-3764/? E/NxpTml: _i2c_write() errno : 5
2019-01-15 10:02:28.727 902-3764/? E/NxpTml: PN54X - Error in I2C Write.....
2019-01-15 10:02:28.727 902-3766/? E/NxpHal: write error status = 0x1ff
2019-01-15 10:02:28.728 902-902/? E/NxpHal: write_unlocked failed - PN54X Maybe in Standby Mode - Retry
2019-01-15 10:02:28.731 3292-2146/? E/NfcService: applyRouting -2
2019-01-15 10:02:28.774 3292-3731/? E/BrcmNfcJni: nfaConnectionCallback: unknown event ????
2019-01-15 10:02:30.884 1657-2576/? E/BatteryStatsService: no controller energy info supplied
2019-01-15 10:04:47.611 1657-1827/? E/BatteryStatsService: no controller energy info supplied
2019-01-15 10:07:45.250 875-5198/? E/[email protected]_lock: Release wakelock is released
2019-01-15 10:07:47.278 875-5198/? E/[email protected]_lock: Release wakelock is released
2019-01-15 10:07:49.616 875-5198/? E/[email protected]_lock: Release wakelock is released

Getting images uri

Thank you for this sweet picker. I finally integrated it with my project, and no errors at the moment.
But I am a little confused about retrieving the 6 images uri.
The way I know it is
if(requestCode == GALLERY_REQUEST && resultCode == RESULT_OK){ mSelectedUri = data.getData(); }
But here in onMultiImageSelected(List<Uri> uriList, String tag) it's an image view, and I don't know how to get ivImage1 ivImage2 ivImage3 ivImage4 ivImage5 ivImage6
I hope you can help me, thank you

Thanks for your feedback

I read your feedback in README.
First of all, I appreciate about your feedback.
Nowadays I quite busy but I will fix that issue in TedBottomPicker
And I starred your repository.
Thanks.

Camera preview not showing when multi image selected

Hello,

First of all, thank you for this library. I want to make both select multi image from gallery and take a photo with camera preview same time. I can select multi image from gallery, but I can't take photo camera preview. Could you help me?

Thank you.

Image duplication

Hi, I am facing a problem regarding image selection.. whenever I select the image using this library and then try to compress it using some algorithm, the compressed image copy is then shown in the bottom sheet photos. but they are not in the phone memory

Call in a fragment

When used in a fragment, only the listeners are not working. But if I add them to Activity, they are called in it. Can I hurt them in the fragment?

  override fun onSingleImageSelected(uri: Uri?) {
    }

    override fun onMultiImageSelected(uriList: MutableList<Uri>?) {
    }

multiple call needs tag/requestCode

Hi again,
lets say I have more than one imagepickers in an activity, I implement OnSingleImageSelectedListener interface in that activity.
now at onSingleImageSelected(Uri uri), I cannot distinguish who is the caller.
Maybe I request to have some requestCode or Tag attached to the method, or any other idea?.

int requestCode1 = 1, requestCode2 = 2;
//caller1
singleSelectionPicker.show(1, getFragmentManager(), "picker");
//caller2
singleSelectionPicker.show(2, getFragmentManager(), "picker");

onSingleImageSelected(int requestCode, Uri uri){
if (requestCode == 1)...
else ...
}

thanks in advance,

Library dependend on Glide.

Your library is cool and all but it is dependend on glide. Make sure you put that somewhere in the documentation. I got no NoClassDefFoundError until I loaded Glide dependency in.

Can't select image

Hi
When I added BSImagePicker and run and call show from a fragment I get:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/bumptech/glide/Glide;
at com.asksira.bsimagepicker.ImageTileAdapter$ImageTileViewHolder.bind(ImageTileAdapter.java:248)
at com.asksira.bsimagepicker.ImageTileAdapter.onBindViewHolder(ImageTileAdapter.java:93)
at com.asksira.bsimagepicker.ImageTileAdapter.onBindViewHolder(ImageTileAdapter.java:21).

I found out that by adding:
implementation 'com.github.bumptech.glide:glide:4.7.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
to gradle it sort of works but I can't select anything in single mode and in multimode the done button does nothing.

I do get
Glide: Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency on com.github.bumptech.glide:compiler in your application and a @GlideModule annotated AppGlideModule implementation or LibraryGlideModules will be silently ignored

Is there something I miss currently min sdk is 23
Thank you

Convert Selected Images to Base64 strings

i try to convert base64 from selected images, I got error and app has been crashed(i got this error "Argument must not be null"). plz response as soon as possible

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.