Search code examples
androidrotationwallpaperhomescreen

Android - Check if rotation available on homescreen/launcher


I'm currently writing an Wallpaper application for android. I wish to support rotations that's no problem. For a better usability I need to know if the homescreen rotate the screen.

Is there a default that all phones doesn't rotate there homescreen? Currently all phones I have seen didn't rotate. But tablets change the orientation of homescreen. Or there are differences between manufacturers?

I have search for a method (or constant) like boolean supportRotation();

Does anyone have any experience with this problem?

Thanks for help.


Solution

  • I've read that this is not possible, given the fact that any particular user could be using any one of hundreds of launchers available for the home screen.

    You could explicitly allow the user the option of enabling the rotation feature, depending on their home screen configuration. i.e - just a simple checkbox in your app.

    Alternatively you could extend the app for more screen sizes. Since you are already dealing with different screen widths/heights you could just make this compatible for all screens. Not as trivial though.

    You can determine the screen orientation within the app itself but the home screen is a different story altogether.

    If someone does have a solution I'd be glad to know, but I don't believe it exists, I've experienced the same problems as you too.