Android :: Programmatically Enabling / Disabling Screen Rotations

Aug 5, 2010

I have an app which displays a large amount of text for the user to read. I've found that when reading while lying down, I get annoyed that the screen rotates even though my head and the screen are aligned. I do not want to set this to be permanently in portrait mode, so I think this would preclude an approach of setting the android:screenOrientation="portrait" in the manifest. Ideally, I would like to enable/disable automatic orientation changes via a preference page.

Android :: Programmatically enabling / disabling screen rotations


Android :: Enabling And Disabling Bluetooth - SDK 3 (OS 1.5) - Programmatically?

Feb 1, 2010

I have written code to enable and disable various things programatically like Wifi, Ringer modes, Airplane modes. All things that you would see in a power toggle widget. The one that I have not found out how to do is bluetooth. It appears that in SDK level 3 (OS 1.5) there is no pretty bluetooth manager class. Has anyone pinpointed any good source examples on enabling and disabling bluetooth that will also be forwards compatible with users running 2.0 (Droid) / 2.1 (Nexus)? I have found a few partial examples in my google searches that I could not get to actually run.

View 1 Replies View Related

Android :: IPhone OS - Programmatically Enabling / Disabling Certain Functionality

Sep 17, 2010

I asked this a while back and didn't get anything useful. I'm hoping now that Android has advanced a few releases, that there will be more options. Here are the things I'm trying to accomplish: Prompt for a PIN when you uninstall a particular app. This would have been set at install time by the user. Disable certain services (text, phone). What would be even better is if I could be selective about it instead of just turning the radios off. For example:

a. intercept outgoing call, is it to one of a few allowed numbers?, yes
=> allow it, no => deny

b. intercept incoming call, is it from one of a few allowed numbers, yes =>...........................

View 1 Replies View Related

Android :: Disabling Screen Sleep Programmatically?

Nov 24, 2010

how to prevent the Android Activity from sleep mode programatically. Or can we declare something related to this in Android Manifest file.

View 2 Replies View Related

Android :: Enabling And Disabling Services

Jul 6, 2010

I am new to Android development and have trouble enabling / disabling the wifi & audio services. I get the appropriate manager instance using the getSystemService method. But I don't get any error when enabling wifi using:

wifiMgr.setWifiEnabled(true);

But the wifi is simply not turned on! Similarly I use

mAudio.setRingerMode(AudioManager.RINGER_MODE_SILENT);
or
mAudio.setRingerMode(AudioManager.RINGER_MODE_NORMAL);.....................

View 1 Replies View Related

Android :: Enabling / Disabling Activities At Run Time

Aug 3, 2009

I have an application that has multiple activities with the intent action.MAIN (category LAUNCHER), so that multiple shortcuts appear in the "Applications" list. Is it possible to disable some of these activities at run-time (so that the corresponding shortcuts disappear from the "Applications" list)?

View 3 Replies View Related

Android :: Dynamically Enabling / Disabling Widget Does Not Work / How To Fix?

Feb 3, 2010

We would like to enable or disable widgets via code. When we say "disable" we mean that a widget which is registered in an application should not show up in the list of widgets available to the user when they try to add a widget to their home screen. This question has been asked, unfortunately, many times without answer. There was one response by Dianne Hackborn to a separate widget question which suggested that it was possible to use the package manager to disable widgets.

View 2 Replies View Related

Android :: Dynamically Enabling / Disabling Widget Does Not Work

Feb 6, 2010

We would like to enable or disable widgets via code. When we say "disable" we mean that a widget which is registered in an application should not show up in the list of widgets available to the user when they try to add a widget to their home screen. This question has been asked, unfortunately, many times without
answer.

View 1 Replies View Related

Android : How To Handle Of Server Requests / Device Rotations?

Nov 21, 2010

I read a lot about handling rotation in android applications, but I still have so many questions and need to much to understand. Let me explain my problem or implementation, that I'm using now in my application. If an activity will be opened, a get request will be sent to server. This request will be executed in a Thread (new Thread(...)) and if request was completed, activity's ui will be refreshed. But what should I do, if the user rotate his device?

View 3 Replies View Related

Android :: Disabling The Screen Unlock Pattern

Nov 27, 2009

I can't seem to UNcheck the box to disable the unlock pattern. Please tell me there's a way as I am now sick of having the draw the pattern.

View 4 Replies View Related

Android :: How Can Programmatically Draw Text On Key Guard Screen / Lock Screen?

Oct 31, 2010

Is there a way to draw on or modify the key guard wallpaper programmatically?It looks simple enough for the home wallpaper, you can use WallpaperManager. But how about for the lock screen wallpaper?

View 1 Replies View Related

HTC Hero :: Way Of Disabling Graphic Which Goes Across Screen?

Oct 9, 2009

I have a rooted orange hero to mcr2.3 On the lockscreen, is there a way of disabling the graphic which goes across the screen? The graphic contains the time and the word orange etc. I would like an arty picture on my lockscreen but the time graphic spoils it. Catch my drift?

View 12 Replies View Related

Motorola Droid :: Disabling Automatic Screen Locking

Nov 12, 2009

Is there any way to get my Droid to only lock the screen when I manually hit the lock button? If using it as a mp3 player for instance it's horrible to have to unlock it over and over again every time I want to skip a track or something.

View 11 Replies View Related

Sprint HTC Hero :: Disabling Lock Screen With 2.1 Update

Jul 1, 2010

I am just getting tired of the lock screen on the Hero. My main problem with it is that, if I use the stock Messaging app, the messages show on the bottom...even though i have my phone locked with a pattern lock. I know I can use handcent and not have to deal with it, but I just want to know how to get rid of the stupid lock screen. I've read around a few places, and I know it's possible on 1.5, but I'm not too sure if it's possible for 2.1. Does anyone know where I can get instructions on who to disable the lock screen for 2.1, if it's even possible. My phone is rooted. Also, if I do disable the lock screen, and then i decide to put in a new ROM on my phone, what will happen?

View 1 Replies View Related

HTC Desire :: Disabling Touchflo And Getting Back To Home Screen?

Mar 28, 2010

If you go to the application section in the settings, click on touchflo and click clear defaults. Then press home. Select, "Home" over "Touchflo", do you get the nexus one style homescreen?

View 3 Replies View Related

Android :: Dim Screen - Set To Sleep Programmatically

Dec 23, 2009

About custom Power Management... Is it allow for my app to dim the screen programmatically??, the goal would be to send the phone sleeping when a Intent.ACTION_BATTERY_CHANGED event is handled by a BroadcastReceiver, just like its done automatically by the OS (if so configured) after x time of inactivity.

View 2 Replies View Related

Android :: App Can Unlock Screen Programmatically?

Sep 25, 2010

My application is launched on car docking event, i want to wake up phone (done by system) and unlock screen when i plug my device.

View 2 Replies View Related

Android :: Go To Home Screen Programmatically?

Sep 16, 2010

I want to go to home screen programmatically in android when i clicked on button. How can i do this?

View 1 Replies View Related

Android :: Turn On / Off GPS Programmatically Without Setting Screen?

Oct 7, 2010

How can we turn on/off GPS programatically without going on setting screen in android?

View 2 Replies View Related

Android :: Going Back To Previous Screen Programmatically

May 19, 2010

How do I go to previous screen manually.say 'on button click'?Its similar to imitate the BACK button click.
I used below code but no luck.

startActivity(new Intent(ViewOfferActivity.this, this.getCallingActivity().getClass

View 3 Replies View Related

Android :: Get Screen Density Programmatically In Droid?

Jul 2, 2010

How to get the screen density programmatically in android?

I mean How to find the screen dpi of the current device?

View 5 Replies View Related

Android ::Unlock Screen Programmatically In Droid?

Dec 24, 2009

I am working on a remote automated test framework for Android based on JUnit (tests run outside android, interacting with code inside it). It's all working fairly well, but one issue I have is that when I automatically start a fresh emulator, the screen starts out locked. This appears to affect my tests being able to run, plus, I want to watch the tests run (buttons clicked, text typed, etc.). If I manually start an emulator and unlock its screen, all works well.

Is there a way to programmatically unlock the screen in Android? A Java API, a command line or shell command, etc. would all be fine. Barring that, perhaps there is a way to start an emulator unlocked?

View 2 Replies View Related

Android :: Programmatically Turning Off The Screen And Locking Phone

Jan 31, 2010

As we know that Android phone gets locked after screen timeout. But I want to lock the phone on demand as well. i.e. without waiting for screen timeout to occur.. As in nexus android phone there is hard button on top for making screen turn off and lock the phone. i have to do same functionality but by using soft key i.e. in a programmatic way. What are the APIs or routines that can help me ? Can someone point me for getting this functionality?

View 5 Replies View Related

Android :: Create Folder In Main Screen Programmatically?

Oct 28, 2010

How to create a folder in main screen programmatically?

View 5 Replies View Related

Android :: Programmatically Delete A Home-screen Shortcut

Apr 10, 2009

I have some questions related to Android's home-screen contents:

1) Is there a way to programmatically delete a home-screen shortcut on Android? I know that it can be done manually but I want to do it in code.

2) Is there a directory where all the contents of the home-screen are stored and, if there is, is there a way to update the contents of this directory?

View 3 Replies View Related

Android :: How To Access Programmatically What Is Displayed In Lock Screen

Feb 15, 2010

Today I am looking for a way to mimic the behavior I know from my HTC Hero's lock screen: the calendar and alarm clock can put text & drawables there to inform about an upcoming event or an expired alarm. The lock screen remains there in that it must be dragged down to dismiss the shown event and there might also be a Snooze button.

But, first question: is this default Android stuff or HTC Sense specific only??
Second question: If it is a common Android thing, why can't I find anything in Google's Android documentation for the topics "lockscreen" or "lock screen" that comes close to my question? Where's the API for it?

My problem is: I want to inform the user immediately - even if I try a standard notification, the user with a locked screen will have to unlock it and drag down the notifications list to see & clear what's going on. sigh Putting an endlessly playing notification sound there is a hassle as it takes at least two swipes down to stop the sound playing!

View 2 Replies View Related

Android :: Programmatically Delete Widget On Home Screen By Click Listener

Oct 26, 2010

I've a widget which i would like to delete programmatically if the user gives the command by clicking on some button or so.. But as per my knowledge the app programme and the widget programme will be running in different processes. So how is it possible to get the controll of another process remote view and delete the same clearing all the db contents related to the widget?

View 1 Replies View Related

Android :: Start Camera Programmatically In Video Mode With Screen Remain Off?

Aug 4, 2010

I want to record and then upload that on server using camera but without any notification. Is their any way to start camera programmatically in video mode with screen remain off?

View 1 Replies View Related

Android :: Changing Screen Brightness Programmatically In Android

Sep 17, 2010

I want to change the screen brightness programmatically in android.
WindowManager.LayoutParams lp = getWindow().getAttributes();
float brightness=1.0f;
lp.screenBrightness = brightness;
getWindow().setAttributes(lp);

But this sample code works on cutcake, not on latest versions. I am using latest version of SDK. How can I do it?

View 2 Replies View Related

Android :: Want Android Email Setup Screen Programmatically

Apr 14, 2010

I could send mail from my Activity when i have already configured with any email account in android ,but in case if have not configured ,is there any way to launch email setup screen from my Activity ,or at least check whether email account is setup before sending a email.
If i haven't set up my email account then the following code takes me to compose SMS/MMS,which i don't want ,Please give your suggestion.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved