Android Question Executing app code after device orientation change


Licensed User
Longtime User
Hi all,

I am developing an app, which allows user to create and edit wallpapers. One of the features should be the possibility to set different wallpapers based on the device orientation (portrait vs. landscape). Although not only when the application runs, but also when the app is closed.

I need to call a code of my app, which runs everytime the device orientation changes.

Please, how is it possible to call part of my app, which handles setting wallpaper (either portrait or landscape)?

Thank you for help.