# Browser/Perspective Session startUp()?

**URL:** <https://forum.inductiveautomation.com/t/browser-perspective-session-startup/66598>\
**Category:** Module Development\
**Tags:** perspective, ignition81\
**Created:** [November 16, 2022, 7:09pm UTC](https://forum.inductiveautomation.com/t/browser-perspective-session-startup/66598 "2022-11-16T19:09:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![AMavros](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@AMavros](https://forum.inductiveautomation.com/u/AMavros)\
**Post date:** [November 16, 2022, 7:09pm UTC](https://forum.inductiveautomation.com/t/browser-perspective-session-startup/66598/1 "2022-11-16T19:09:04Z")

</div>

Hello,

I'm trying to keep track the number of sessions between designer, client and browser and while I can see where Designer and Client startUps occur in their respective Hooks, I don't see a spot for any browser sessions? Essentially on Designer/Client startUp I'm making an rpc call to the gateway to let it know a new session has started and to log session information. Am I missing something? I see there's probably stuff in PerspectiveContext I can use to get # of sessions, but when I try to import com.inductiveautomation.perspective.gateway.session (or \*.api) it shows up as not found.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 17, 2022, 7:16am UTC](https://forum.inductiveautomation.com/t/browser-perspective-session-startup/66598/2 "2022-11-17T07:16:19Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/b/4b31041d3a111d9e476ec34163ef67dd02ebe702.png)  
[https://docs.inductiveautomation.com/display/DOC81/system.util.getSessionInfo](https://docs.inductiveautomation.com/display/DOC81/system.util.getSessionInfo)

---

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [November 17, 2022, 7:20am UTC](https://forum.inductiveautomation.com/t/browser-perspective-session-startup/66598/3 "2022-11-17T07:20:13Z")

</div>

Why does it say "ReturnsNice" 🤔?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 17, 2022, 8:00am UTC](https://forum.inductiveautomation.com/t/browser-perspective-session-startup/66598/4 "2022-11-17T08:00:57Z")

</div>

🤷‍♂️

---

<div class="post-metadata">

**Author:** ![AMavros](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@AMavros](https://forum.inductiveautomation.com/u/AMavros)\
**Post date:** [November 17, 2022, 1:36pm UTC](https://forum.inductiveautomation.com/t/browser-perspective-session-startup/66598/5 "2022-11-17T13:36:52Z")

</div>

this is in ignitions scripting library in designer, I'm talking about getting perspective sessions information via the SDK

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 17, 2022, 2:45pm UTC](https://forum.inductiveautomation.com/t/browser-perspective-session-startup/66598/6 "2022-11-17T14:45:19Z")

</div>

Oh, You'll have to use a delegate to access gateway info inside a the perspective component

> <https://github.com/inductiveautomation/ignition-sdk-examples/blob/master/perspective-component/gateway/src/main/java/org/fakester/gateway/delegate/MessageComponentModelDelegate.java>

In the example here you can see he is importing com.inductiveautomation.perspective.gateway.api in there

---

<div class="post-metadata">

**Author:** ![AMavros](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@AMavros](https://forum.inductiveautomation.com/u/AMavros)\
**Post date:** [November 17, 2022, 3:35pm UTC](https://forum.inductiveautomation.com/t/browser-perspective-session-startup/66598/7 "2022-11-17T15:35:11Z")

</div>

Oh ok, yeah I'm trying that but those perspective imports aren't found, and I've tried the "find JAR on the web" and "Find maven dependencies" context actions, this is taken from my GatewayHook.java file:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/6/c655b3c2e5ab70fd9c1f1b8157c792a5fee376e9.png)

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 17, 2022, 3:39pm UTC](https://forum.inductiveautomation.com/t/browser-perspective-session-startup/66598/8 "2022-11-17T15:39:38Z")

</div>

then you'll have to import it... i dont use maven tho i use gradle.  
you might find some other stuff on the forum about importing with maven

---

<div class="post-metadata">

**Author:** ![AMavros](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@AMavros](https://forum.inductiveautomation.com/u/AMavros)\
**Post date:** [November 17, 2022, 4:05pm UTC](https://forum.inductiveautomation.com/t/browser-perspective-session-startup/66598/9 "2022-11-17T16:05:54Z")

</div>

oh ok thanks! I'll look into doing that
