I am working on an Android App with Phonegap Cordova-3.0.0 and when I call InAppBrowser I got MotionEvent mTouchMode = 4 error. And InAppBrowser function is not working. So how can I fix this? Do I need do some setting on AndroidManifest.xml or config.xml? And I got this on my AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
And I got this on my config.xml
<plugins>
<plugin name="InAppBrowser" value="org.apache.cordova.InAppBrowser" />
</plugins>
You have to mention the below code line in config.xml
try to add this to your manifest, it helps me with a f*king plugin to work
try also not use 'plugin' tag in config.xml, but:
it will help for future updates of phonegap
To open a link in browser inside the app without opening external browser
HTML
Now go into your project folder and open Terminal or Command Prompt (Windows) and type the following command:
It will configure the required files and also add the plugin into your config.xml file.
Open your HTML page where you're trying to open the link, and put this JavaScript.
In Phonegap Cordova-3.0.0 version, for the app to communicate closely with various device-level features, we need to add plugins that provide access to core Cordova APIs.
The cordova plugin add command requires you to specify the repository for the plugin code. For example, In-app browser:
we need run this in command line. Don't need worries about AndroidManifest.xml or config.xml files. After you run
$ cordova build
, it will auto write for you.You could get more idea about it in doc.phonegap
Add following code in config.xml this works fine for mi.