If you can create a B4A library and have the package name of the app that you want to kill its process, you can try this example.
It is just an example for my case, you need to adapt it to your need. What I mean is you have to call the function "killPackageProcesses"
public int KillUnwantedProcess() {
List<ResolveInfo> infos = null;
infos = BA.applicationContext.getPackageManager().queryBroadcastReceivers(intent, 0);
for (ResolveInfo info : infos) {
if (info.activityInfo.packageName.contains("unwantedpackagename") == true) {
boolean result;
result = killPackageProcesses(info.activityInfo.packageName);
returns result;
}
}
}
}
Be aware of that some process is self running, after you kill it, it can restart again.