Android & Wordpress Help center

Archive for the month “March, 2014”

Android: Enable local cookies in Phonegap webview

Have been creating Phonegap and Android hybrid app with mixed native and Phonegap specific UI components lately. Yesterday I came across a scenario where I was not able to get the cookie information. After hours of exploration found that a single missing line of code was all I needed to correctly retrieve my saved cookies. So here it goes:-

Inside your Activity which should extend CordovaActivity you should write:-


Just above the line:-


that is just before loading the webpage.

This will allow cookies to be accepted for file scheme URLs.

Hope it saves your time!

Post Navigation