This is a migrated thread and some comments may be shown as answers.

Cookies Disabled in Lollipop

1 Answer 60 Views
Android Devices
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
John
Top achievements
Rank 1
John asked on 31 May 2015, 12:38 PM

I am trying an sample app using the icenium with session authentication.

The app working working fine in Kitkat and below android devices.

But in Lollipop the session is not maintained for each requests.

I googled these thinks and i found the following, In Lollipop Cookies is disabled by default,

and they give the following code to fix(Please refer this link Code to Fix)

But we don't have any .java file in icenium project right, then how can we apply this code in icenium phonegap?

1 Answer, 1 is accepted

Sort by
0
Martin Yankov
Telerik team
answered on 03 Jun 2015, 02:37 PM
Hello John,

Yes, this was introduced by Android, because all web views share their cookies. This means that you could get the cookies from one app to authenticated in another. While this sounds cool, it actually is a very bad practice since third party apps have unrestricted access too. This is not the app way and we decided to not let this bad practice be available for new apps.

If you have an older app and don't want to rework it to use local storage instead of cookies, then your option is to manually change the target sdk for Android. Right click on your project -> Edit Configuration -> Android -> AndroidManifest.xml. Change the target sdk to 14 which is Android 4.0. This means that your app will be built with the older SDK which does not restrict the cookies.

I hope this helps.

Regards,
Martin Yankov
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
Android Devices
Asked by
John
Top achievements
Rank 1
Answers by
Martin Yankov
Telerik team
Share this question
or