Web popup can't render php?

Can Corona web popup render php web? I tried but nothing shows up…

Seriously, I’ve tried so hard to make a good game with Corona. But it doesn’t seems like Corona would allow me to do that at all. First I tried making a physics game, then the physics is too slow/unstable that it is not playable. So I decided to make a simple minigame with advertisement, yet I can’t integrate advertisement because of this. *sigh*

I really hope the daily build can solve all these features problem. I wanted to make cool games and help promote Corona. But with this current state, I can’t really recommend Corona to anyone. Seriously, I finish game faster with pure Objective-C + cocos2d =_=; ( 1 month ). I thought Corona would save me and reduce that time to, like, 2 weeks. But it has been almost a year and I have yet to finish something using Corona…

Sorry about the rant. But it’s just that I LIKE Corona. I bought the license it since it was just $99, recommended it to one friend to buy it. So I’m just disappointed really.

If this doesn’t work, I will stop using Corona and move to cocos2d for iPhone and Java + AndEngine on Android instead. It might be more work, but at least I don’t have to wait forever for a feature and can go in and hack or do whatever I want with the engine. [import]uid: 5976 topic_id: 4687 reply_id: 304687[/import]

PHP just sends out flat HTML created on the server not the client. the webpopup should render it as normal. what is the URL?

try saving the PHP file output from your browser as an .htm file, upload that to your server and try loading that instead. does it show now?

j [import]uid: 6645 topic_id: 4687 reply_id: 15450[/import]

Here, this is the page I’m trying to show
http://hima.gptouch.com/testbed/testAds.php

I’m following this admob work around tutorial
http://www.ludicroussoftware.com/corona/admob-ad-support-in-corona/

Maybe I did something wrong. But it’s REALLY annoying when you can’t see the error message and every time you want to test you have to build, copy it to the device, and run it from there. Corona really need to do something about this. :confused: [import]uid: 5976 topic_id: 4687 reply_id: 15519[/import]

If you view http://hima.gptouch.com/testbed/testAds.php in a web browser it doesn’t show anything. That is because the page is not sending any actual html. Its just empty. You shouldn’t expect anything different on the iPhone.

The admob tutorial, that wouldn’t need to connect to a php server, it uses javascript to connect to admob. Trying to fudge in a php page will probably have unexpected consequences.

Depending on what you are doing I would recommend rethinking your objectives.

Want to show a php page, just use the corona web popup, want to show and admob ad, follow the admob tutorial.

There is also another thread about admob having issues. [import]uid: 5354 topic_id: 4687 reply_id: 15533[/import]

@Matthew Pringle
It’s an advertisement webpage, so maybe the ads doesn’t load for you but it does work on my browser just fine. When I browse using my mobile phone, it does work as well. Here’s the screenshot of the webpage

http://img10.imageshack.us/img10/6526/himagptouchcomtestbedte.png

As for the physics engine, it isn’t just me. There’s a thread about it and many people are experiencing it.
http://developer.anscamobile.com/forum/2011/01/03/physics-omgsuck
http://developer.anscamobile.com/forum/2010/11/30/physics-and-android

I didn’t do anything that can be considered as heavy code at all and the simulator run just fine at 60 FPS. Also, Corona doesn’t even allow some simple box2d configuration. For example, the threshold for elastic collision. I make the same game in Flash. And it runs at 60 FPS, using the same technique and box2d. Isn’t lua suppose to run much faster than AS3? I even tried making another Corona App with no physics. This time I get 60 FPS. Oh, this is Android by the way. I have never built for iPhone so I don’t know if there’s a problem on iPhone or not.

Believe me, I have tried and spend time after time investigating on what I asked here. But when you need to spend 5 minutes just to build and test something with no error messages, just because it cannot be tested on the simulator, it become REALLY frustrating.

I understand why you respond me with such attitude. However, now that I have explained myself and my scenario a little more, I hope I’d get a friendlier and less hostile respond from you.

Thank you. [import]uid: 5976 topic_id: 4687 reply_id: 15535[/import]

Hi hima

Ok yeah my response was a little off but I wrote it in the manner of your bug post, I changed it soon afterwards as I thought the irony was coming on a little strong so sorry.

I can see the ad if I put my desktop Safari into emulating the user agent of mobile safari so that does work.

So firstly I would just get Corona opening up a normal website in its web view, can you get it doing that.

2nd step if the above works, can you get that php page to echo “hello” and not the admob javascript?

If the above 2 work then I would think it is an admob / corona issue.

Are you including the below code in the html? Its how I fixed the issue last time

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

[import]uid: 5354 topic_id: 4687 reply_id: 15539[/import]

Also are you doing this on an iPhone or Android?

Are you checking for the browser type, I cant see that in the html so are you processing some php script that checks that? [import]uid: 5354 topic_id: 4687 reply_id: 15540[/import]

Im definitely thinking its a browser user agent issue and something in the php.

If I put safari into mobile safari then it shows, if I disable javascript it shows. That means its the php in the first case checking the user agent before returning the ad. This could be a cause.

Also can you not now build for xCode and check it in there as a work around for installing the app on your iPhone. [import]uid: 5354 topic_id: 4687 reply_id: 15542[/import]

Don’t worry! No offense taken :slight_smile:

That’s a great suggestion about php and echo. I only tried it with html and type “hello” and it seems to render just fine. Native browser popup from Corona seems to work fine too. The only problem is rendering on Corona webview. I’ll try the echo suggestion tomorrow and reply with a result.

Also, I’m on Android. Not sure about the browser type, since it only says internet on the icon :frowning: Also, because I’m on Android, the only way to build on the device is to build, wait for apk file, copy file and paste it into my sdcard, then install the app and run. [import]uid: 5976 topic_id: 4687 reply_id: 15543[/import]

In my mind the php is working fine, I think it might be testing for the iPhone only when deciding to display a ad or not. Can you post the php code? Are you using a framework / library that you can point me to?

Check the php for

$\_SERVER['HTTP\_USER\_AGENT']  

or

get\_browser() [import]uid: 5354 topic_id: 4687 reply_id: 15546[/import]

Wow, guess what? Even this fails

native.showWebPopup(“http://www.anscamobile.com”)

It shows a white webpage in a split of a second then it’s gone. I don’t think I have to test other stuffs now since even with the basic showing webpage with no extra options still fail :frowning:

Also, to make sure that this is the web view is on top of everything, I use a timer to perform the above code after the app start for 3 seconds. [import]uid: 5976 topic_id: 4687 reply_id: 15580[/import]

I sounds like you didn’t allow your device via build.settings to access the internet? If you don’t do that, then you won’t see anything in the webpopup.

http://developer.anscamobile.com/content/configuring-projects [import]uid: 5712 topic_id: 4687 reply_id: 15612[/import]

YES! That is it! Thank you! :smiley:

I can’t believe it’s this simple. *sigh* This is what I hate about testing on device with Corona. When some simple mistake like this happen, usually you would be able to fix it in just one run because the console usually tell you the problem. Debugging on device should be high priority in the new feature list, really.
[import]uid: 5976 topic_id: 4687 reply_id: 15690[/import]

Hi hima,

yes and no (debugging). I think the easy start Corona gives an devleoper leads also someone not to study the documentations fully. And imho the web documentation is difficult to navigate. So it is easy to miss such information. Man, do I miss the PDF files prior beta 5, I can’t tell you. Anyway, I am glad you got it working.

Cheers
Michael

http://www.whiteskygames.com
http://www.twitter.com/mhartlef [import]uid: 5712 topic_id: 4687 reply_id: 15736[/import]

Seriously, I finish game faster with pure Objective-C + cocos2d

huh?

Oh, this is Android by the way. I have never built for iPhone so I don’t know if there’s a problem on iPhone or not.

I’m confused by your rant but whatever it’s not important. [import]uid: 12108 topic_id: 4687 reply_id: 15779[/import]

The first one I was talking about making game for iPhone in general. Corona lags many features that I would have finished the game much sooner using cocos2d than waiting for bug fixes or features added.

The second one I talked about physics in Corona. I have never built any physics game with Corona on iPhone yet so I dont kbow whether it will have the same problem with android or not. [import]uid: 5976 topic_id: 4687 reply_id: 15791[/import]