Managing App Sessions
Overview
Every launch of a Cloudpaging app is tracked by AppsAnywhere and Cloudpaging with what we refer to as an app session. An app session represents a single launch of an app by a particular user on a particular device and tracks the state of that app on that device through the entire launch and execution process. By tracking app sessions, we can provide the administrator with the ability to not only monitor but also revoke a user's access to an app. This article will describe both of these actions in more detail.
Finding App Sessions
The first step to managing app sessions is finding them. All Cloudpaging app sessions are listed under the Cloudpaging menu in the AppsAnywhere admin portal.
Log into AppsAnywhere as an admin user
Click on Return to Admin to access the admin portal
On the navigation menu at the top of the page, go to Cloudpaging > Manage App Sessions
Here you will see a list of all existing app sessions known to the system.
![](../../__attachments/3120595093/image2018-2-16%2016:47:31.png?inst-v=94a28de5-07b6-4c9a-bd45-302486da2a3e)
You can use the live search box on the top right of the table to filter the list by app name, username, provision or status and page through the results using the other controls found around the table.
Possible Statuses
Here is a list of each of the potential status values for an app session and what each of them means:
Launched - The user has clicked Launch in AppsAnywhere but the app has not yet been added to the Cloudpaging Player (launch in progress)
Added - The app has been added to the Cloudpaging Player but not yet run
Running - The app is currently running on the user's device
Renewal Requested - Cloudpaging is in the process of requesting permission to renew the user's access to the app
Upgrade Requested - Cloudpaging is requesting permission to run an upgraded version of the app
Stopped - The app is sitting in the Cloudpaging Player having previously been run, but is currently not running
Evicted - The app has been stopped from running following an eviction request but is still in the Cloudpaging Player
Awaiting Expiry - AppsAnywhere has determined that the session is probably no longer needed and it has been flagged for cleanup
Expired - The app has been stopped from ever running again following an expiration request but is still in the Cloudpaging Player, pending removal
Removed - The app has been removed from the Cloudpaging Player
Each day a scheduled task will run on the AppsAnywhere servers to clean up the app session table.
App Sessions that are in the removed or expired state will be deleted each day
App Sessions that are in the stopped state will expire after 30 days of no activity (to be deleted the following day)
App Sessions that are in the launched state will expire after 2 days (to be deleted the following day)
Evicting and Exipring App Sessions
Once you have found an app session for a particular user, you have the option to evict or expire that session in certain scenarios.
If an app is currently running, you can evict the app session to force the termination of the app on the user's device. Users will then be free to re-launch the app if they wish.
If an app is in the Cloudpaging Player but not currently running (added, stopped, or evicted) then you can expire the app session to stop the user from being able to launch the app again in the current session.
Evicting an app session does not have an immediate effect. Cloudpaging Player checks in with the server at a heartbeat interval so it can take up to 5 minutes for an app to stop running on the user's device, depending on what your heartbeat time is set to in Cloudpaging.
If an app session is expired, Cloudpaging will actually allow it to run, but it will not authorize it, so it will only run for two minutes. (This sounds slightly strange but is actually so that offline-enabled applications will run straight away without having to wait for a 30-second timeout on authorization when they are offline, who knew!) The same behaviour will be seen for an app that is evicted while running. The user will receive a two-minute warning in the form of a dialog box generated by the Cloudpaging Player that warns them that the app will terminate in two minutes (shown below). This dialog will close automatically if the user ignores it. It will then be followed by another dialog one minute before the app terminates and eventually the app will close itself.
![](../../__attachments/3120595093/image2018-2-16%2017:18:27.png?inst-v=94a28de5-07b6-4c9a-bd45-302486da2a3e)
To evict or expire an app session, simply locate the app session as described above and click either Evict or Expire in the Actions column for that row in the table. You will be asked to confirm this action and then you should see the updated status for that record in the table immediately.
Evicting a user's app session will stop an app that is currently running but will not stop the user from re-launching it. Expiring a user's app session will stop them being able to re-launch it in that session but still will not stop them from going back to AppsAnywhere and launching a new instance. In short, neither action will stop the user from being able to access the app entirely unless you also revoke their access (i.e. their ability to launch that app in the first place) by some other means. This means removing them from the provision, or the directory group to which the app is provisioned, or suspending/deleting the app itself.
The Evict and Expire functionality is intended to be used in addition to revoking a user's access to an app as a way to ensure that they have no existing sessions that they can continue to use.
Mass Evictions and Expirations
If you need to evict or expire more than one app session at a time, then you can select multiple rows in the table at once. When you do this, you can use the mass actions dropdown to the bottom right of the table to select an action to perform on all applicable rows. You will then see a dialog box warning you of the change you are about to make which you must accept before the action will be taken.
Quite obviously, if you select 10 rows and choose to evict them all, only those that are applicable for eviction will be evicted, and the same goes for expiry.
![](../../__attachments/3120595093/image2018-2-16%2017:55:0.png?inst-v=94a28de5-07b6-4c9a-bd45-302486da2a3e)
You also have the ability in the top right of the table to select all and de-select all of the rows in the table.
Online vs. Offline (Floating vs. Fixed) Licenses
It's worth noting that the grace periods for offline licenses are much greater, depending on the offline duration that you defined when creating the license (or the Cloudpaging delivery method). This functionality is still available for offline-enabled licenses but the results may take much longer for Cloudpaging to action if the user is currently offline.