You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when trying to upload an image, it's opening a chooser, once choose an item (images) it's closed chooser then in the browser nothing selected. After that even can't open the chooser again. chooser only opens once per app execution. I tested on my device android 10. please let me know how to handle the upload. Thanks
log
2020-12-19 18:21:08.570 21838-21838/? E/omitykeeper.ap: Unknown bits set in runtime_flags: 0x8000
2020-12-19 18:21:11.601 21838-21924/com.somitykeeper.app E/Perf: Fail to get file list com.somitykeeper.app
2020-12-19 18:21:11.601 21838-21924/com.somitykeeper.app E/Perf: getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array
2020-12-19 18:21:11.602 21838-21924/com.somitykeeper.app E/Perf: Fail to get file list com.somitykeeper.app
2020-12-19 18:21:11.602 21838-21924/com.somitykeeper.app E/Perf: getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array
2020-12-19 18:21:13.447 21838-21838/com.somitykeeper.app E/libc: Access denied finding property "ro.serialno"
It seems you have either not implemented all the methods and callbacks as shown in the README (very likely), or your app does not have the (runtime) permission to access storage (less likely).
@ocram I have a question, I am using Webview in Bottom Navigation With Nav Controler, I think the Problem was in the onActivityResult method for not working on upload tasks properly. what to do with onActivity Result? NB: Selecting Image Successful but nothing selected in the browser.
this one not working...
@Override public void onActivityResult(int requestCode, int resultCode, Intent intent) { super.onActivityResult(requestCode, resultCode, intent); mWebView.onActivityResult(requestCode, resultCode, intent); // ... }
how to try this one in the bottom nav with nav controller?
@Override public void onActivityResult(int requestCode, int resultCode, Intent intent) { super.onActivityResult(requestCode, resultCode, intent); if (mFragment != null) { mFragment.onActivityResult(requestCode, resultCode, intent); } }
In this video, i was trying to implement it in a fragment and i didn’t find
any solution, what i do that is, add a new activity and pass user from
fragment with intent and open Advance webview with Activity and upload task
working fine in activity.
On Sat, 30 Jan 2021, 11:41 pm Mehedi Hasan Emon, ***@***.***> wrote:
In this video, i was trying to implement it in a fragment and i didn’t
find any solution, what i do that is, add a new activity and pass user from
fragment with intent and open Advance webview with Activity and upload task
working fine in activity.
On Sat, 30 Jan 2021, 10:43 pm ilyassesalama, ***@***.***>
wrote:
> Everything related to permissions seems fine. Check this video, it
> explains the issue:
> https://photos.app.goo.gl/5DhMht59pNHC6XLR8
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#285 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ADMRBN5YDAIZTELENLTZXP3S4RANJANCNFSM4VCIJ5GA>
> .
>
Did anyone sort this query? I'm not going to call it an issue because being new to android dev it's all on me. I am running fragments with bottom navigation. The MainActivity handles all fragment changes. I have the same thing as previous posts. The page loads but when choose file is selected it opens the file chooser, doesn't add the file name on select and doesn't allow the chooser to be reopened until the App restarts. I have followed the README file and think it's the onActivityResult not passing correctly. Being new I'm unsure where to add this code. Wherever I put it mFragment turns red for an error! Like I said, complete newbie. Please be kind :)
Hello,
I am facing the same issue here. When click on upload it open a file chooser and on selecting an image it closes, and nothing happens. Attaching video link below. https://photos.app.goo.gl/FJu2qAtKPoTY6CD46
Testing on Android 12.
Runtime permissions are already given - read/write storage, microphone, camera.
I set advance Webview on activity, implemented all the methods, and followed the README file.
On debugging, I found out that onActivityResult is calling with the image path but not setting it in webview.
I had this problem too, but I’ve made it to work, so let me say something.
But I’m noob, correct me if something is wrong (especially Java terms).
An AdvancedWebView instance have member mActivity.
In AdvancedWebView code, when we choose file from webpage, protected void openFileInput is called, and in its procedure we see mActivity.get().startActivityForResult(...).
And there is truly an public void onActivityResult there, which is used to handle the chosen file(s).
However, in my case, it appeared that after initialization, mActivity is the activity of “my code”,
so that what being fired up was not AdvancedWebView.onActivityResult, but MyActivity.onActivityResult.
Hence, a “glue” is needed to make it work, though I don’t know if this is optimal:
Activity
[-]File Upload Not Working automatically[/-][+]Upload Not Working automatically[/+]mhemon commentedon Dec 23, 2020
@ocram please, give me a solution.
ocram commentedon Dec 30, 2020
It seems you have either not implemented all the methods and callbacks as shown in the README (very likely), or your app does not have the (runtime) permission to access storage (less likely).
mhemon commentedon Jan 14, 2021
@ocram I have a question, I am using Webview in Bottom Navigation With Nav Controler, I think the Problem was in the onActivityResult method for not working on upload tasks properly. what to do with onActivity Result? NB: Selecting Image Successful but nothing selected in the browser.
this one not working...
@Override public void onActivityResult(int requestCode, int resultCode, Intent intent) { super.onActivityResult(requestCode, resultCode, intent); mWebView.onActivityResult(requestCode, resultCode, intent); // ... }how to try this one in the bottom nav with nav controller?
@Override public void onActivityResult(int requestCode, int resultCode, Intent intent) { super.onActivityResult(requestCode, resultCode, intent); if (mFragment != null) { mFragment.onActivityResult(requestCode, resultCode, intent); } }mhemon commentedon Jan 14, 2021
@ocram Here is a video output which you can understand where the problem is :- https://photos.app.goo.gl/5DhMht59pNHC6XLR8
NB:- No Error Found in the Log cat
ilyassesalama commentedon Jan 29, 2021
I face same as your problem in the video, have you found a solution?
mhemon commentedon Jan 30, 2021
ilyassesalama commentedon Jan 30, 2021
I'm testing in an activity!
mhemon commentedon Jan 30, 2021
did you handle run time permission? there is no issue with the activity, just follow the code & add run time permission.
ilyassesalama commentedon Jan 30, 2021
Everything related to permissions seems fine. Check this video, it explains the issue:
https://photos.app.goo.gl/5DhMht59pNHC6XLR8
mhemon commentedon Jan 30, 2021
mhemon commentedon Jan 30, 2021
ilyassesalama commentedon Jan 30, 2021
What changes have you done to onActivityResult?
mhemon commentedon Jan 30, 2021
Nothing, just follow the doc in without fragment.
ilyassesalama commentedon Jan 30, 2021
I did, but when I pick a file it doesn't select, I'm running on Android 10
markzipps commentedon Apr 28, 2021
Did anyone sort this query? I'm not going to call it an issue because being new to android dev it's all on me. I am running fragments with bottom navigation. The MainActivity handles all fragment changes. I have the same thing as previous posts. The page loads but when choose file is selected it opens the file chooser, doesn't add the file name on select and doesn't allow the chooser to be reopened until the App restarts. I have followed the README file and think it's the onActivityResult not passing correctly. Being new I'm unsure where to add this code. Wherever I put it mFragment turns red for an error! Like I said, complete newbie. Please be kind :)
mhemon commentedon May 3, 2021
@markzipps no solution found for fragment. You can replace fragment to activity and follow the activity code in readme.
piyush921 commentedon Jun 11, 2022
Hello,
I am facing the same issue here. When click on upload it open a file chooser and on selecting an image it closes, and nothing happens. Attaching video link below.
https://photos.app.goo.gl/FJu2qAtKPoTY6CD46
Testing on Android 12.
Runtime permissions are already given - read/write storage, microphone, camera.
I set advance Webview on activity, implemented all the methods, and followed the README file.
On debugging, I found out that onActivityResult is calling with the image path but not setting it in webview.
If anyone want to see the code
https://drive.google.com/file/d/1iLV87C1SfwjsumkXmKNehr36SoZlV6GJ/view?usp=sharing
NaitLee commentedon Sep 6, 2022
I had this problem too, but I’ve made it to work, so let me say something.
But I’m noob, correct me if something is wrong (especially Java terms).
An
AdvancedWebViewinstance have membermActivity.In AdvancedWebView code, when we choose file from webpage,
protected void openFileInputis called, and in its procedure we seemActivity.get().startActivityForResult(...).And there is truly an
public void onActivityResultthere, which is used to handle the chosen file(s).However, in my case, it appeared that after initialization,
mActivityis the activity of “my code”,so that what being fired up was not
AdvancedWebView.onActivityResult, butMyActivity.onActivityResult.Hence, a “glue” is needed to make it work, though I don’t know if this is optimal:
P.S. Indeed I got this in May, but forgot to leave a message here. Sorry.