get signal strength of both SIM cards and switch data between when one of the signals is weak in android

I have a problem in writing part of the program in android that i want to get the signal strength of both mobile SIM cards and automatically switch the mobile data on the other when one of them is weak In other words, I always want the mobile data on the SIM card with higher signal strength to be on and the SIM card data replacement operation to be done automatically. I write my code with Java in Android Studio.

I would be very grateful if anyone could help me