Switching from WebView to other views in Android - java

I am developing a photo sharing app for Android. I have a web site that I want the Android to get WebViews for most of it, but I want the android to have a native home screen rather than the web site homescreen.
As of right now, I open a WebView for login (this is needed because i must login with twitter) but after that I want the android to go to its own native home screen rather that the web site home screen.
I have tried using the shouldOverrideUrl() method to no avail. Is it even possible to program and android app to switch from the WebView at a given url?

Just create a method to check for the URLs to catch. Then make it not call the URL and open the home screen.

Related

full height of webview website second page

I have a webview with the following problem: on android and desktop it works perfectly on the first page, but when I click the button to go to the second page, the height of the page does not show entirely. Only in android, the scroll and buttons are not responding, desktop is fine. It's an android project downloaded from another github user...
This is the first page working great
This is the second page issue with scroll and buttons
This is the XML layout code file:
xml code part one
xml code part two
and here are the more important lines about the webview settings located in MainActivity.java file
mainactivty.java webview settings
NOTE: Normally the website is responsive and working perfectly, whatever android, ios, etc... device, its totally responsive and works fine into a web browser in mobile device, tested physically with real device (no android emulator)
The issue is only with the second page...
remove the web view from the NestedScrollView and make it match_parent

Play a video on Android full screen from website link

I have a website which lists the links to videos. Clicking on these links will play video on browser.
Now, I am planning to develop an Android app for my website. The way I am going to do is just framing this website inside Android app.
Now, when I click on these links inside the Android app, the video is getting played as like it plays on the browser. But I need it in a way such that when a user clicks on these links the video should play automatically on full screen landscape mode.
What modification should be done in the coding to play this video on full screen upon clicking on the video link?
Thanks

Android flash website in webview and back button force closes application

I am trying to make a little app that shows Timetable, but to make it easier I want to show flash website on fragment webview. How can I do this?
I have tried to enable plugin, but it doesn't enable flashplayer. What would be the best solution to show it in the webview or just in app?
In your Manifest file on application tag add this property
android:hardwareAccelerated="true"
If not working then try setting the below property to your webView.
mWebView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
Note: The above fix does not work in all android phones.

Android WebView and html5 vids

Please, is there any way to force WebView to play html5 embedded vids? I spent two days tempting it (from just enabling js and plugins with hardware acceleration to using html5webview class) and made video tag working, but embedding with iframe only shows me preview.
Any suggestions, please?
Does it play if you click on it manually? There are all sorts of things that may go wrong with HTML5 video on the internet, on Android you also have to take into account the various permissions.
Try this first:
Load the webpage in a browser - does it work?
Load the webpage in the browser on the device, does it work?
Load the webpage in the webview, does it play when you click on it?
There should be an auto play property on the webview, but I know that one IOS at least that one is ignore and the video won't play until you click it.

Android WebView - Works in browser but not WebView

I am attempting to create an Android game in Javascript, then I planned on putting it into a WebView. The problem is, although my game works 100% in the default Android browser, running it in a WebView seems to break it somehow. I've looked through all of my code and cannot for the life of me figure out what the issue is.
I used this game as the "codebase" for my own game, and it faces the same issue.
It loads perfectly in the default Android browser but when you put it into a WebView it will no longer play. Simply copy the above link into a webview and see for yourself.
Note I do have Javascript enabled and the webview is functioning properly.
Perhaps the cache manifest?
Have you tried Phonegap? You have all the hard work done and works out of the box.

Categories