facebook

How to know screen ID

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #328300 Reply

    Max87
    Member

    Hi guys,
    is there a way how to know screen id on which is user on?
    I have problem – user can set sound or vibrate notifiction alarm. Trigger function is called by document.ready(i can’t delete from it).Game works normally, but when I get to main page screen, it sometimes beeps or vibrates(because trigger is called). So I need to determine, if screen id is m1-main and if is, stop the trigger function. I’ve tried to set variable and counts number of reloads, but it doesn’t work.
    Thanks for help

    edit: got it, $(elem).is(“:visible”); did the trick 🙂

    #328312

    Hi Max,

    The page transition callbacks can be used to set a variable on every transition. Then js code can simply read the variable.

    var currentScreenId;
    
    phoneui.postPageTransition = function(newPageId) {
      currentScreenId = newPageId;  
    }
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: How to know screen ID

You must be logged in to post in the forum log in