How to get Hybrid phone online and offline Profile

Hi all, I'm struggling with how to get Hybrid phone online and offline Profile. I have seen the following page. However, it didn't work for me. My javaScript Snippet Code is as below. 'getProfile' works well. However, 'isOffline' doesn't work. Also, I looked into my project '' file and then I found 'isOffline' exists in mxui.js. $(document).ready(function () { var profile = mx.ui.getProfile(); var hoge = mx.isOffline(); alert(String(hoge));{ entity: "Commons.ControlDefaultLoginPage", callback: function (obj) { //console.log("Object created on server"); var varUrl = location.href; obj.set('Url', varUrl); obj.set('Profile', profile); obj.set('isOffline', hoge);{ params: { applyto: "selection", actionname: "Commons.JS_ShowDefaultLoginPage", guids: [obj.getGuid()] }, error: function (error) { alert(error.message); } }); }, error: function (e) { console.error("Could not commit object:", e); } }); }); Could you let me know if I am missing anything.I'm glad if you could give me any advice. 
2 answers

My code on Index.html is as below. I also tried on JavaScript Snipet. The result was same..


<script src="mxclientsystem/mxui/mxui.js?{{cachebust}}"></script> 

// If URL includes local, /SSO/ will be added. this code is for debug. 
var profile = mx.ui.getProfile();
var a = mx.isOffline();
var str = "localhost";
var n = location.href.includes(str);
alert("profile:" + profile);
if(a == false) { alert("a:" + a); }
if(n == true) { 
var doc = document; 
var head = doc.getElementsByTagName("head")[0]; 
var meta = doc.createElement("meta"); 
meta.setAttribute("content","0; URL=/SSO/"); 

if (!document.cookie || !document.cookie.match(/(^|;)originURI=/gi)) 
document.cookie = "originURI=/SSO/";

Does anyone have a solution?



Toshiya, have You solved this problem ? 
If yes, could You share the solution ? :)
I have the same issue about profiles information and switching between 2 profiles.