diff --git a/src/platform/android/java/chip/platform/NsdManagerServiceResolver.java b/src/platform/android/java/chip/platform/NsdManagerServiceResolver.java
index 4059526..33d5f44 100644
--- a/src/platform/android/java/chip/platform/NsdManagerServiceResolver.java
+++ b/src/platform/android/java/chip/platform/NsdManagerServiceResolver.java
@@ -27,6 +27,7 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.TimeUnit;
@@ -45,6 +46,8 @@
   @Nullable private final NsdManagerResolverAvailState nsdManagerResolverAvailState;
   private final long timeout;
 
+  private ExecutorService mResolveExecutorService;
+
   /**
    * @param context application context
    * @param nsdManagerResolverAvailState Passing NsdManagerResolverAvailState allows
@@ -69,6 +72,8 @@
 
     this.nsdManagerResolverAvailState = nsdManagerResolverAvailState;
     this.timeout = timeout;
+
+    mResolveExecutorService = Executors.newSingleThreadExecutor();
   }
 
   public NsdManagerServiceResolver(Context context) {
@@ -116,29 +121,28 @@
           }
         };
 
-    new Thread(
-            () -> {
-              if (nsdManagerResolverAvailState != null) {
-                nsdManagerResolverAvailState.acquireResolver();
-              }
+    mResolveExecutorService.execute(
+        () -> {
+          if (nsdManagerResolverAvailState != null) {
+            nsdManagerResolverAvailState.acquireResolver();
+          }
 
-              ScheduledFuture<?> resolveTimeoutExecutor =
-                  Executors.newSingleThreadScheduledExecutor()
-                      .schedule(timeoutRunnable, timeout, TimeUnit.MILLISECONDS);
+          ScheduledFuture<?> resolveTimeoutExecutor =
+              Executors.newSingleThreadScheduledExecutor()
+                  .schedule(timeoutRunnable, timeout, TimeUnit.MILLISECONDS);
 
-              NsdServiceFinderAndResolver serviceFinderResolver =
-                  new NsdServiceFinderAndResolver(
-                      this.nsdManager,
-                      serviceInfo,
-                      callbackHandle,
-                      contextHandle,
-                      chipMdnsCallback,
-                      multicastLock,
-                      resolveTimeoutExecutor,
-                      nsdManagerResolverAvailState);
-              serviceFinderResolver.start();
-            })
-        .start();
+          NsdServiceFinderAndResolver serviceFinderResolver =
+              new NsdServiceFinderAndResolver(
+                  this.nsdManager,
+                  serviceInfo,
+                  callbackHandle,
+                  contextHandle,
+                  chipMdnsCallback,
+                  multicastLock,
+                  resolveTimeoutExecutor,
+                  nsdManagerResolverAvailState);
+          serviceFinderResolver.start();
+        });
   }
 
   @Override
