Switching policy based on location?Solved

Participant
Discussion
1 day ago Apr 16, 2026

Hey, everyone. I’m trying to figure out how to dynamically switch policies on our Android Enterprise kiosk tablets based on their location. Basically, I want a rule that says: “If the device is inside this specific fence, apply Policy A. If it leaves the fence, switch to Policy B.”

Replies (5)

Marked SolutionPending Review
Hexnode Expert
1 day ago Apr 16, 2026
Marked SolutionPending Review

Hi @stevenhere. You can use automations to dynamically assign policies based on a device’s location. This ensures that devices are always under the correct restrictions whether they are on-site or off-site. 

Step 1: Assign Policy for Location Compliance  

Use an automation to apply a specific policy when a device enters a designated geofenced area. 

  1. Navigate to the Automate tab. 

  1. Click on New Automation and select Android. 

  1. Define the Action: Go to the Actions section, choose Associate Policy, and select the specific policy you want to apply when the device is on-site. 

  1. Define the Trigger: Set the trigger type to Activity and select Location Compliance (Enter Geofence). 

  1. Save the automation. 

Step 2: Assign Policy for Non-Compliance  

To ensure security when a device leaves the geofenced area, create a second automation to switch the policy or add restrictions. 

  1. Create another New Automation for Android. 

  1. Define the Action: Choose Associate Policy and select the “Out of Office” or “Non-Compliant” policy. 

  1. Define the Trigger: Set the trigger to Activity and select Location Non-Compliance (Exit Geofence). 

  1. Save the automation. 

Marked SolutionPending Review
Participant
1 day ago Apr 16, 2026
Marked SolutionPending Review

Sorry, but I just realized that I’m on the Enterprise plan. So, I’m not able to use the automation feature. 

Marked SolutionPending Review
Hexnode Expert
1 day ago Apr 16, 2026
Marked SolutionPending Review

Got that! In that case, you can make use of a Dynamic Device Group. Navigate to Manage > Device Groups > New Dynamic Group. Here you can choose the geofence location as your criteria, create the group, and assign the policy to the group. When the device enters or leaves the fence, it will automatically be added to or removed from the group, applying the correct policy. 

Marked SolutionPending Review
Participant
18 hours ago Apr 17, 2026
Marked SolutionPending Review

Got it. But how do I actually create a geofence for “Outside of the area”? I see the Polygon tool in there, but how do I set that up? 

Marked SolutionPending Review
Hexnode Expert
16 hours ago Apr 17, 2026
Marked SolutionPending Review

Sure, you can do that! 

To configure the Geo-fencing policy, you just need to select your main region or location (the “inside” area). If the device moves outside this defined area, it will automatically be marked as non-compliant, and any dynamic groups or settings mapped to non-compliance will be applied to the device. 

Here is how to choose a shape for the fence: 

  • Polygon: Enter the latitude and longitude coordinates for each corner, or use the drawing tool to click and outline the geofence directly on the map. The corner coordinates are automatically populated based on your drawing. 

  • Circle: Enter the center point’s latitude and longitude along with the radius (in meters), or use the drawing tool to define the circular area. The center and radius fields are automatically populated based on the drawing. 

For detailed, step-by-step instructions on configuring this, please refer to our help documentation here: Geofencing – Location based MDM restriction – Hexnode Help Center 

Save