native.newWebView

You rock, Tom! Thanks for that. and I’m sure this thread will help others as well.

Any chance I can get you to look at http://developer.coronalabs.com/forum/2012/12/03/ios-6-urgent

As I said in that post, being buried in code for so long I really hadn’t kept up with the process for daily builds. Now with this fix, I find myself in a dilemma over iOS 6. I didn’t think Corona made a leap to iOS 6 only… or did we? That’s a showstopper for me. I’m confused… I doubt you guys did that. I must be missing something.

[import]uid: 111723 topic_id: 24291 reply_id: 133541[/import]

I can confirm this exact same problem.The window does not appear at the x, y coordinates you specify in the call, at least for iPad. I see many people in this thread reporting the same thing. Has anyone found a workaround yet?

I wouldn’t mind a workaround if I could predict precisely where the window will be but so far I cannot see what the pattern is. One thing is certain. The combination of letterbox and iPad makes the window appear in unpredictable places. It works fine on iPhone.

[import]uid: 36466 topic_id: 24291 reply_id: 133507[/import]

We had a x,y positioning problem but it should be fixed in the Release build, 971. [import]uid: 7559 topic_id: 24291 reply_id: 133512[/import]

Thanks Tom. I tried 971, but just to help others that may find this thread, 971 release notes didn’t mention newWebView at all. Nevertheless I tried it and my code crashes on analytics. I see that 972 addresses analytics issues so hopefully that build will address both of these issues. [import]uid: 111723 topic_id: 24291 reply_id: 133535[/import]

The release build, 971 should not crash on analytics anymore. We fixed that in build 972 and ported the device templates so build 971 includes the fix.

The actual fix was not in build 971 but was included in the general release notes when we did a public release of 971:
OS: fixes casenum: 17123. If you call native.newWebViews(x,y,w,h) where x,y are not zero, then it would appear as if the webview were positioned at 2*x,2*y. This would cause touches to be clipped. This fixes both the positioning and touch clipping issues. [import]uid: 7559 topic_id: 24291 reply_id: 133539[/import]

You rock, Tom! Thanks for that. and I’m sure this thread will help others as well.

Any chance I can get you to look at http://developer.coronalabs.com/forum/2012/12/03/ios-6-urgent

As I said in that post, being buried in code for so long I really hadn’t kept up with the process for daily builds. Now with this fix, I find myself in a dilemma over iOS 6. I didn’t think Corona made a leap to iOS 6 only… or did we? That’s a showstopper for me. I’m confused… I doubt you guys did that. I must be missing something.

[import]uid: 111723 topic_id: 24291 reply_id: 133541[/import]

Size issue (if not I apologize I am just a Corona beginner):
[lua]-- After creating object:
web = native.newWebView( 300 , 300, 100, 200 )
– and swaping “width”, “height” parameters:
local w, h
for i = 1, 5 do
w = web.width
h = web.height
web.width = h
web.height = w
end
– sizes of web object are {step by step - after repeat} shorter and shorter[/lua]
Is it a normal behavior ?
[import]uid: 177409 topic_id: 24291 reply_id: 135579[/import]

Size issue (if not I apologize I am just a Corona beginner):
[lua]-- After creating object:
web = native.newWebView( 300 , 300, 100, 200 )
– and swaping “width”, “height” parameters:
local w, h
for i = 1, 5 do
w = web.width
h = web.height
web.width = h
web.height = w
end
– sizes of web object are {step by step - after repeat} shorter and shorter[/lua]
Is it a normal behavior ?
[import]uid: 177409 topic_id: 24291 reply_id: 135579[/import]

I have been using the newWebview to display a PDF file.

Only issue is that once the pdf is displayed, I cannot dismiss it.

local webView = native.newWebView( 0, 0, 320, 480 )
webView:request( “SOC.pdf”,system.DocumentsDirectory)

From the doco, the webview has to be dismissed from the 'background code.
For this to happen I need to invoke a listener.

(This is IOS BTW)

To get an event to the listener however, I need to have something to fire the event. Obviously because the webview is behaving as a pdf view there appears to be nothing to cause an event to fire.

I believe in reading earlier that touch events cannot be used (otherwise I would use a ‘double touch - tap, tap’ to dismiss the webview.
Bon’t believe I can intercept the iphone button - or can I

Any other thoughts?

Stan [import]uid: 178113 topic_id: 24291 reply_id: 137174[/import]

I have been using the newWebview to display a PDF file.

Only issue is that once the pdf is displayed, I cannot dismiss it.

local webView = native.newWebView( 0, 0, 320, 480 )
webView:request( “SOC.pdf”,system.DocumentsDirectory)

From the doco, the webview has to be dismissed from the 'background code.
For this to happen I need to invoke a listener.

(This is IOS BTW)

To get an event to the listener however, I need to have something to fire the event. Obviously because the webview is behaving as a pdf view there appears to be nothing to cause an event to fire.

I believe in reading earlier that touch events cannot be used (otherwise I would use a ‘double touch - tap, tap’ to dismiss the webview.
Bon’t believe I can intercept the iphone button - or can I

Any other thoughts?

Stan [import]uid: 178113 topic_id: 24291 reply_id: 137174[/import]

Hi. How disable scrolling in WebView and add Touch Event? webView:addEventListener(‘touch’, myfun) - don’t work [import]uid: 136777 topic_id: 24291 reply_id: 138984[/import]

Hi. How disable scrolling in WebView and add Touch Event? webView:addEventListener(‘touch’, myfun) - don’t work [import]uid: 136777 topic_id: 24291 reply_id: 138984[/import]

How do I check if the remote url page was loaded using newWebView?

I am loading it off screen view and then bringing it into view when a certain button is pressed, but I want to do something else if the device is not connected to the internet and the page cannot be loaded or the server is down.

thanks.

edited: 

ALREADY DISCOVERED THE event.type “loaded”

Weird interaction of the ads (inneractive) with webView.

I load a webpage using newWebView out of screen view. When a button is pressed that page comes into view and when a “submit” button is pressed on the page itself it moves out of view again.

All works well as many times as needed UNTIL a fullscreen ad is loaded.

After closing the ad and pressing the button to bring that page into view, it does come into view but the “submit” type button on the html doesn’t work anymore and if I touch on a screen area where there is a button underneath, the button is pressed (this doesn’t happen before the ad is loaded).

The ad plugin is leaving some weird trace after the ad is closed.

Rob, others, have you seen this happen?

How do I check if the remote url page was loaded using newWebView?

I am loading it off screen view and then bringing it into view when a certain button is pressed, but I want to do something else if the device is not connected to the internet and the page cannot be loaded or the server is down.

thanks.

edited: 

ALREADY DISCOVERED THE event.type “loaded”

Weird interaction of the ads (inneractive) with webView.

I load a webpage using newWebView out of screen view. When a button is pressed that page comes into view and when a “submit” button is pressed on the page itself it moves out of view again.

All works well as many times as needed UNTIL a fullscreen ad is loaded.

After closing the ad and pressing the button to bring that page into view, it does come into view but the “submit” type button on the html doesn’t work anymore and if I touch on a screen area where there is a button underneath, the button is pressed (this doesn’t happen before the ad is loaded).

The ad plugin is leaving some weird trace after the ad is closed.

Rob, others, have you seen this happen?