๐ค ๐ง
sangcomz / fishbun Goto Github PK
View Code? Open in Web Editor NEW:blowfish:FishBun is Image Picker for android.
License: Apache License 2.0
:blowfish:FishBun is Image Picker for android.
License: Apache License 2.0
๐ค ๐ง
In PickerActivity,DisplayImage method NullPointerException on getImgPath
Code :
@Override
protected String doInBackground(String... params) {
boolean flag = true;
while (flag) {
if (imageBeans[0] != null && imageBeans[0].getImgPath().length() > 0) {
flag = false;
}
}
return "ok";
}
Exception message:
NullPointerException (@a:doInBackground:-1) {Crash Report Thread:AsyncTask #3 Exception:java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:300) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) at java.util.concurrent.FutureTask.setException(FutureTask.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 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) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference at **com.sangcomz.fishbun.ui.picker.a.doInBackground**(Unknown Source) at android.os.AsyncTask$2.call(AsyncTask.java:288) at java.util.concurrent.FutureTask.run(FutureTask.java:237) ... 4 more }
It seems that imgPath is null in imageBeans[0].getImgPath().
OS version : 5.0.2
Device : HTC Desire 826
Hi,is there any method to view selected images first then sorted as usual ?,i.e. if user select some images and go through same folder again then I want to show selected images first for that folder.
Anyway,Thanks for great library.
์ง๊ธ์
startActivityForResult ๊ฐ activity์์๋ง ์คํ๋๋๋ฐ
fragment์์๋ startActivityForResult ์คํ๋๊ฒ ํด์ฃผ์ธ์
A feature to change the text of the SnackBar will be great.
Something like:
FishBun.with(this)
.textOnNothingSelected("You did not select any images")
.textOnImagesSelectionLimitReached("You are not allowed to select more images")
.startAlbum();
Please, add checking android version to your UiUtil.setStatusBarColor()
Launch the demo app in the Play Store
์ฌ์ง์ ์ ํํ ๋ ์์ ์จ๋ฒ์ด๋ผ๋๊ธ์จ๋ฅผ ์์ ํ ์ ์์๊น์?
๋ํ ์จ๋ฒ์ ์ ํํ ์ ์๋ ๋ทฐ๋ฅผ ์ปค์คํ ํ ์ ์์๊น์?
์จ๋ฒ ์ฌ์ด์ฆ์ ํจ๋ฉ์ ๋ฃ์์ ์๋ค๋์ง. ํ๋จ์ ๊ณ ์ ๋ด๋น๊ฒ์ด์ ์ ๋ฃ๋๋ค๋์ง..
๋ผ์ด๋ธ๋ฌ๋ฆฌ ๊ฐ์ฌํฉ๋๋ค.
plz able modify Actionbar text & Adding Custom View (ex. fixed bottom nav)
thx
์ด๋ฏธ์ง๋ฅผ ์ ํ ์ํ๊ณ ์ฐ์ธก ์๋จ ์๋ฃ ๋ฒํผ ํด๋ฆญ์
java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.ArrayList com.sangcomz.fishbun.adapter.AlbumListAdapter.getPath()' on a null object reference
at com.sangcomz.fishbun.ui.album.AlbumActivity.onOptionsItemSelected(AlbumActivity.java:362)
์๋ฌ ๋ฐ์ํด์
๊ทธ๋ฆฌ๊ณ
์ ์ฅ๋ ์ด๋ฏธ์ง๊ฐ ์์์ ์นด๋ฉ๋ผ ๋ฒํผ๋ ์๋ณด์ฌ์
๋ณด์ด๊ฒ ํ ์ ์๋์
This is really good effort . There is only one thing it would be best if we are allowed to select all the photos using "select all" functionality. I will be very thankful :)
use one more fishbun.
Fatal Exception: java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:309)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by android.database.sqlite.SQLiteException: unable to open database file (code 14)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:179)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:421)
at android.content.ContentResolver.query(ContentResolver.java:497)
at android.content.ContentResolver.query(ContentResolver.java:439)
at com.sangcomz.fishbun.ui.album.AlbumActivity.getAllMediaThumbnailsPath(AlbumActivity.java:312)
at com.sangcomz.fishbun.ui.album.AlbumActivity.access$500(AlbumActivity.java:36)
at com.sangcomz.fishbun.ui.album.AlbumActivity$DisplayThumbnail.doInBackground(AlbumActivity.java:271)
at com.sangcomz.fishbun.ui.album.AlbumActivity$DisplayThumbnail.doInBackground(AlbumActivity.java:257)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
0.6.2
7.1
LG
Nexus 5x
Build
Warning:Exception while processing task java.io.IOException: proguard.ParseException: Expecting java type before ';' in line 18 of file '.../app/build/intermediates/exploded-aar/com.sangcomz/FishBun/0.6.2/proguard.txt'
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
Job failed, see logs for details
FishBun crash when "Deny Permission" is clicked, instead of returning an error for the calling app to handle gracefully.
Got stuck on clicking yes mark after image selection, if i get the total count of images from media controller and put it in if condition as example if i limit for 5 images, and i choose 4 images it dont stuck n back to fragment, but as soon as i choose fifth one and tap on done button it got stuck, but it goes to fragment, even stuck for 2-3 seconds, i do some watermark stuff and bitmap to uri convertion in onactivityresult, can some buddy help me, i dont understand issue, and im handling Arraylist items using image count as i need path of all 5 images if i dont put img count condition it gives error for index
It seems that something has changed in Android Nougat as how you are allowed to access files.
I get the following crash when compiling against target 24 Android N and trying to take a picture through FishBun.
android.os.FileUriExposedException: file:///storage/emulated/0/DCIM/Camera/JPEG_20161017_092213_1790801674.jpg exposed beyond app through ClipData.Item.getUri() at android.os.StrictMode.onFileUriExposed(StrictMode.java:1799) at android.net.Uri.checkFileUriExposed(Uri.java:2346) at android.content.ClipData.prepareToLeaveProcess(ClipData.java:832) at android.content.Intent.prepareToLeaveProcess(Intent.java:8909) at android.content.Intent.prepareToLeaveProcess(Intent.java:8894) at android.app.Instrumentation.execStartActivity(Instrumentation.java:1517) at android.app.Activity.startActivityForResult(Activity.java:4224) at android.support.v4.app.BaseFragmentActivityJB.startActivityForResult(BaseFragmentActivityJB.java:48) at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:75) at android.app.Activity.startActivityForResult(Activity.java:4183) at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:856) at com.sangcomz.fishbun.ui.picker.PickerController.takePicture(PickerController.java:88) at com.sangcomz.fishbun.adapter.PickerGridAdapter$1.onClick(PickerGridAdapter.java:92) at android.view.View.performClick(View.java:5609) at android.view.View$PerformClick.run(View.java:22262) ...
When reach limit of selection, automatic close.
Example, .setPickerCount(1) when select 1 image, close with selected image :)
Awsome, library!!!
Ty
I'd like to change toolbar's OK menu icon to text "Next"
So it would be nice if it supports options like "Change ok(or cancel) menu text string" / "Change ok(or cancel) menu text color" / "Change ok(or cancel) menu text size"
Thanks!
If device is clean (if it has no images), we can see item in list on first screen:
"0 Views"
When I click on it, it crahses on second creen because of two moments:
in getAllMediaThumbnailsPath() becuase cursor has no elements
in DisplayImage.doInBackground because imageBeans size = 0
How can I change the color of the toolbar icons and the background color of the status bar?
In some very slow phones, it takes some seconds to display pictures in AlbumActivity, and user will see: "There is no picture", this is not a correct message, it should be changed to "loading" or something else. Only after finish loading all the picutre gallery, and there is no picture, the message should be "There is no picture"
I have fix this problem in reallychenchi@c6bf058
Would you please review the code and help to merge it? I don't know how to commit the code to your master branch.
Hello, I got a leak from the BaseProperty in FishBun class. Below is what I got from LeakCanary:
In com.bla:1.0:1.
* com.bla.activities.CreateAdActivity has leaked:
* GC ROOT static com.sangcomz.fishbun.FishBun.baseProperty
* references com.sangcomz.fishbun.FishBun$BaseProperty.context
* leaks com.bla.activities.CreateAdActivity instance
* Reference Key: 29e7fa3b-8067-4189-8d00-f564c57888bd
* Device: Genymotion generic Google Nexus 5 - 5.1.0 - API 22 - 1080x1920 vbox86p
* Android Version: 5.1 API: 22 LeakCanary: 1.3.1
* Durations: watch=5010ms, gc=113ms, heap dump=650ms, analysis=2721ms
* Details:
* Class com.sangcomz.fishbun.FishBun
| static $staticOverhead = byte[] [id=0x1317fb41;length=8;size=24]
| static baseProperty = com.sangcomz.fishbun.FishBun$BaseProperty [id=0x12e554d0]
* Instance of com.sangcomz.fishbun.FishBun$BaseProperty
| arrayPaths = java.util.ArrayList [id=0x12c269e0]
| context = com.bla.activities.CreateAdActivity [id=0x12d6f180]
* Instance of com.bla.activities.CreateAdActivity
| mAddImageButton = android.support.v7.widget.AppCompatImageButton [id=0x13151800]
| mButtonContainer = android.widget.FrameLayout [id=0x13151400]
| mImageContainer = android.widget.RelativeLayout [id=0x13150400]
| mImageView = android.support.v7.widget.AppCompatImageView [id=0x13150800]
| mPaths = java.util.ArrayList [id=0x13046d20]
| mProgressBar = me.zhanghai.android.materialprogressbar.MaterialProgressBar [id=0x13150c00]
| mSubCategory = com.bla.models.SubCategory [id=0x1319df60]
| mToolbar = android.support.v7.widget.Toolbar [id=0x1314e000]
| metEmail = com.bla.utilities.ui.MaterialEditText [id=0x1319e3c0]
| mDelegate = android.support.v7.app.AppCompatDelegateImplV14 [id=0x13159dd0]
| mCreated = true
| mFragments = android.support.v4.app.FragmentController [id=0x130365f0]
| mHandler = android.support.v4.app.FragmentActivity$1 [id=0x13163fe0]
| mMediaController = null
| mOptionsMenuInvalidated = false
| mReallyStopped = true
| mRequestedPermissionsFromFragment = false
| mResumed = false
| mRetaining = false
| mStopped = true
| mActionBar = null
| mActivityInfo = android.content.pm.ActivityInfo [id=0x12f6b180]
| mActivityTransitionState = android.app.ActivityTransitionState [id=0x130240c0]
| mAllLoaderManagers = android.util.ArrayMap [id=0x1319eb60]
| mApplication = com.bla.BlaApplication [id=0x12c84910]
| mCalled = true
| mChangeCanvasToTranslucent = false
| mChangingConfigurations = false
| mCheckedForLoaderManager = true
| mComponent = android.content.ComponentName [id=0x130b4080]
| mConfigChangeFlags = 0
| mContainer = android.app.Activity$1 [id=0x130365c0]
| mCurrentConfig = android.content.res.Configuration [id=0x130a8e20]
| mDecor = null
| mDefaultKeyMode = 0
| mDefaultKeySsb = null
| mDestroyed = true
| mDoReportFullyDrawn = false
| mEmbeddedID = null
| mEnableDefaultActionBarUp = false
| mEnterTransitionListener = android.app.SharedElementCallback$1 [id=0x7169c768]
| mExitTransitionListener = android.app.SharedElementCallback$1 [id=0x7169c768]
| mFinished = true
| mFragments = android.app.FragmentManagerImpl [id=0x12f39580]
| mHandler = android.os.Handler [id=0x13163fc0]
| mIdent = 874714590
| mInstanceTracker = android.os.StrictMode$InstanceTracker [id=0x130365d0]
| mInstrumentation = android.app.Instrumentation [id=0x12c58fb0]
| mIntent = android.content.Intent [id=0x13021080]
| mLastNonConfigurationInstances = null
| mLoaderManager = null
| mLoadersStarted = false
| mMainThread = android.app.ActivityThread [id=0x12c3d100]
| mManagedCursors = java.util.ArrayList [id=0x13163f80]
| mManagedDialogs = null
| mMenuInflater = null
| mParent = null
| mReferrer = java.lang.String [id=0x12c7b5e0]
| mResultCode = 0
| mResultData = null
| mResumed = false
| mSearchManager = null
| mStartedActivity = false
| mStopped = true
| mTemporaryPause = false
| mTitle = java.lang.String [id=0x12e85640]
| mTitleColor = 0
| mTitleReady = true
| mToken = android.os.BinderProxy [id=0x12c7b1c0]
| mTranslucentCallback = null
| mUiThread = java.lang.Thread [id=0x74d52000]
| mVisibleBehind = false
| mVisibleFromClient = true
| mVisibleFromServer = true
| mVoiceInteractor = null
| mWindow = com.android.internal.policy.impl.PhoneWindow [id=0x12d5ae00]
| mWindowAdded = true
| mWindowManager = android.view.WindowManagerImpl [id=0x13167200]
| mInflater = com.android.internal.policy.impl.PhoneLayoutInflater [id=0x13162c40]
| mOverrideConfiguration = null
| mResources = android.content.res.Resources [id=0x12c068e0]
| mTheme = android.content.res.Resources$Theme [id=0x13167220]
| mThemeResource = 2131427383
| mBase = android.app.ContextImpl [id=0x12f27900]
thanks a lot
0.6.3
6.0.1
Motorola
G4 Play
Insert an image.
getStringArrayListExtra(Define.INTENT_PATH) will return a string array.
Exception thrown at onActivityResult() -> data.getStringArrayListExtra(Define.INTENT_PATH)
java.lang.ClassCastException: android.net.Uri$HierarchicalUri cannot be cast to java.lang.String
In Fishbun 0.5.0 to 0.6.0, getStringArrayListExtra(Define.INTENT_PATH) returned string array as expected.
์๋
ํ์ธ์
์ข์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ ๊ณตํด์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค.
ํ์ฌ๋ ๋ด๋ถ ์ ์ฅ์์ ์๋ ์ฌ์ง๋ค๋ง ๋ถ๋ฌ์ค๋๋ฐ
ํน์ ์ธ์คํ๊ทธ๋จ, ํ์ด์ค๋ถ ๊ฐ์ ์๋ฒ์ ์๋ url ๋ก ๋ถ๋ฌ์ค๋ ๊ธฐ๋ฅ์ ๋ฐ๋ก ์๋์ง์?
if exists gif file, glide loading performance issue occured.
Use this.
Glide
.with(vh.imgPhoto.getContext())
.load(new File(imgPath))
.asBitmap()// <- get gif first frame, convert to bitmap.
.override(Define.PHOTO_PICKER_SIZE, Define.PHOTO_PICKER_SIZE)
.centerCrop()
.into(vh.imgPhoto);
crash when "<-" (backarrow) button on toolbar is pressed after screen is rotated. (adapter becomes null).
Caused by: java.lang.NullPointerException
at com.sangcomz.fishbun.ui.album.AlbumActivity.onActivityResult(AlbumActivity.java:156)
at android.app.Activity.dispatchActivityResult(Activity.java:5650)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3677)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3063)ย
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3105)ย
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)ย
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4054)ย
at android.app.ActivityThread.access$1000(ActivityThread.java:175)ย
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1314)ย
at android.os.Handler.dispatchMessage(Handler.java:102)ย
at android.os.Looper.loop(Looper.java:146)ย
at android.app.ActivityThread.main(ActivityThread.java:5602)ย
at java.lang.reflect.Method.invokeNative(Native Method)ย
at java.lang.reflect.Method.invoke(Method.java:515)ย
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)ย
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)ย
at dalvik.system.NativeStart.main(Native Method)ย
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.app.ActionBar.setDisplayHomeAsUpEnabled(boolean)' on a null object reference
at com.sangcomz.fishbun.ui.album.AlbumActivity.onCreate(AlbumActivity.java:44)
at android.app.Activity.performCreate(Activity.java:5953)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1128)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2267)
ย ย ย ย ย ย ย ย ย ย ย ย at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2388)
ย ย ย ย ย ย ย ย ย ย ย ย at android.app.ActivityThread.access$800(ActivityThread.java:148)
ย ย ย ย ย ย ย ย ย ย ย ย at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1292)
ย ย ย ย ย ย ย ย ย ย ย ย at android.os.Handler.dispatchMessage(Handler.java:102)
ย ย ย ย ย ย ย ย ย ย ย ย at android.os.Looper.loop(Looper.java:135)
ย ย ย ย ย ย ย ย ย ย ย ย at android.app.ActivityThread.main(ActivityThread.java:5312)
ย ย ย ย ย ย ย ย ย ย ย ย at java.lang.reflect.Method.invoke(Native Method)
ย ย ย ย ย ย ย ย ย ย ย ย at java.lang.reflect.Method.invoke(Method.java:372)
ย ย ย ย ย ย ย ย ย ย ย ย at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
ย ย ย ย ย ย ย ย ย ย ย ย at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
If I pass max photos as 20. after the user picks 20 and if they try to select on 21, it will show the popup.
Thanks in advance.
Everything works great.
One thing I want to suggest is "detail view".
In many apps (like Instagram) if you select thumbnail you can see preview right away or you can touch(or long press) thumbnail and it show another detail preview. And you can pinch in & out in the detail view.
As below screenshot, it would be perfect if FishBun support detail view.
(From: https://github.com/martin90s/ImagePicker)
Thanks for making good library.
albumActivity, pickerActicity ์์ ํ์
fishbundemo ์์ ํ์
add feature
์นด๋ฉ๋ผ ์ดฌ์์ ์๋ฌ๋๋ฉด์ ์ฑ์ด์ฃฝ๋ค์...
์ด๋ฏธ์ง ์ ํํ onActivityResult ๋ ํธ์ถ์ด ์๋ฉ๋๋ค.
07-04 13:27:07.842 11449-11449/com.teamnova.gunter.glidetest E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.teamnova.gunter.glidetest, PID: 11449
java.lang.RuntimeException: Unable to resume activity {com.teamnova.gunter.glidetest/com.sangcomz.fishbun.ui.picker.PickerActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=128, result=-1, data=null} to activity {com.teamnova.gunter.glidetest/com.sangcomz.fishbun.ui.picker.PickerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.sangcomz.fishbun.adapter.PickerGridAdapter.addImage(java.lang.String)' on a null object reference
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3403)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3434)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2772)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4471)
at android.app.ActivityThread.access$1000(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1455)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5951)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=128, result=-1, data=null} to activity {com.teamnova.gunter.glidetest/com.sangcomz.fishbun.ui.picker.PickerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.sangcomz.fishbun.adapter.PickerGridAdapter.addImage(java.lang.String)' on a null object reference
at android.app.ActivityThread.deliverResults(ActivityThread.java:4067)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3389)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3434)ย
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2772)ย
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4471)ย
at android.app.ActivityThread.access$1000(ActivityThread.java:177)ย
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1455)ย
at android.os.Handler.dispatchMessage(Handler.java:102)ย
at android.os.Looper.loop(Looper.java:145)ย
at android.app.ActivityThread.main(ActivityThread.java:5951)ย
at java.lang.reflect.Method.invoke(Native Method)ย
at java.lang.reflect.Method.invoke(Method.java:372)ย
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)ย
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)ย
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.sangcomz.fishbun.adapter.PickerGridAdapter.addImage(java.lang.String)' on a null object reference
at com.sangcomz.fishbun.ui.picker.PickerActivity.onActivityResult(PickerActivity.java:75)
at android.app.Activity.dispatchActivityResult(Activity.java:6549)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4063)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3389)ย
at
android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3434)ย
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2772)ย
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4471)ย
at android.app.ActivityThread.access$1000(ActivityThread.java:177)ย
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1455)ย
at android.os.Handler.dispatchMessage(Handler.java:102)ย
at android.os.Looper.loop(Looper.java:145)ย
at android.app.ActivityThread.main(ActivityThread.java:5951)ย
at java.lang.reflect.Method.invoke(Native Method)ย
at java.lang.reflect.Method.invoke(Method.java:372)ย
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)ย
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)ย
can set light status bar
This exception has appeared in app analytics tracker, while using FishBun 0.5.0:
NullPointerException (@PickerActivity:onActivityResult:75
Device: HTC One M7, Android version: 5.0.2
I set camera available for the app. But after app capturing a photo, it crashes.
Android 5.1 on Samsung Galaxy S4.
IMO the menu item title "Camera" should change to something like "Done", or simply be customizable.
i.e. android:title here:
<item
android:id="@+id/action_ok"
android:icon="@mipmap/ic_ok"
app:showAsAction="withText|ifRoom"
android:title="@string/camera"/>
When opening the gallery, entring a specific directory, choosing several photos then navigating back - there is no "Done" or V button. In order to complete the selection, one must enter an album again then press the appearing V.
It would be cool if you could add a V button even in the main view, when there are already photos selected.
Hello, FishBun is really very good image picker, and the code is excellent! You must be a very good programmer and I study a lot from your code.
There is some problem with FishBun in Android M, that it can not display a lot of pictures. I found the problem is solved by using uri to record the picture, and now FishBun use the path of picture file.
I didn't found the root reason for this problem, just replace all the path of picture file with uri of the picture and problem sloved.
Would you consider to uri of picture instead of file path? for example change ImageBean.imgPath to Uri
Hi, first thanks for sharing the library!
I encountered an issue with the picker numbers (the number overlay). When I select images in the picker, for example selecting 1,2,3,4,5 and then deselecting 3, the picker tries to reorder the numbers on the UI but it fails. I noticed sometimes it will replace all of them with the last selected number (e.g 5,5,5,5,5) and sometimes it will repeat the last two numbers.
Also when I was trying to reproduce this issue by selectiing and deselecting images, the picker crashed with this error:
E AndroidRuntime: java.lang.IndexOutOfBoundsException: Invalid index 2, size is 1
11-30 22:34:40.392 27780 27780 E AndroidRuntime: at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
11-30 22:34:40.392 27780 27780 E AndroidRuntime: at java.util.ArrayList.remove(ArrayList.java:403)
11-30 22:34:40.392 27780 27780 E AndroidRuntime: at com.sangcomz.fishbun.adapter.PickerGridAdapter$1.onClick(PickerGridAdapter.java:125)
11-30 22:34:40.392 27780 27780 E AndroidRuntime: at android.view.View.performClick(View.java:5198)
11-30 22:34:40.392 27780 27780 E AndroidRuntime: at android.view.View$PerformClick.run(View.java:21147)
11-30 22:34:40.392 27780 27780 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739)
11-30 22:34:40.392 27780 27780 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
11-30 22:34:40.392 27780 27780 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
11-30 22:34:40.392 27780 27780 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
11-30 22:34:40.392 27780 27780 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-30 22:34:40.392 27780 27780 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-30 22:34:40.392 27780 27780 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Let me know if you need more details. Thanks.
I have this crash as soon as I execute this:
FishBun.with(EditTripFragment.this).startAlbum();
With the 0.3 version it is ok. With the 0.4.4 I got this error
04-03 17:50:20.504 16645-16645/mypackage E/AndroidRuntime: FATAL EXCEPTION: main Process: mypackage, PID: 16645 java.lang.NoClassDefFoundError: Failed resolution of: Lrx/subjects/PublishSubject; at com.sangcomz.fishbun.ui.album.AlbumActivity.onCreate(AlbumActivity.java:81) at android.app.Activity.performCreate(Activity.java:5976) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2297) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2404) at android.app.ActivityThread.access$800(ActivityThread.java:145) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1323) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5319) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1016) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811) Caused by: java.lang.ClassNotFoundException: Didn't find class "rx.subjects.PublishSubject" on path: DexPathList[[zip file "/data/app/mypackage-2/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at com.sangcomz.fishbun.ui.album.AlbumActivity.onCreate(AlbumActivity.java:81)ย at android.app.Activity.performCreate(Activity.java:5976)ย at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)ย at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2297)ย at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2404)ย at android.app.ActivityThread.access$800(ActivityThread.java:145)ย at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1323)ย at android.os.Handler.dispatchMessage(Handler.java:102)ย at android.os.Looper.loop(Looper.java:135)ย at android.app.ActivityThread.main(ActivityThread.java:5319)ย at java.lang.reflect.Method.invoke(Native Method)ย at java.lang.reflect.Method.invoke(Method.java:372)ย at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1016)ย at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)ย Suppressed: java.lang.ClassNotFoundException: rx.subjects.PublishSubject at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 15 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available 04-03 17:50:20.636 924-1291/? E/InputDispatcher: channel '1470f85d mypackage/mypackage.app.HomeActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
0.6.0
7.1.1
Samsung
S3
Tap Camera icon to take picture.
Take a picture.
Crashed after tapping the camera icon.
02-22 11:19:22.968 5368-5368/com.appmindlab.nano E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.appmindlab.nano, PID: 5368
android.os.FileUriExposedException: file:///storage/emulated/0/DCIM/Camera/JPEG_20170222_111922_35498973.jpg exposed beyond app through ClipData.Item.getUri()
at android.os.StrictMode.onFileUriExposed(StrictMode.java:1799)
at android.net.Uri.checkFileUriExposed(Uri.java:2346)
at android.content.ClipData.prepareToLeaveProcess(ClipData.java:845)
at android.content.Intent.prepareToLeaveProcess(Intent.java:8957)
at android.content.Intent.prepareToLeaveProcess(Intent.java:8942)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1519)
at android.app.Activity.startActivityForResult(Activity.java:4225)
at android.support.v4.app.BaseFragmentActivityJB.startActivityForResult(BaseFragmentActivityJB.java:50)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:79)
at android.app.Activity.startActivityForResult(Activity.java:4183)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:859)
at com.sangcomz.fishbun.ui.picker.PickerController.takePicture(PickerController.java:88)
at com.sangcomz.fishbun.adapter.PickerGridAdapter$1.onClick(PickerGridAdapter.java:92)
at android.view.View.performClick(View.java:5637)
at android.view.View$PerformClick.run(View.java:22433)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6126)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
(Note: no crash when tested under Android 6.0.1)
need compile
-dontwarn rx.internal.util.unsafe.**
need runtime
-keep class com.sangcomz.fishbun.bean.** { ; }
when i used with
-optimizationpasses 5
-allowaccessmodification
-overloadaggressively
There is setActionBarColor() to change the background color of ActionBar, but I cannot find how to change color of the texts (and those done and back icons).
After capturing photo with camera, two photos are saved in some gallery album that was previously selected.
Fatal Exception: java.lang.ArrayIndexOutOfBoundsException: length=24; index=24
at com.sangcomz.fishbun.ui.picker.PickerActivity.getAllMediaThumbnailsPath(Unknown Source)
at com.sangcomz.fishbun.ui.picker.PickerActivity.getAllMediaThumbnailsPath(Unknown Source)
at com.sangcomz.fishbun.ui.picker.PickerActivity$DisplayImage$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:841)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.