smpbo / stagewebviewbridge

Automatically exported from code.google.com/p/stagewebviewbridge
0 stars 0 forks source link

StageWebViewBridgeEvent.DEVICE_READY not fired #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. see the attached .as file for code sample

What is the expected output? What do you see instead?
StageWebViewBridgeEvent.DEVICE_READY won't be fired when all is ok.
I tried to move elements outside of the function that should be triggered by 
this event but I got some "ReferenceError: Can't find variable: 
StageWebViewBridge" when using "call" method, even if I was able to see the 
StageWebViewBridge instance on the stage.

What version of the product are you using? On what operating system?
using StageWebViewBridge_svn_109_build_0.0.721.zip on Mac OS 10.6
compiling for AIR 3.1 with Flash Builder 4.6
tested in ADL and on Galaxy Tab 10.1

I used stagewebviewbridge with AIR 2.7 a while ago, but since I have to compile 
this new one with AIR 3.1, I really would like this to work... Am I doing 
something wrong here ?

Vincent Maitray

Original issue reported on code.google.com by vincent....@gmail.com on 6 Feb 2012 at 10:38

Attachments:

GoogleCodeExporter commented 8 years ago
Hi, simply include the stagewebviewbridge.js file in 
http://www.electrofrog.com/tests/fb/iwasthere/bridge.html this would do the 
trick....

Original comment by xperime...@gmail.com on 6 Feb 2012 at 10:48

GoogleCodeExporter commented 8 years ago
Sorry, that's surely not the right place for asking support, but it might help 
some others.
Well I've included stagewebviewbridge.js in my html page, but now I have an 
error raised at runtime telling me that there is a parse error in this file : 
SyntaxError: Parse error
http://www.electrofrog.com/tests/fb/iwasthere/StageWebViewBridge.js : 1

Any clue about this ?

Vincent

Original comment by konbini....@gmail.com on 7 Feb 2012 at 9:42

GoogleCodeExporter commented 8 years ago
Same issue here. StageWebView.js causes runtime error (crash) and nothing gets 
executed after that point.

Firefox reports:
uncaught exception: [Exception... "Component returned failure code: 0x804b0012 
(NS_ERROR_UNKNOWN_PROTOCOL) [nsIDOMLocation.href]" nsresult: "0x804b0012 
(NS_ERROR_UNKNOWN_PROTOCOL)" location: "JS frame :: 
http://localhost/ios/StageWebViewBridge.js :: anonymous :: line 128" data: no]

The faulty line in question is 126:

setTimeout( function(){ window.location.href=sendingProtocol+'[SWVData]'+btoa( 
JSON.stringify( _serializeObject ) );},aggregatedCallDelay );

Original comment by jourdain...@gmail.com on 21 Feb 2012 at 7:25

GoogleCodeExporter commented 8 years ago
I think there is a confusion on the files provided.
I am using AIR 3.1 with Flash Builder 4.6 compiling to iOS.
What I've done:
1 - Used the src files instead of the swc.
2 - My hmtl file calls the StageWebViewBridge.js in this way:
<script type="text/javascript"
        src="appfile:/StageWebViewBridge.js"></script>

I "kind of" got it to work.

I cam call JS form AS, but sometimes some shit happens.
My goal is to use the new JS Google Maps API, but I can't get the GM functions 
to work properly.

It works smoothly at my desktop, but when I put the app inside the phone, it 
goes bad.

Original comment by beterra...@gmail.com on 19 Apr 2012 at 5:32