Skip to content Skip to sidebar Skip to footer

Getting Error In Childbrowser.java

I am getting the error 'ctx cannot be resolved' in childbrowser.java. I followed the instruction from the video link http://www.youtube.com/watch?v=84jmuXS8GJI to get the childbro

Solution 1:

You are looking at a wrong place.... To get the updated and working copy of childbrowser check here https://github.com/phonegap/phonegap-plugins/tree/65be38cf02466748a3b3e93c2d18cb2c198feb28/Android/ChildBrowser

UPDATE:-

Refer this http://simonmacdonald.blogspot.fi/2012/07/phonegap-android-plugins-sometimes-we.html

You need to modify few things like this

  1. ctx.getContext() replaced with cordova.getContext()

  2. ctx.startActivity() replaced with cordova.getActivity().startActivity()

  3. ctx.getSystemService() replaced with cordova.getActivity().getSystemService()

  4. ctx.getAssets() replaced with cordova.getActivity().getAssets()

  5. ctx.runOnUiThread() replaced with cordova.getActivity().runOnUiThread()

  6. ctx.getApplicationContext() replaced with cordova.getActivity().getApplicationContext()

  7. ctx.getPackageManager() replaced with cordova.getActivity().getPackageManager()

  8. ctx.getSharedPreferences() replaced with cordova.getActivity().getSharedPreferences()

  9. ctx.unregisterActivity() replaced with cordova.getActivity().unregisterActivity()

  10. ctx.getResources() replaced with cordova.getActivity().getResources()

  11. import com.phonegap.api.* replaced with import org.apache.cordova.api.*

Post a Comment for "Getting Error In Childbrowser.java"