請勿使用Phonegap 1.9.0(使用插件ChildBrowser(https://github.com/phonegap/phonegap-plugins/tree/master/Android/ChildBrowser) android版)。 ChildBrowser.java中存在一些錯誤。 JavaScript寫入window.plugins已棄用。請勿使用Phonegap 1.9.0的插件ChildBrowser
有沒有人有任何想法? 謝謝。
請勿使用Phonegap 1.9.0(使用插件ChildBrowser(https://github.com/phonegap/phonegap-plugins/tree/master/Android/ChildBrowser) android版)。 ChildBrowser.java中存在一些錯誤。 JavaScript寫入window.plugins已棄用。請勿使用Phonegap 1.9.0的插件ChildBrowser
有沒有人有任何想法? 謝謝。
我確實設法使它與Cordova 1.9.0一起工作,在ChildBrowser.java
文件中幾乎沒有變化。
變化我做:用ctx.getActivity().getSystemService()
ctx.getAssets()
與ctx.getActivity().getAssets()
ctx.runOnUiThread()
repla更換
ctx.getContext()
替換爲ctx.getActivity().getApplicationContext()
ctx.startActivity()
與ctx.getActivity().startActivity()
ctx.getSystemService()
更換更換與ctx.getActivity().runOnUiThread()
new Dialog(ctx.getContext(), android.R.style.Theme_NoTitleBar)
土木工程署與new Dialog(ctx.getActivity(), android.R.style.Theme_NoTitleBar)
代替我沒有積極測試,但它確實與基本測試工作。我可能已經替換了錯誤或錯過了任何東西,但上述更改工作正常。
完整的源在 - https://gist.github.com/3085079
我與科爾多瓦1.9在Android 2.2
我已經貼上去的升級ChildBrowser.java與1.9.0工程,我的Dropbox帳戶進行測試。我還沒有把這些改變推到github上,因爲我希望在2.0.0中這樣做,你不需要更新你的插件src代碼,只是讓它們在最新版本的PG中工作。我希望在發佈2.0.0之前檢查這一更改,以便我們都能夠繼續提供有關如何升級插件的詳細說明。
正如後續,這是我的博客文章在kerfuffle。
http://simonmacdonald.blogspot.ca/2012/07/phonegap-android-plugins-sometimes-we.html
BHAI在第一種方法只有'ctx'是不夠的,而不是'ctx.getContext()':)。雖然+1這樣的細節.... – 2012-07-13 06:14:56
@Coder_sLaY感謝,沒意識到那一部分。在需要其他插件的情況下放置細節。 – dhaval 2012-07-13 06:58:44