I can't keep the wampserver session when using genymotion with Android. all is ok with localhost (pc) but not with the genymotion emulator. I use retrofit 2.
Here is my code:
<?php
header('Content-type: application/json');
session_start();
if(isset($_SESSION['email']) && isset($_SESSION['firstName'])
&& isset($_SESSION['lastName']) ){
$data["data"] = array(array("result" =>"connected"));
echo json_encode($data);
}else{
$data["data"] = array(array("result" =>"log out"));
echo json_encode($data);
}
?>
json result returns log out. Please help!
I solved the problem , i have used shared preferences to save my profile 's data