The question is published on by Tutorial Guruji team.
I’m developing a library that needs to know if the integrating app supports PORTRAIT, LANDSCAPE, or both. I am not asking about getting the current orientation for the current activity as that is pretty trivial.
The goal is so our servers can send the appropriate assets to the app integrating the library.
For example, if the integrating app only supports PORTRAIT orientation, we’ll send only assets needed for PORTRAIT mode. If the integrating app supports both, we’ll send both the assets needed for PORTRAIT and LANDSCAPE mode.
Answer
Screen orientation support is not specified at the application level. It is specified at the activity level (if at all).
Perhaps a better approach is to have the app that uses your library provide you this information instead of trying to extract it yourself.