Change loadUrl(javascript...) to use new callback mechanism.

This commit is contained in:
Bryce Curtis
2010-08-19 14:37:49 -05:00
parent 1850d2c04e
commit b4d3a10773
10 changed files with 104 additions and 118 deletions
@@ -37,7 +37,7 @@ public class CameraLauncher {
byte[] code = jpeg_data.toByteArray();
byte[] output = Base64.encodeBase64(code);
String js_out = new String(output);
mAppView.loadUrl("javascript:navigator.camera.win('" + js_out + "');");
mGap.sendJavascript("navigator.camera.win('" + js_out + "');");
}
}
catch(Exception e)
@@ -49,7 +49,7 @@ public class CameraLauncher {
public void failPicture(String err)
{
mAppView.loadUrl("javascript:navigator.camera.fail('" + err + "');");
mGap.sendJavascript("navigator.camera.fail('" + err + "');");
}
}