This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Android and the fly likes Activity(?) with no UI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Activity(?) with no UI" Watch "Activity(?) with no UI" New topic
Author

Activity(?) with no UI

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10486
    
    9

On my Android, the max screen time out is 10 minutes which really doesn't help when I am running map navigation. Looking at the API it seems manipulating the Settings.System.SCREEN_OFF_TIMEOUT to -1 should set the display to permanently stay on.

I am thinking the application would have a home screen icon. Touching it would toggle between stay on/whatever time out limit existed before. To achieve this, what should I be writing? Activity? Widget? How do I achieve this functionality, where some code is executed without showing any UI?

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10486
    
    9

Ok it seems setting the application theme to @android:style/Theme.Translucent.NoTitleBar does the trick
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Activity(?) with no UI