I'm developing an android application and a colleague of mine is developing the same application for iOS. In this application is needed to load a 360 panorama which is located on internet. In the iOS application, a HTML5 string is used to wrap the URL of the panorama and the WebView loads it normally when I used the same String in an Android WebView, the url won't open. So my question is are the webiews between these two OS so different? should I enable some settings of my webview? I'll post you the code and the string just in case you can make something out of it.Thank you in advance
webView2.getSettings().setJavaScriptEnabled(true);
webView2.getSettings().setDomStorageEnabled(true);
String target = "<html>
<head>
<style type=\"text/css\">
iframe {position:absolute; }
body {background-color:#000; margin:0;}
</style>
</head>
<body>
<iframe width=\"100%%\" height=\"100%%\"
src=\"%http://360photo.gr/panorama/ipad/antalki/antalki_2.html\" frameborder=\"0\" allowfullscreen></iframe> </body> </html>" ;
I might be messing the String somewhere and haven't noticed this is the String that works in iOS
NSString *videoHTML = [NSString stringWithFormat:@"\
<html>\
<head>\
<style type=\"text/css\">\
iframe {position:absolute; }\
body {background-color:#000; margin:0;}\
</style>\
</head>\
<body>\
<iframe width=\"100%%\" height=\"100%%\" src=\"%@\" frameborder=\"0\" allowfullscreen></iframe>\
</body>\
</html>", self.urlToPlay];
And this is how I load the Data:
webView2.loadData(target, "text/html", null);