Android Error Calling Method On Npobject
Contents |
here for a quick overview of the
Error Calling Method On Npobject Android Webview
site Help Center Detailed answers to any questions you error calling method on npobject applet might have Meta Discuss the workings and policies of this site About Us Learn error calling method on npobject javascript more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation
Error Calling Method On Npobject Firefox
Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Sometimes throws Uncaught Error: Error calling method on NPObject on
Error Calling Method On Npobject Safari
Android up vote 20 down vote favorite 10 I am having problems with the Webview in Android and it's JavascriptInterfaces. I am passing a string to the JavascriptInterface. When debugging it, I receive the correct string within my Android application. The problem: Sometimes I get an Uncaught Error: Error calling method on NPObject. Does anybody know why? The Interface in Java: public class JSInterfaceGame extends JSInterface { @JavascriptInterface public void setShareText(String share){ shareText = share; if(mJSInterfaceListener != null) mJSInterfaceListener.onParametersChanged(SHARE_TEXT); } The initialization in the onCreateView-Method within the Fragment: online = (WebView) rootView.findViewById(R.id.online); online.setWebViewClient(new WISWebviewClient() { @Override public void onStatusChanged(final WebView view, int progress, long duration) { //unrelated } }); WebSettings ws = online.getSettings(); ws.setJavaScriptEnabled(true); ws.setUserAgentString(USER_AGENT); ws.setCacheMode(WebSettings.LOAD_DEFAULT); ws.setRenderPriority(WebSettings.RenderPriority.HIGH); SharedPreferences settings = getActivity().getSharedPreferences(GameActivity.PREFERENCES, Context.MODE_PRIVATE); mJSInterface = new JSInterfaceGame(); mJSInterface.setJSInterfaceListener(this); // Defined elsewhere in this class. mJSI
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta error calling method on npobject android phonegap Discuss the workings and policies of this site About Us Learn
Error Calling Method On Npobject Solution
more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us error calling method on npobject silverlight Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like http://stackoverflow.com/questions/16758397/sometimes-throws-uncaught-error-error-calling-method-on-npobject-on-android you, helping each other. Join them; it only takes a minute: Sign up Android Javascript Interface up vote 1 down vote favorite I have a webview with a javascript method that calls the android Javascript Interface(JAVA) method and in turn the Javscript Interface(JAVA) calls the context(Reader) activity's method to open a UI screen. When I run openDiscussionsUI() http://stackoverflow.com/questions/19818649/android-javascript-interface directly from the ReaderActivity it opens the UI fine but not when it is run from the Javascript Interface, it seems it does not completely run through the openDiscussionsUI() method as if it was interrupted? Hope someone can help me with this. Thanks in advance. javascript method marginIconClick: function (itemId) { activity.startDiscussionsActivity(); } (JAVA) JavaScript Interface Method public void startDiscussionsActivity() { readerActivity.openDiscussionsUI(); Log.e("startDiscussionsActivity","startDiscussionsActivity"); } ReaderActivity method public void openDiscussionsUI() { Log.e("openDiscussionsUI 1","openDiscussionsUI 1"); discussionBox.startAnimation(slidenotesup); Log.e("openDiscussionsUI 2","openDiscussionsUI 2"); discussionBox.setVisibility(View.VISIBLE); Log.e("openDiscussionsUI 3","openDiscussionsUI 3"); discussionDescription.requestFocus(); Log.e("openDiscussionsUI 4","openDiscussionsUI 4"); } This is my log Click on icon number #1 11-06 17:21:39.190 12951-12980/com.double_eye.monamiq E/openDiscussionsUI 1﹕ openDiscussionsUI 1 11-06 17:21:39.190 12951-12980/com.double_eye.monamiq E/openDiscussionsUI 2﹕ openDiscussionsUI 2 Click on icon number #2 11-06 17:22:32.154 12951-12980/com.double_eye.monamiq E/openDiscussionsUI 1﹕ openDiscussionsUI 1 11-06 17:22:32.154 12951-12980/com.double_eye.monamiq E/openDiscussionsUI 2﹕ openDiscussionsUI 2 11-06 17:22:32.154 12951-12980/com.double_eye.monamiq E/openDiscussionsUI 3﹕ openDiscussionsUI 3 11-06 17:22:32.170 12951-12951/com.double_eye.monamiq I/WEBVIEW﹕ Message - 266:Uncaught Error: Error calling method on NPObject. Click on icon number #3 11-06 17:22:52.818 12951-12980/com.double_eye.monamiq E/openDiscussionsUI 1﹕ openDiscussionsUI 1 11-06 17:22:52.818 12951-12980/com.double_eye.monamiq E/openDiscussionsUI 2﹕ openDiscussionsUI 2 11-06 17:22:52
68948: "Error calling method on NPObject!" this error is UNDEBUGGABLE 5 people starred this issue and may be notified of changes. Back to https://code.google.com/p/android/issues/detail?id=68948 list Status: Obsolete Owner: ---- Closed: May 2015 Type-Defect Priority-Medium ReportedBy-Developer Sign in to add a comment Reported by matteosi...@gmail.com, Apr 24, 2014 When you have: - a webview - a JavascriptInterface - you call a Java method from JavaScript through a JavascriptInterface - an error occurs in Java code then you get this exception in JavaScript, and only in error calling JavaScript: "Error calling method on NPObject!" This error message does not give even the tenth part of the information you expect from any error message in order to debug. It doesn't even make sense (except to the person who wrote it, I guess) The exception in this situation should contain exactly as much information as any exception that is thrown in any other error calling method situation not involving javascript nor a webview. Also, the exception should be logged whether or not you log it from JavaScript, and with a complete backtrace. Oct 9, 2014 #1 timru...@gmail.com All I did was upgrade from Cordova 3.5.0 to 3.6.3 and this message stops my app dead Oct 11, 2014 #2 nand...@fdes.in The same problem here, Upgrades from 3.5.0 to 3.6.3 and i am just seeing this message Oct 11, 2014 #3 timru...@gmail.com For my specific problem of upgrading, it's because my brain was turned off and I did not copy the new cordova.js (and other plugin js files) from my launcher project into the js app that's loaded in the WebView. I had even created an Ant manual step in build for that purpose. Folks remember, duplicate code is a real problem wherever it occurs Sent from my BlackBerry 10 smartphone on the Bell network. Original Message From: android@googlecode.com Sent: Saturday, October 11, 2014 5:01 AM To: timrudy0@gmail.com Reply To: android@googlecode.com Subject: Re: Issue 68948 in android: "Error calling method on NPObject!" this error is UNDEBUGGABLE May 10, 2015 Project Member