# Be notified of LicenseState change from the vision scope context

**URL:** <https://forum.inductiveautomation.com/t/be-notified-of-licensestate-change-from-the-vision-scope-context/16374>\
**Category:** Module Development\
**Created:** [December 20, 2017, 10:25am UTC](https://forum.inductiveautomation.com/t/be-notified-of-licensestate-change-from-the-vision-scope-context/16374 "2017-12-20T10:25:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [December 20, 2017, 10:25am UTC](https://forum.inductiveautomation.com/t/be-notified-of-licensestate-change-from-the-vision-scope-context/16374/1 "2017-12-20T10:25:31Z")

</div>

in an AbstractVisionComponent, we have acces to VisionClientContext and to getLicenseState.

In the gateway scope we can subscribe to LicenseState change with :

```auto
context.getLicenseManager().addLicenseStateUpdateListener
```

Can we register from the Vision scope to be notified of LicenseState change ?

---

<div class="post-metadata">

**Author:** ![a.bolatov](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@a.bolatov](https://forum.inductiveautomation.com/u/a.bolatov)\
**Post date:** [February 5, 2018, 5:55am UTC](https://forum.inductiveautomation.com/t/be-notified-of-licensestate-change-from-the-vision-scope-context/16374/2 "2018-02-05T05:55:03Z")

</div>

hello @mazeyrat,

were you able to find the answer to your question?

I am also interested in reacting to **LICENSE\_STATE\_CHANGED** event from inside my **AbstractVisionPanel**.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [February 5, 2018, 7:53am UTC](https://forum.inductiveautomation.com/t/be-notified-of-licensestate-change-from-the-vision-scope-context/16374/3 "2018-02-05T07:53:48Z")

</div>

I did not find a listener to be notified of license change in client scope.  
So I test the license periodiclly with

```auto
LicenseState licenseState = clientContext.getLicenseState(Constant.MODULE_ID);
```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 5, 2018, 1:05pm UTC](https://forum.inductiveautomation.com/t/be-notified-of-licensestate-change-from-the-vision-scope-context/16374/4 "2018-02-05T13:05:25Z")

</div>

Override [notifyActivationStateChanged](http://files.inductiveautomation.com/sdk/javadoc/ignition79/793/com/inductiveautomation/vision/api/client/AbstractClientModuleHook.html) in your ClientModuleHook and forward that event wherever you need it.
