As some of you know I have been working on an app to automatically flip the phone into landscape when it is tilted.
The good news is the app is completed. Sensors pick up the change and send the request to flip the screen.
Now the bad news. Because (and do not ask me why they did this) the SDK does not expose the Surface function to flip the screen to the programmer I am unable to make it flip anything other than the originating program using the Activity. This as you may imagine is a bit of a problem.
I have posts in on several boards hoping there is a work around for this however I have been unable to find one at this stage. I will keep working on it and hopefully have something out shortly.
Sorry.
B.
i hope you get it f9igured out,i would like this program for sure!
Good luck I hope you figure it out
That's too bad! I hope there will be a workaround. Otherwise, thanks for trying!
wow goo luck hope you get and and thanks for your hard work![]()
can you not create a service and use the same methods you use in the activity to rotate the screen depending on the sensors?
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
Sprint HTC Evo 4G - Rooted
CyanogenMod 6.0.0 Froyo 2.2 ROM
CM6-Snap 7.6
Check out my site
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
, we will be developing applications for the Notion Ink Adam Tablet soon!
Follow us on Twitter
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
Follow me on Twitter
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
that is awesome that you have almost got it...
thank you for all your work on this amigo!!!
Nothing helpful to add, but good luck and thanks either way.
I do create a service and it runs in the background just fine detecting when the device rotates. However because google only give you two ways of changing the orientation
1) Activity - setRequestedOrientation
2) Surface - setOrientation
I am limited in what I can do. If I use the Activity method I can only change the orientation for a set Activity (read program) Which is great if I want to write a program and have that one UI flip.
The Surface method is a protected method and despite the API saying I can give my program the perms to use it. That does not appear to be the case. I cannot for the life of me figure out why they made it that way, unless of course they have plans for this themselves. Its possible that because sensors were not included in the Emulator they figured noone would ever want to use it.
I shall keep plugging away - but at this stage I cannot find even one reference (using google of course) To the permission issue and in fact the only ref I can find pertaining to this use refers to the method not being exposed to users.
At this stage I am trying to kludge something by manually updating the resource configuration of the device. This is theoretically where progs go to read the base config of the device including orientation. I have my doubts if this will work though.
Last edited by Bratag; 10-17-2008 at 11:26 PM.
Best of Luck and I hope you are able to Flip and Rotate the "G"!
Bookmarks