We have a web view in our app which is being detected as a single webpage element (android.webkit.WebView). not showing the layout hierarchy to inspect individual UI components. I have tried to inspect the elements using 'UI Automator Viewer' and 'Appium Inspector' and same results. Is there any other tool which can be used for inspecting web views? Please advise!
UIAutomatorViewer is able to see native elements only. Everything underneath WebView is web elements. You need to switch from native to web context.
Link
This functionality was broken in Android Lollipop but appears to have recently been fixed with Android System Webview v44, try upgrading webview and inspecting then
Related
I've created a web langing page using flutter, the page is shown on browser as expected.
Inside the html code, i've added the scripts to integrate screen recording with hotjar and smartlook.
In the smrtlook and the hotjar consoles, i can see the recording of the sessions but, these are complete blank.
All the records are white screens, whith only the tap/click/swipe gestures.
I've added inside the tag in the app html this line
as described (by smartlook) here without solving my problem.
Do i placed this tag in the wrong position?
Does the app needs to be built with renderer canvaskit rather than html?
Is there something else i'm not considering?
Thanks,
Hey everyone so I read that unity doesn't really support mobile browsers for WebGL games. im using 2020.1.4.And sure enough, the game gets a bit distorted by not being scaled properly. it's like the camera is bigger so it shows on the screen that blue color. I tried some things, setting width and height to auto or removing config.devicePixelRatio = 1; as suggested by a friend but nope! still looks horrible! And if that wasn't enough the keyboard doesn't show up when clicking on form fields. i tried this one
https://github.com/eforerog/keyboardMobileWebGLUnity
which displayed an error when pressed on and this one
https://github.com/dantasulisses/WebMobileInputFix which just didn't even compile!
Any ideas, please?
I did my research and tried every plugin I could find. I used Unity 2020.3.28f1 and tested both on Android-phone and iPhone.Here is my report.
These plugins don't work:
https://unitylist.com/p/f58/Unity-webgl-inputfield
https://github.com/eforerog/keyboardMobileWebGLUnity
https://github.com/dantasulisses/WebMobileInputFix
This plugin works, but you should use different settings for IOS and Android on same input field game object. If you use "prompt", it works for IOS only, and "overlay" works for Android only. Look for documentation in page:
https://github.com/unity3d-jp/WebGLNativeInputField
And this plugin works best at the moment. Yes, it is a bit ugly though, but it works.
https://github.com/kou-yeung/WebGLInput
And there is a fix for Unity 2021 for it:
https://github.com/kou-yeung/WebGLInput/releases/tag/1.0
There's a keyboard that overlays, when using it you just need to tap the notification to access it and then click the "back" button to hide it https://play.google.com/store/apps/details?id=com.fishstix.gameboard
I made this project that simply recreates a keyboard using buttons in unity.
I implemented it in a WebGL build successfully.
https://github.com/thetimeste/WebGL-Build-Keyboard-Unity.git
I would recommend using the native js window.prompt() fields as of writing. They have great cross-platform support, allow for extra features like special characters, emojis, copy and paste etc. and are pretty easy to set up. Once (or honestly if ever) Unity adds their own reliable implementation you can easily remove this lightweight implementation.
Create a .jslib file that has a function opening a window.prompt(description, currentText)
Return the result at the end of that function back to a unity object with a recipient script
Make a derivation from Unity's event system overwriting the OnApplicationFocus(bool focus) function (leaving it empty), to fix a sneaky Chrome Android bug.
That's it. The result should look something like in this demo: https://pop.demo.neoludic.games
If you want to save some development time on a feature that really should just be native in Unity, you can also check out my plugin based on the method above. https://neoludic-games.itch.io/pop-input
I also need to enable mobile virtual keyboard for running webgl on mobile device.
I've tried the code from your mentioned url. It gives you some idea on how to do
it, but the code are totally buggy and unusable. Now I am trying to implement it
by myself.
I am making a iPhone app using phone gap in that I want to add a tab bar Controller either using HTML or by using native components to it. Can anyone suggest to me how to do that.
If you are using phonegap/cordova versions 1.5+ you can create a native tabbar with this plugin: https://github.com/AndiDog/phonegap-ios-tabbar-plugin
Other phonegap/cordova plugins can be found here: https://github.com/phonegap/phonegap-plugins/tree/master/iOS
Here's a tutorial how to implement this: http://zsprawl.com/iOS/2012/03/using-the-native-tabbar-plugin-in-cordova/
This is of course the best approach. Other one would be to use a jQuery Mobile and create a HTML tabbar. This is a harder way because it will take time to style it properly and even then it would not fully act as a native tabbar.
such that when the user open the application the website referenced will be loaded in the web browser
I know the code the will open a URL with in an application
[NSURL URLWithString:#"http://www.apple.com"]];
But this is not what I need I need the application to display the web browser within its form.
If you are only to show one page I suggest you should use ModalViewController to present the page inside your app and put a UIWebView in it.
If you are to render the web page as an application than you should use UIWebView
If you want to present some pages but also want to make use of navigation functions of the safari inside your app you can use DLWebView framework which suppors ModalView with navigation function.
Here you can watch the video how it works: http://dlinsin.github.com/2011/04/24/DLWebView.html
You need UIWebView class : UIWebView Class Reference
Also you can try to search for a ready webview with all needful buttons.
Have you looked into UIWebView?
If you need browser functionality within your own app, you will need to create your own, i.e. it's not possible to embed the Safari browser within a view in your own app.
Is it possible to Launch Safari without having the app close? Just like the in-app email compose window.
I'm aware of how to display a webpage in UIWebView. I'd like to use a full web browser, i.e. Safari.
You can use a UIWebView to display web content in your app.
You can create a UIWebView with the URL to display. It will follow any links that the user touches, but that won't give you the address bar, search, navigation buttons, bookmarks or the page (tab) control. Those you'll have to add yourself, but odds are you don't want all of that. (Do you really need Google searches in your app?)
Creating a controller to manage a UIWebView and as much or as little navigation as you need is pretty easy. With a little planning, your custom controller class will also a good thing to keep in your library for the next app.
No you can not make use of the full Safari from within your own application. Your application must terminate for Safari to open.
In iPhone OS 2.0 you also had to terminate in order to send e-mails, so some chance exists that Apple couls open up Safari in the same way for iPhone OS 4.0. Make sure to request it at http://bugreport.apple.com if you are eager.
The second best option currently available is to roll your own "Browser view controller" using UIWebView. Let it have back, forward, stop/reload buttons, and an extra button for opening in Safari if the user is not content. This is how many of the greatest apps our there, like Tweetie, does it.