tags:

views:

34

answers:

1

Hello,

My question today relates to the android home screen and where it stores icon / widget positions. Specifically, I am interested in accessing the positions and sizes of any icons that are currently being displayed. I have, so far, been unable to find a method of retrieving the positions of other applications but i figure it must be possible in some way due to the presence of third-party home screen applications.

Ideally, I am hoping to query the positions of whatever is on the screen at the moment from a live wallpaper and adjust my rendering accordingly.

Thank you in advance for your time.

+1  A: 

There is no way as far as I know of doing this. You may be able to contact the developer of the homescreen (if it's not the default one or senseUI) and have them expose an API to do this.

Third party homescreens draw all the icons themselves. They REPLACE the original homescreen, they don't just put a theme on top of it.

You should just create your live wallpaper and if the user wants to see it instead of homescreen icons or widgets, they can move them. It would be impossible to take into account all the widgets and crap on the screen.

Falmarri
Thanks for the quick reply. Was actually thinking of only using the default home screen, but the problem still persists. Suppose it might be possible to read the system files (they have to store the data somewhere), but then that would relegate my app to "requires root" and platform-specific status. I don't need too much information, just the position and the size (even if it is only the "1 x 2" type information). Going for something along the lines of the galaxy live wallpaper except with more colors and multiple vertices of rotation.
phobos51594
I would be extremely surprised if you could get that information. Even with rooting, it would come down to parsing preference files or something, depending on how the homescreen stores that info. There simply isn't a way to get home screen information from outside the app.
Falmarri
Parsing system files really doesn't frighten me but you are definitely right: way more work then it is worth. Anyways, thanks for the info.
phobos51594
Well parsing the files would not only be inefficient, but the developer would be free to change how those files are stored whenever they want
Falmarri