Cookie is missing in header while the request send from Android 5.0 Lollipop

82 views
Skip to first unread message

Palani Kumar

unread,
Jun 1, 2015, 12:36:14 PM6/1/15
to phon...@googlegroups.com
Hi,
    I have a Mobile App which is developed by using PhoneGap and the apk created by Telerik Icenium Appbuilder.
    And i have a MVC Website.
   
    I am using a simple Session based authentication for between Mobile App and MVC Site.
    Everything working fine in Android Kitkat and below.
    But In Android Lollipop the session cookie is not send to server.
    So the MVC Site cannot authenticate the request from Mobile App.
    I googled these things, and some answers says "The Cookie is disabled by default in Android Lollipop".
    Anyone experienced this same issue? Any solutions?
   

Jesse Monroy

unread,
Jun 1, 2015, 11:25:31 PM6/1/15
to phon...@googlegroups.com
@Palani,
this is a common question. Both Google and Apple frown on website wrappers, which it sounds like what you are doing. As such, cookies are NOT working on Android. Not sure how you got yours working. I would suspect that the Appbuilder you are using has added it. Adding cookies to phonegap can be done via some Java code, generally Session manager or CookieManager. (See: WebView. search for 'cookie')

Generally, if you want to track the App usage and such, then Mobile Analytics is what you want. If you want security, then getting away from cookies is the best idea. The suggestions is to use localstorage or similar; this also allows more storage space.

Jesse

jcesarmobile

unread,
Jun 2, 2015, 2:22:18 AM6/2/15
to phon...@googlegroups.com
If something is working in most android versions and fails in one of the supported, you should file a bug report on the cordova jira page so cordova developers can take a look
https://issues.apache.org/jira/browse/CB
Reply all
Reply to author
Forward
0 new messages