Closed fingdo closed 6 years ago
@fingdo Is that only happen when you open a specific view or dialog?
This snapshot should help
implementation 'com.github.tarek360:instacapture:fix~NoSuchFieldException-SNAPSHOT'
but please tell me, is that only happen when you open a specific view or dialog? or it happens with all of the views on OPPO R9?
I had fix this bug.this bug because OPPO R9s Rom change framework.jar, mRoots
haven't mView
this field.the Rom is WindowManager
have mViews
.
this is code.
ArrayList<View> views = (ArrayList<View>) getFieldValue("mViews", windowManager);
if (views != null && views.size() > 0) {
view = views.get(0);
}
This bug is try capture the screenshot,OPPO R9s Rom change framework.jar,this will be crash in OPPO R9s and OPPO R9s Plus.Thank you for your answer.
I see your fix bug commit, this can prevent crash, but catch the exception and can't capture the screenshot.you can try my solution.
@fingdo Cool! 👍 could you create a pull request for that? or if you can't I will make it tonight.
ok,I will pull request an hour later
my Kotlin level just read the document.you can check the commit and optimize the code.
@fingdo now you can use the new release, and if the issue is fixed, feel free to close it, thanks 👍
compile "com.github.tarek360:instacapture:2.0.0"
I will run 2.0.0
in OPPO R9s monday.