Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Charuta_Rajopadhye
Posts: 92
Registered: ‎08-01-2013
My Device: Z10, Q5, Q10
My Carrier: Vodaphone
Accepted Solution

Equivalent of Android CookieManager in BB10

Hi all,

 

Is there anything like a CookieManager from Android in BB10??

 

I need to set the cookie policy in BB10 :

 

CookieManager mCookieManager = new CookieManager();
mCookieManager.setCookiePolicy(CookiePolicy.ACCEPT_ORIGINAL_SERVER);
CookieHandler.setDefault(mCookieManager);

 

Is there any way to do this in BB10 or i'll have to manaually do everything using QNetworkCookie??

 

Please Reply!

 

Thanks and Regards.

Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Equivalent of Android CookieManager in BB10

There's a couple of classes in BB10, start here...

 

http://developer.blackberry.com/native/documentation/cascades/ui/webview/cookies.html


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
Charuta_Rajopadhye
Posts: 92
Registered: ‎08-01-2013
My Device: Z10, Q5, Q10
My Carrier: Vodaphone

Re: Equivalent of Android CookieManager in BB10

Gone through this already.. but its webview related right?

I have a client server architecture and want cookies to be handled automatically between all webservices to and from the server and client.

 

Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Equivalent of Android CookieManager in BB10

Yes it is, how about...

https://developer.blackberry.com/native/reference/cascades/qnetworkcookiejar.html

If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
Charuta_Rajopadhye
Posts: 92
Registered: ‎08-01-2013
My Device: Z10, Q5, Q10
My Carrier: Vodaphone

Re: Equivalent of Android CookieManager in BB10

Yes its possible with QNetworkCookieJar, gone throught the same too, but i need a class like CookieManager in Android that handles cookies automatically, is there anything like this avalable in BB10 that i have missed reading!

Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Equivalent of Android CookieManager in BB10

Not that I know of but it's not something I've spent a lot of time looking at.

If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Equivalent of Android CookieManager in BB10

... and if you've missed reading it then I have to. :-)

If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
Charuta_Rajopadhye
Posts: 92
Registered: ‎08-01-2013
My Device: Z10, Q5, Q10
My Carrier: Vodaphone

Re: Equivalent of Android CookieManager in BB10

:smileyhappy:

Please use plain text.