Been having this really annoying problem and I was so happy I found a solution! But it was in kotlin and I was ready to give up. But then I asked chatgpt to convert the code from kotlin to Java and it worked omg