Hello. That's very possible. You just need to check for key events like so: @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if ((keyCode == KeyEvent.KEYCODE_BACK) && webView.canGoBack()) { webView.goBack(); return true; } return super.onKeyDown(keyCode, event); } NB: This should be outside of the onCreate and the WebViewClient Class. Also for those wondering how to hide the ActionBar, use this: getSupportActionBar().hide(); Plus, I've updated the repo to support your request. You can find it in the video description. Regards.
That you. I have corrected that already. Thanks for the help. Please do a video tutorial of how to configure push notifications on the app. it will be so very helpful.
This is a short implementation @Override public void onBackPressed() { if (webView.canGoBack()) { webView.goBack(); } else { super.onBackPressed(); } }
OK. That's the application name. Go to your res folder there you'll see an xml file called strings.xml. Modify this line Add Your App Name . There you go
thenks sur!,,, Is there a function so that when the Internet is cut off, it does not work WebView and when the Internet returns, it works WebView automatically ,And when the internet is weak it works "is Loading"or "circiller progresidec idicaitor"
I am create education application from news application which is licensed and I am getting it from youtube then how I could use this for my application and there is coming any legal issues for use it and publishing application and if not then what changes is required
If you know the URL of the news site, sure you can bundle that onto your app. If didn't build and don't own the news site, you will have to request permission from the owners to avoid litigation.
how to open any or all external link (target = _blank) links in other activity window. in web view project. plz make a complete video tutorial about this topic. i didn't find any video on RUclips for this topic
i have a video download website ,i have made my webview app for downloading websites, but in webview app, download is not working. but if I don't use webviewclient and if I open my app with other browser download is working. please make a video about how to write a program to support download in webview or advanced webview app.
sir mere website me userapna current location fetch kar sakta he but vhi webview app me ni ho rha mene apke anusar app bana liya he but location work ni kar rha can u help sir please?
Important update: For those that are getting errors because their websites are not SSL enabled, I have done a workaround on the code to support both http and https. I wrote a code to check for SSL error and also added this dependency, android:usesClearTextTraffic = "true" to the Android manifest file. I have also updated the GitHub repo, which is available in the video description. Regards.
Sir in webview how can i give the user to offline download Feature of videos which will not be visible on phone but that should be only available on App📱 Please solve my issue, its urgent also
OK. This is a great question. What you can do is to store your videos offline using SQLite, for instance. Then you can check if the app is offline and redirect the user to the offline page.
@@codeflaretech sir i want to store the offline download data to user device with hidden directory and how could i do this please help me my mail id is skst000786@gmail.com or my whatsapp number is +91 7076065439
@@saddamskst2 OK. The first thing to do is store your files offline using database like SQLite, for example. Then you can check for network connection when the app loads. If there's no network connection, you can redirect the user to your offline page where the video can be downloaded. That's the process you have to follow.
Hi, I want to ask you, I have some difficulty in showing the error page, I copied the code in Main activity, made the asset folder, html file was uploaded but it didn't show, I have made the changes only in the Main file, Am I suppose to make the changes anywhere else as well? (For url loading error only)
Yes bro, very possible. Just to add your button, set OnclickListner for it and then add the code for the refresh function so that what you achieve when you swipe, you can also achieve when you click on that button. Cheers.
@@codeflaretech nice ill try this so do i have to do the same what you did on the swipe i will have to declare it on the main activity? or i can re use the swipe function?.. And last bro.. U think it would be possible to have bell icon and when new push notifcation from Firebase mesage or Onesignal, autmatically that bell icon will appear the count of notifications..
@@mulkproject687 Yes, you will have to declare the button in your MainActivity by using findViewById and then setting OnclickListner for it. And yes, you can add push notifications from firebase as well. You will have to first add firebase to your app to get started.
@@codeflaretech bro, i have this modal forms in my website when using webview those form wont submit just doing nothing its keeps of freezing.. But if uses browser it works..
My code is similar to you,but i am getting this error:Attempt to invoke virtual method 'void androidx.swiperefreshlayout.widget.SwipeRefreshLayout.setOnRefreshListener(androidx.swiperefreshlayout.widget.SwipeRefreshLayout$OnRefreshListener)' on a null object reference at com.multiinstamessengerandposter.MainActivity.onCreate(MainActivity.java:88).please help.
Hi Shorifa, this means that you probably forgot to implement the findViewById feature for the swipeRefreshLayout. Go to your xml file check for the id and call it in your Java file.
OK. Just add this to your manifest file: android:configChanges=”orientation|screenSize” That should do the trick. Also if you prefer to lock rotation to portrait, add this: android:screenOrientation="portrait" Regards.
@@codeflaretech I run on android 10, i made a webpage to upload file, with jquery filereader to show file's thumbnail before uploaded On my android, image file from sdcard shows perfectly, but image file captured by camera doesnt shows But on the android 7-9, they're all shows
@@codeflaretech oh and i'm not directly upload file from input type='file', but i create a canvas to draw the thumbnail to reduce its size then upload the canvas The image captured by camera doesnt show its thumbnail, so my canvas draws nothing
the code works for me but I find that when I go back using the Phone's back button, it exits the app. How to fix this please?
Hello. That's very possible. You just need to check for key events like so:
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK) && webView.canGoBack()) {
webView.goBack();
return true;
}
return super.onKeyDown(keyCode, event);
}
NB: This should be outside of the onCreate and the WebViewClient Class.
Also for those wondering how to hide the ActionBar, use this:
getSupportActionBar().hide();
Plus, I've updated the repo to support your request. You can find it in the video description.
Regards.
That you. I have corrected that already. Thanks for the help. Please do a video tutorial of how to configure push notifications on the app. it will be so very helpful.
This is a short implementation
@Override
public void onBackPressed() {
if (webView.canGoBack()) { webView.goBack(); }
else { super.onBackPressed(); }
}
Nice video and well explained. Could you kindly show us how to add bottom navigation to the webview app?
Can you do a image upload with camera support and also do a bluetooth printing support? thank you so much your code is so much helpfull
how to order
disable swiperefreshlayout in the bootstrap modal..?
Nice lesson...
Bro, may i ask something ?
How could to remove text WEBVIEW on the top(header) of the apps ?
OK. That's the application name. Go to your res folder there you'll see an xml file called strings.xml. Modify this line
Add Your App Name . There you go
@@codeflaretech thanks man... I will try...
@@littlestar2322 All right. Regards bro.
Hello, It keeps returning back to Base Url when page os refreshed!
thenks sur!,,,
Is there a function so that when the Internet is cut off,
it does not work WebView and when the Internet returns,
it works WebView automatically ,And when the internet is weak it works "is Loading"or "circiller progresidec idicaitor"
I am create education application from news application which is licensed and I am getting it from youtube then how I could use this for my application and there is coming any legal issues for use it and publishing application and if not then what changes is required
If you know the URL of the news site, sure you can bundle that onto your app. If didn't build and don't own the news site, you will have to request permission from the owners to avoid litigation.
how to open any or all external link (target = _blank) links in other activity window. in web view project. plz make a complete video tutorial about this topic.
i didn't find any video on RUclips for this topic
OK. I will do one soon. You can subscribe so that you'll get notified when I upload it.
i have a video download website ,i have made my webview app for downloading websites, but in webview app, download is not working. but if I don't use webviewclient and if I open my app with other browser download is working. please make a video about how to write a program to support download in webview or advanced webview app.
Learned a lot. Well Done!
Can you please make video on how to remove footer in webview
sir mere website me userapna current location fetch kar sakta he but vhi webview app me ni ho rha
mene apke anusar app bana liya he but location work ni kar rha can u help sir please?
Important update:
For those that are getting errors because their websites are not SSL enabled, I have done a workaround on the code to support both http and https. I wrote a code to check for SSL error and also added this dependency, android:usesClearTextTraffic = "true"
to the Android manifest file.
I have also updated the GitHub repo, which is available in the video description.
Regards.
Awesome. Thanks
Delay mills how you give in android studio I am trying not showing please help me any short cut
U
Sir in webview how can i give the user to offline download Feature of videos which will not be visible on phone but that should be only available on App📱
Please solve my issue, its urgent also
OK. This is a great question.
What you can do is to store your videos offline using SQLite, for instance. Then you can check if the app is offline and redirect the user to the offline page.
@@codeflaretech sir i want to store the offline download data to user device with hidden directory and how could i do this please help me my mail id is skst000786@gmail.com or my whatsapp number is +91 7076065439
@@codeflaretech i will wait for your reply sir
@@codeflaretech sir please reply i want offline download feature like youtube▶️
@@saddamskst2 OK. The first thing to do is store your files offline using database like SQLite, for example.
Then you can check for network connection when the app loads. If there's no network connection, you can redirect the user to your offline page where the video can be downloaded. That's the process you have to follow.
Hi,
I want to ask you,
I have some difficulty in showing the error page,
I copied the code in Main activity, made the asset folder, html file was uploaded but it didn't show,
I have made the changes only in the Main file,
Am I suppose to make the changes anywhere else as well?
(For url loading error only)
You could check if the path to your the offline html file in the assets folder is valid.
Bro is it possible to add refresh button on the header? or a floating button if yes? please let me know thanks..
Yes bro, very possible. Just to add your button, set OnclickListner for it and then add the code for the refresh function so that what you achieve when you swipe, you can also achieve when you click on that button. Cheers.
@@codeflaretech nice ill try this so do i have to do the same what you did on the swipe i will have to declare it on the main activity? or i can re use the swipe function?.. And last bro.. U think it would be possible to have bell icon and when new push notifcation from Firebase mesage or Onesignal, autmatically that bell icon will appear the count of notifications..
@@mulkproject687 Yes, you will have to declare the button in your MainActivity by using findViewById and then setting OnclickListner for it. And yes, you can add push notifications from firebase as well. You will have to first add firebase to your app to get started.
@@codeflaretech bro, i have this modal forms in my website when using webview those form wont submit just doing nothing its keeps of freezing.. But if uses browser it works..
@@mulkproject687 Ok. You might need to setJavaScriptEnabled in the manifest.xml file
My code is similar to you,but i am getting this error:Attempt to invoke virtual method 'void androidx.swiperefreshlayout.widget.SwipeRefreshLayout.setOnRefreshListener(androidx.swiperefreshlayout.widget.SwipeRefreshLayout$OnRefreshListener)' on a null object reference
at com.multiinstamessengerandposter.MainActivity.onCreate(MainActivity.java:88).please help.
Hi Shorifa, this means that you probably forgot to implement the findViewById feature for the swipeRefreshLayout. Go to your xml file check for the id and call it in your Java file.
@@codeflaretech Thank you so much for your response to my comment.your video was awesome, it really works.
Whenever i rotate the app it reloads the initial URL. How to avoid that. I want to show only current URL irrespective of orientation.
OK. Just add this to your manifest file: android:configChanges=”orientation|screenSize” That should do the trick.
Also if you prefer to lock rotation to portrait, add this: android:screenOrientation="portrait"
Regards.
@@codeflaretech thanks it worked!
@@vinaybakle6443 All right. Glad I could help. Regards.
It's really good working
when i do
Can I connect With Firebase Url To This Application
Yes, you can.
@@codeflaretech when Url Change In Firebase Database it Also Change in This Webview
not working, maybe not working on android 10
Hello JKK Mojokerto. What problems are you having?
@@codeflaretech I run on android 10, i made a webpage to upload file, with jquery filereader to show file's thumbnail before uploaded
On my android, image file from sdcard shows perfectly, but image file captured by camera doesnt shows
But on the android 7-9, they're all shows
@@codeflaretech oh and i'm not directly upload file from input type='file', but i create a canvas to draw the thumbnail to reduce its size then upload the canvas
The image captured by camera doesnt show its thumbnail, so my canvas draws nothing
Not clear your screen bad experience
Sorry about that