Web Popups

Just to let you know that native.webPopup has been replaced on iOS by native.webView and it’s soon to be replaced on Android as well. I doubt you will see any changes to the native.webPopup object in the future. [import]uid: 7559 topic_id: 24287 reply_id: 104985[/import]

Good, because I’m done struggling for now (headed on a weeklong trip with just an iPad)…

Hopefully whatever comes out for Android will work a little better. All I want is for it to work just like the webView does in native iOS code… I should be able to send a string to the view, then use some kind of listener to send commands back to the code. [import]uid: 38190 topic_id: 24287 reply_id: 104986[/import]

The native.newWebView API still doesn’t support a string of HTML data so you still need to supply a temporary file with your HTML data. If the iOS webView supports a string input, you should file a Corona feature request to support that. [import]uid: 7559 topic_id: 24287 reply_id: 104993[/import]

They BOTH support sending a string into a webView. I’d argue that it’s the best way to do it… It’s silly to POST to my server, receive an XML response, parse the response, dynamically build the HTML, then have to stick it in a local file to read it.

The only reason I’m trying to use Corona SDK is to avoid learning Java. Looks like I’m going to have to learn Java.
iOS (from my own code):

[shareWebView loadHTMLString:htmlString baseURL:[NSURL URLWithString: [NSString stringWithFormat:@"file:/%@//",imagePath]]];  

Android OS:

String summary = "[html]You scored **192** points.[/html]"; webview.loadData(summary, "text/html", null); [import]uid: 38190 topic_id: 24287 reply_id: 104994[/import]

So, I looked for five minutes for a place to request features. I checked out all the menu options in the support area, and did a search for it. Still no luck.

I originally checked out Corona SDK over a year ago, and abandoned it because it just wasn’t there yet. Unfortunately, it looks like it still isn’t there. [import]uid: 38190 topic_id: 24287 reply_id: 104995[/import]

You are the first user that I know of that has asked to submit a string to the webPopup API instead of a file or URL.

You can request a feature at the Bug Report link at the top of this page. [import]uid: 7559 topic_id: 24287 reply_id: 105004[/import]

I want this feature too. I think Corona is just for first time, until you learn java. If you will implement this I oould load the html code from a file in a string and then modify and show it like said aardwolf [import]uid: 138389 topic_id: 24287 reply_id: 105555[/import]

I want the direct string feature too and for every person that actually comments on a site, there are 10 that want the same but don’t post a comment.

I really (do but also would want to) like Corona, but at sometimes it just baffles me how some features that anyone with decent development skills can EASILY program receive so much development time at Corona (such as a Storyboard which is great for newer developers who don’t know how to program such thing) while Fundamental features that CANNOT be developed no matter how hard we try (decent webview that works the Same as in native coding) take ages.

A webview is so important! I don’t understand how so many people make so much apps while not being hindered by the current web popup, text input and keyboard problems at all! Corona, if you want to elevate yourselves beyond being a popular game engine and want professional apps to be built on your platform, please implement web and input features properly and prioritize this.

And of course, Corona apps need a way of knowing when the keyboard is out, to scroll the entire app up or else the keyboard blocks the input field!

At this point, PhoneGap, Flash, Native Android and Native iOS ALL offer better possibilities (well, perfectly good possibilities) for in-app browsers that are fully repositionable, injectable, play nice with keyboards and all of them offer text inputs that do the same.

Please take note of this… I’ve been telling some customers for months now that Corona is working on a better webview so we can finish projects using a WebView on a *rotating* device that requires *keyboard* for form input. I thank you so much for the first implementation of UIWebView but I *beg* you to work out the Android version and thus make it cross-platform and fully functional (keyboard support, rotation support, string injection support etc).

I have been programming my own text input that is NOT native (uses an invisible native offstage input to respond to keyboard) because it is useless to have only a native text input (how would you suggest making a scrolling form of any kind??) and I don’t like having to spend so much time (money) after buying a product that advertises as the most advanced development platform.

Please, please please tell me this is receiving some kind of priority and can be expected soon. I posted it in various places and sent mails but to no avail. Please don’t ask me to file this anywhere else since I just explained the problem here and obviously, you are reading it :slight_smile: You can’t ask a customer (who pays three times the annual fee of Android and iOS combined for your product) to go find some feature request or bug report section and detail the problem there all over again. I want this to be here since here is where other developers read this too. Having the discussion here helps other people make choices that I could not make because I could not assess the status of the implementation of such features. [import]uid: 67504 topic_id: 24287 reply_id: 106751[/import]

+1!

I agree with @Tiemen.

Principally myself being exclusively Business App developer and not a gamer one - So this kind of requests are quite valid IMHO and regarding my business app development as well.
Thanks Ansca,
Rodrigo.

[import]uid: 89165 topic_id: 24287 reply_id: 106842[/import]

Agreed 100% that advanced web views are critical for app development. @Ansca Any news on when native.webView will be available for Android (and in the simulator) too? [import]uid: 74503 topic_id: 24287 reply_id: 107377[/import]

Oh my god!

We are also needing this feature!!! We have a game developed in Corona, and the last issue we need to implement is an *HTML* interface for selection of some stuffs… And it’s not working!!!
We have 2 weeks deadline and will have to recreate all the html5 features in Lua… Something unthinkable!!!
Please! We need some lights! It’s urgent! [import]uid: 114877 topic_id: 24287 reply_id: 107934[/import]

regard! [import]uid: 38309 topic_id: 24287 reply_id: 108065[/import]

Hi,

Is it possible to show more then one WebPopup window ?
It will be very usefull.

Cheers,
Zsolt [import]uid: 126421 topic_id: 24287 reply_id: 108250[/import]

The docs state that only one popup can exist at any given time. Apart from that, Corona has stated something along the lines of ‘don’t expect major updates to the Web Popup’.

Which is fine by me, as long as all effort is now spent on real UIWebView and a similar solution for Android. [import]uid: 67504 topic_id: 24287 reply_id: 108648[/import]

Yes, all future changes will be made to native.webView and not Web Popup. We should have webView for Android soon. [import]uid: 7559 topic_id: 24287 reply_id: 108723[/import]

Oh, It’s really a good news!

:smiley: [import]uid: 38309 topic_id: 24287 reply_id: 109096[/import]

Agreed, good news. I (quite literally) can’t wait! :slight_smile: [import]uid: 67504 topic_id: 24287 reply_id: 109333[/import]

Stupid question:
I have a webview that loads a local html with an banner
The problems is when i click the banner, the href is loaded into the webview, i want that launch a new window in safari. I have tried target="_blank" in the html code but it still load the new page in the webview…
Any easy solution? [import]uid: 113117 topic_id: 24287 reply_id: 111811[/import]

The URL can not work, please Help:

The html:

[html]

<title>search</title>
  
<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
  
  

|   
<form action="p1"><input type="submit" value="page 1"></form>  
 |
|   
<form action="p2"><input type="submit" value="page 2"></form>  
 |
  

  
[/html]  

Lua code:

 --open html as webPopup  
 local function webListener(event)  
 local shouldLoad = true;  
 local url = event.url  
 if(1==string.find(url, "corona:close")) then  
 shouldLoad = false;  
 end;  
 if(event.errorCode)then  
 print("err:" .. tostring(event.errorMessage));  
 shouldLoad = false;  
 end;  
 if(1==string.find(url, "p")) then  
 shouldLoad = true;  
 --change to read scene  
 \_P= url:sub(2);  
 print("get page is " .. \_P);  
 txtTest.text = "get " .. \_P;  
 --changeScene();  
 end;  
 return shouldLoad;  
 end;  
 local options = {  
 hasBackground = false,  
 baseUrl = system.DocumentsDirectory,  
 urlRequest = webListener  
 }  
 native.showWebPopup(0, 50, \_W, \_H-50, "s.html", options);  

The s.html can popup, but when I click the button on the web page, urlRequest can not catch the URL.

Why?

[RUN ON ANDROID 2.2 MOBILEPHONE] [import]uid: 38309 topic_id: 24287 reply_id: 114131[/import]

Has anyone else found that if they are using either of the retina devices, that their web view content ignores the size of the webview itself? Instead both the width and height are doubled, so you only see the top left corner of the content.

Has anyone had this problem and found a work-around? [import]uid: 84115 topic_id: 24287 reply_id: 114259[/import]