What is the best way to run a low priority heavy task

I created a capacitor plugin to get contacts and on lower end android devices with 1000 + contacts getting the contacts takes 10 + sec.

While the plugin is working other plugin calls are delayed.

I am looking for a way to lower the priority of the plugin call I created so it will run only after other more urgent plugin calls are finished.

What is the best way to manage threads while using capacitor plugins?

I have very little Java knowledge but from a bit of investigating I found the priority is handled by HandlerThread class, but I couldn’t figure out if there is a way to manually set the priority of a plugin call.

Will appreciate any help or direction