android - Unity AndroidJavaObject java.lang.NoSuchMethodError: -
i want useragent on unity. platform android.
but nosuchmethoderror why?? im not @ english. sorry
androidjavaclass unity = new androidjavaclass ("com.unity3d.player.unityplayer"); androidjavaobject context = unity.getstatic<androidjavaobject>("currentactivity").call<androidjavaobject>("getapplicationcontext"); androidjavaobject webview = new androidjavaobject ("android/webkit/webview", context); androidjavaobject webviewsetting = webview.call<androidjavaobject> ("getsettings"); string useragent = webviewsetting.call<string>("getuseragentstring");
you need utilize "." , not "/" in class name
correct
androidjavaobject webview = new androidjavaobject ("android.webkit.webview", context);
java android unity3d
No comments:
Post a Comment