Android :: How To Switch On / Off Screen Display?
Oct 23, 2009
I have a requirement to turn the screen display on and off from a Android Service. I should have a function SwitchScreenDisplay (ON/OFF), to ON or OFF the display. I searched through the SDK and found a few APIs and settings. One method I found is
boolean err = android.provider.Settings.Secure.putInt(myThis.getContentResolver(), Settings.System.SCREEN_OFF_TIMEOUT, 1);
But it gave the following security permission exception
[03-14 21:24:41.575: ERROR/DatabaseUtils(1066): java.lang.SecurityException: Permission denial: writing to secure settings requires android.permission.WRITE_SECURE_SETTINGS] even though I had added the following statement in
AndroidMenifestFile.xml <uses-permission android:name = "android.permission.WRITE_SECURE_SETTINGS"></uses-permission>
So my question is: Was the above method is the right way to SWITCH OFF the screen - How does the Long End Key press, switches/powers off the display? Which API it calls? - How to Switch on? Is it using the PowerManager wakelock?
View 3 Replies
Oct 11, 2010
I installed the Pandhome Theme on my Dinc, and now I'd like to go back to the original HTC sence display, but I cant figure out how to do that.
View 3 Replies
View Related
Dec 13, 2009
I have searched the forums, but can't find the information about the app which automatically directs you back to the home screen after a call. I accidently call people and this was very handy. It pulled up the home screen rather than displaying the phone. However, when the recent update was pushed over the air, my phone shut down and required a hard reset. The app was lost and I can't remember the name. Does anyone know?
A side question: Was this update the switch to 2.0 for the Eris? I ran the update, but my phone still says it is running the 1.5 firmware. I obviously had a serious problem with the update and I am not sure it came through.
View 4 Replies
View Related
Feb 1, 2009
Is there a way to pro grammatically force the screen to change between landscape and portrait mode? I want to allow the user to choose a menu item to rotate the screen, instead of relying on pulling out the keyboard. I am looking for something like activity.change Screen Orientation, but couldn't find such a thing in the API docs.
View 3 Replies
View Related
Mar 9, 2010
Is there a way to switch views in a ViewFlipper just like on Home screen, where we have small dots at the bottom of the screen and on clicking on them we can switch views.
View 1 Replies
View Related
Feb 19, 2010
My app has 5 different relative layouts that it can switch between by using a set of buttons that is at the bottom of the screen. 3 of the layouts contain only TextViews and ImageViews. The other 2 both have a ListView in them. On the 2 views that contain lists when the soft keyboard appears the buttons that are along the bottom move up to on top of the soft keyboard. But on the other 3 views the buttons get hidden by the keyboard. The buttons all have the attribute android:alignParentBottom="true" does anyone know why they'd be behaving differently when one of these two are the active layout at the time?
View 2 Replies
View Related
Nov 18, 2010
I am working on an application where I need to go to the next Screen form the Main Actvity when I Click on the Image Button of the Main Activity Screen. I had searched a bit on Net regarding this and found something like the OnClickListener method. I am still stuck for what exactly I want to do actually.
View 3 Replies
View Related
Feb 4, 2009
Here is the problem, I am building an application and have multiple images that need to switch when the user touches the screen, doesn't matter where the users touches. The press the screen and the images switch randomly. I purchased the ebook "Professional Android Application Development" and have torn though it. I am stumped. I'm thoroughly confused at this point. Any ideas on where I can go or how I can accomplish this?
View 11 Replies
View Related
Feb 21, 2010
Fresh 1.1 lock screen is clear. I personally do not like that, BUT when I try to load another one via Pre-kitchen, it loads, reboots, and its still the same. I click to clear cached lock screen, reboots, still the same. Anyone know why it won't change? the boot screen changed first try, so that is good, just that damn lock screen. I don't like the clear thingy.
View 10 Replies
View Related
Feb 21, 2012
When i charge the battery (USB), there is an animation on the screen showing the battery status. Is there any way to turn off thescreen while charging?
My (rooted) phone is:
HTC Explorer (Pico) with "JaggyRom"
Android 2.3.5
HTC Sense 3.5
View 9 Replies
View Related
Nov 11, 2009
I know there are other threads on putting your phone on vibrate, but haven't found an answer to my particular issue. When I'm in the lock/unlock screen, I can go two ways. Swipe right and the phone unlocks, swipe left and the silent mode is on/off. Is there a way to make it go into vibrate mode on/off instead of silent? I NEVER use silent but I ALWAYS use vibrate, and would much rather make that quick switch at the lock/unlock screen than using locale or volume control after unlocking.
View 5 Replies
View Related
May 1, 2010
I have ActiveSync Exchange and my Inc locks every 20 mins, but when I go to unlock and try flip the phone and switch the view to landscape it stays portrait. No a big deal but should it flip to Landscape?
View 2 Replies
View Related
Nov 8, 2010
After upgrade to 2.1 the power button doesn't switch off my screen anymore. It did in earlier version.
View 4 Replies
View Related
Aug 21, 2013
I found that when my WiFi is on, when screen is off due to screen timeout, when I try to open screen again by pressing menu button or power button, nothing happened, I need to switch the mobile on again by pressing power button long press (not normal press to open as usual if you switched off manually)
someone told me because mobile is duos, may be you have only two gateway, when WiFi is one with access of data plan of two Sim cards, may be doing conflict, actually last week I switch data plan access between two Sims last week and I think this problem came with this action, I delete APN access points from one of two Sims but it didn't solve this problem.
View 1 Replies
View Related
Dec 5, 2012
I think I hit something while I was asleep and deactivating my alarm clock. My phone has this stupid blue screen with shortcuts on the bottom. I want to return to the standard home screen. In addition, whenever I try to make a call the phone makes the call with my speakerphone activated. It's a Galaxy SII Skyrocket.
View 3 Replies
View Related
Sep 20, 2010
Basically, I'd like to install the Slide Screen launcher on my Desire, but I don't know if I can switch back to Sense easily. Is there a way to do this, via a simple means, or by downloading a specific launcher switching app?
I'm not comfortable enough with Android yet to Root my phone, but if that is the only way, then so be it. (Although I doubt it is, what with the lovely customisation options we have at our disposal).
View 4 Replies
View Related
May 23, 2010
I kept rejecting phone calls whilst pulling the desire from my pocket, so I have switch the lock screen using lockbot to a side swipe instead, this is working very well.However, now when i receive a call it jumps straight to an answer or decline screen which is just as easy to reject by mistake.Does anyone know a solution this problem? I suppose what im looking for is to have to unlock the phone before answering the call.
View 1 Replies
View Related
Oct 6, 2009
I've switched from the iPhone to the Hero a week ago. I really like the Hero, even though some functions are better on the iphone (like the musci player).
There is one Issue however, which is really bugging me with the HTC, which might make me switch back to the iPHone if I can't find a solution.
Problem:
When I call with my headset (Not the original ones, I don't have huge ear holes....) I can't "switch off" the screen and put the phone in my pocket and call while walking... This sucks, as I have to hold the phone in my hands, which kind of kills the idea of having a headset.
View 1 Replies
View Related
Oct 20, 2010
In my android app, I need to design a Welcome Screen which will be shown to the user only once after the app is installed and opened. The app in question is a database driven app and I would love to include some 3 - 4 screens to help the user create re-usable resources for use within the app and a few tips. They would be Dialog Alerts with the last welcome screen showing the "Do Not Show Again" checkbox. how to show the welcome screen just once.
View 3 Replies
View Related
Apr 25, 2011
My project group for our senior project is developing an Android app. We are pretty much done at this point, but we have to present our app on Friday. We have done a practice presentation with a demo on the emulator, but we would like to present it on my phone.
I was wondering what is the best/easiest way to put my Android display on a PC so we can do our presentation on my phone the way it was meant to be shown.
So it would be my phone connected to a laptop, laptop connected to projector, and laptop displaying my phone's display on the projector.
This way we can also use our GPS location and use the app to take pictures which are both important parts of our presentation.
View 9 Replies
View Related
Nov 12, 2010
I'm new to Android development. I'm trying to use the orientation change to switch between two activities. My idea is to use three Activities one TabActivity and a normal Activity. Here is some pseudo code:
public class Main extends Activity{
// this is the entry point into my app
@Override
public void onCreate(...){
if(this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE){
// Start Activity1
} else { //Start Activity2}..............
I'm taking a different approach. As i need a TabActivity, because i want to be able to start different activities in my tabs (I think i have to use a TabActivity in this case). I've edited the Manifest.xml and added android.configChanges="orientation" for the TabActivity and the second Activity. Then I've overridden the onConfigurationChanged() functions. With this approach I'm able to switch from landscape (this is the "normal" activity") to portrait (the TabActivity). The other way round does not work and i don't know why yet. I've exactly the same onConfigurationChanged functions (Copy & Pasted) and only changed the essential parts. Overriding the onConfigurationChanged of the Activities started in the tabs has no effect, too.
View 1 Replies
View Related
Sep 6, 2010
there's a way to get the screen to automatically switch to home when the phone gets locked via time out or pressing the power button? Running ZenEXP/LP+/geekfor.me vanilla lockscreen.
View 1 Replies
View Related
Oct 28, 2010
I just cannot believe whats happening with my brand new cell phone. Initially when i purchased it , this device started restarting. And when i complain to the SE they told me the battery connecter is damaged. So they sent my cell phone to Dubai SE. Got it replaced, and no restart yet. BUT the right side screen flickers and the switch on/off button is not working. So i cannot switch off my cell phone. If i remove battery and then again insert it, then phone start automatically without using the switch on button. What must be done, i have purchased this cell phone in Qatar and now i am in India. Please help this is so kinda heartbreaking
View 8 Replies
View Related
Mar 14, 2013
My Xperia arc (LT15i) runs CM 10. Whenever I switch camera mode to panorama the camera screen goes black although the capture button and switch camera tab are still there.
View 1 Replies
View Related
May 25, 2010
I am new to android. In my application if user selects the button in the alertDialog I need to open a new screen and I have to display some message on that screen. How to open a new screen?
View 2 Replies
View Related
Apr 20, 2010
The dialog("android.app.Dialog") normally pops up in the center of screen. Can we make the dialog to come in the bottom of screen.
View 5 Replies
View Related
Mar 25, 2009
I am trying to design a UI which utlizes two ListViews on the screen at the same time. Is this possible ?
So here is a quick example of how I was intending to do this.
1) Create an XML which positions 2 ListViews one onto of the other each ListView having there own ID
<ListView android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="198px"
View 5 Replies
View Related
Oct 5, 2010
I tried WebView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN); but view crashed in 1.6 OS. I calculate scale(webview.capturePicture()) but I cannot set it after page loaded. Is it any working solution for fitting webview content to display (1.6 OS)?
View 2 Replies
View Related
Sep 7, 2010
I want to display the image like first image but my images are displaying like second image
i want to display images like first image, like center in screen and equal spaces top and bottom look first image,but my images are displaying not center in screen and no spaces in top,what can i do for display image like first images.anybody knows,please give solution for that.
View 1 Replies
View Related
Oct 18, 2010
In most tutorials is how to display only one of them, I noticed to display an array, main class should use interface from ListActivity, but when i try display something else (like my edittext box) program crashes.
Somebody suggest me To display an array like that:
ArrayAdapter<String> myAdaptor = new ArrayAdapter<String>(this,R.layout.test,myStrings); myListView.setAdapter(myAdaptor);
but this is not doing anything.
Can anyone tell Me what is wrong in this lines or explain me how to solve my problem?
View 2 Replies
View Related