You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 24 May 2012 at 4:28The text was updated successfully, but these errors were encountered: