To fix issues with your code not working on Android 12 and above, you will need to first identify the root cause of the problem. Here are some steps you can follow:
Check for error messages: Look for any error messages in the Android logs or in the Android Studio console. This will help you identify the specific problem that is causing your code to fail.
Review the changes in Android 12: Review the changes that have been made in Android 12 and check if any of them are affecting your code. This can include changes to app permissions, changes to the way apps access the network, or changes to the way the user interface is rendered.
Check for deprecated APIs: If you are using any deprecated APIs, they may not work properly on Android 12. Check the Android documentation to see if any of the APIs you are using have been deprecated or removed in Android 12.
Test on a device running Android 12: If possible, test your code on a device running Android 12 to see if you can reproduce the issue. This will help you identify any specific problems that are related to the new operating system.
Update your code: Once you have identified the specific problems with your code, update it to work properly with Android 12. This may involve updating your app permissions, changing the way your app accesses the network, or updating any deprecated APIs you are using.
Test again: Once you have updated your code, test it again on a device running Android 12 to ensure that everything is working as expected.
Remember, if you are still having trouble, you can always consult the Android documentation, forums, or seek help from a professional Android developer.