Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ormma " Uncaught ReferenceError: ormma is not defined at file" #21

Open
GoogleCodeExporter opened this issue Jun 8, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

1 - Load an ad with command
  ormmaView.loadFile(file, fullString); 
//(NB file is empty and fullstring is my ormma code)


2 - ORMMA.js ann ormma_bridge.js  are  not loaded in the webview.

when I press ORMMA Ad i receive :

Uncaught ReferenceError: ormma is not defined at file:///data/data/<Name of 
app>/files/ad/d41d8cd98f00b204e9800998ecf8427e//_ormma_current:52


3  - Details
The files are  copied into the ASSET (ormma.js and ormma_bridge.js) are visible 
into /data/data/<Name of app>/files/ad/<reference>/_ormma_current .  On Android 
the following line are added in the AD

<script src="file://data/data/<here name of app>/files/js/ormma_bridge.js" 
type="text/javascript"></script>

<script src="file://data/data/<Name of app>/files/js/ormma.js" 
type="text/javascript"></script>

I have add this line 
Into the OrmmaAssetController -> writeToDiskWrap

 out.write(("<script type=\"text/javascript\">  if (typeof window.ormma != \"undefined\") {alert(\"ORMMA is loaded\");} else {alert(\"ORMMA is not loaded!\");}</script>").getBytes());

Then  I always receive "ORMMA is not loaded!"

So I injected directly the 2 files (.js)  by this ways

out.write(("<script type=\"text/javascript\">").getBytes());
 InputStream insss = new FileInputStream(bridgePath);
byte[] buf = new byte[1024];
int len;
while ((len = insss.read(buf)) > 0) 
{
out.write(buf, 0, len);
 }
out.write(("</script>").getBytes());

Then  Now I  receive "ORMMA is loaded!" and I can expand the spot.


What is the expected output? What do you see instead?

Ormma founction should be caught.


What version of the product are you using? On what operating system?

 - We use the trunk version 
 - Test platform Android is 4.0.3 

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 24 May 2012 at 4:28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant