This method is generally more reliable for newer Android versions like Android 14.