0

I'm making a gearVR app by opening a webpage first, user need to login first to load the content. It works fine with a fixed user account, but I want to use real user accounts. So I'm using cookies for users to login in separate webpage first, save information to cookie, then read the information in gearVR app to automatically login.

However, samsung default browser for gearVR doesn't pick up well the saved cookie. It works somehow right after I first do login on the page and saved information, fresh the page and it picks up the cookie. But after I close the current page and start a new page with the same link, it cannot read the cookie... The same procedure is tested working well in chrome on the same phone (Samsung S6). I'm using the way to save cookie as this link: http://www.w3schools.com/js/js_cookies.asp

What's the good way to use cookie for samsung browser? Or any way for gearVR to use chrome by default?

Any thoughts would be helpful. Thanks!

sophia
  • 421
  • 7
  • 20

1 Answers1

0

I've just been testing this with this code: https://github.com/poshaughnessy/gear-vr-cookie-test

Demo at: https://poshaughnessy.github.io/gear-vr-cookie-test/

First I tried a persistent cookie... If I visit the page on the phone, it stores the cookie, I put the headset on and it still has the cookie OK. I can go to another page, come back and it's still there.

Next: session cookies. I think this may be what you ran into? I'm setting a session cookie on the phone before putting the headset on, but after I put the phone in the Gear VR, I only get back the persistent cookie, not the session cookie. I guess it is initiating a new browser session with Samsung Internet for Gear VR...

Screenshot

poshaughnessy
  • 1,978
  • 3
  • 21
  • 35