diff --git a/src/platform/android/java/chip/platform/NsdManagerServiceBrowser.java b/src/platform/android/java/chip/platform/NsdManagerServiceBrowser.java index 4e6bfc70d05f6d..3532182f65d483 100644 --- a/src/platform/android/java/chip/platform/NsdManagerServiceBrowser.java +++ b/src/platform/android/java/chip/platform/NsdManagerServiceBrowser.java @@ -42,7 +42,7 @@ public NsdManagerServiceBrowser(Context context) { this.mainThreadHandler = new Handler(Looper.getMainLooper()); this.multicastLock = - ((WifiManager) context.getSystemService(Context.WIFI_SERVICE)) + ((WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE)) .createMulticastLock("chipBrowseMulticastLock"); this.multicastLock.setReferenceCounted(true); callbackMap = new HashMap<>();