I have a problem while trying to load a javascript function from java using Phonegap for Android. Every time i call
loadUrl("javascript:myJavascriptFunction()");
i always have this error
I/System.out( 2822): loadUrl(javascript:myJavascriptFunction())
I/System.out( 2822): url=javascript:myJavascriptFunction() baseUrl=file:
D/PhoneGapLog( 2822): file:
I see what my javascript is actually called. But after about 10 seconds, my application crashes due to this error:
I/System.out( 2822): onReceivedError: Error code=-6 Description=The connection to the server was unsuccessful. URL=javascript:myJavascriptFunction()
E/WindowManager( 2822): android.view.WindowLeaked: Activity com.phonegap.plugin.billing.CallbackBillingActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@405d9860 that was originally added here
E/WindowManager( 2822): at android.view.ViewRoot.<init>(ViewRoot.java:258)
E/WindowManager( 2822): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
Can someone explain to me where the problem is? Thanks
source
share