This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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: 10170
    
    8

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: 10170
    
    8

Ok it seems setting the application theme to @android:style/Theme.Translucent.NoTitleBar does the trick
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Activity(?) with no UI
 
Similar Threads
How to launch third party application in resized window?
How to return value from child gui to parent class
Splash Screen
is it possible to display progress bar switching between one activity to another activity in android
Is there an easy way to make UIs?