Android :: Fix Orientation Of App On Screen / Control Accelerometer?

Mar 2, 2010

Please tell me how i can stop the change in orientation of application when device rotate. How i can control the accelerometer.

Android :: Fix orientation of app on screen / control accelerometer?


Android :: Accelerometer / Orientation For Rolling Ball Code?

Mar 23, 2009

If I'm reading things right, the accelerometer measures physical forces (i.e. movement) and the orientation sensor gives the tilt of the handset. If you are coding a rolling ball type app which would you use? You could argue accelerometer, in which case you measure each delta force and apply it to your balls physics. Or just the orientation and compute the effects of gravity again on the ball but just using different physics. Is there a preference? Would any be more accurate than the other?

View 3 Replies View Related

Motorola Droid :: Accelerometer Control - Android

Jan 5, 2010

I have looked and looked and looked and I cant seem to find anything that helps me control the accelerometer more then either having it on or off.

Its a little picky, so I need help calibrating it as well as seeing if there is a way I can designate it to only work in certain programs. If there is no way to do that, is there a widget that will allow me to turn the accelerometer on/off that I can download (if so whats the app called in the marketplace)?

View 12 Replies View Related

Android :: Is Orientation Sensor A Physical Sensor Different From Accelerometer?

Oct 30, 2009

Or it's just some virtual sensor the uses the data provided by the accelerometer and the magnetic field sensor to calculate the orientation?

View 7 Replies View Related

Android :: Sounds + Accelerometer - Weird Accelerometer Values - BUG?

Jun 9, 2009

I am developing a game. In which the user controls movement using the accelerometer. Sounds effects can also be enabled. However when laying the phone flat down and playing the game without the accelerometer gives nice 0,0,0 values. However when play WITH SOUNDS on, i get a buch of weird values: while the phone is NOT moving.

This is really a big bug that makes life hard for Game Developers. I tried to take an avarge of the last 5 values from the sensor.. but this is not enough.. The harder the sounds plays: the higher the weird sensor values. When using the headphones: almost no weird values. Seems that sounds interferes with the accelerometer sensor.

View 5 Replies View Related

Android :: Screen Lock Turns Of Accelerometer

Apr 16, 2009

Currently it seems that locking the screen automatically turns off the accelerometer. I looked around for quite a while and didnt find any solution for that. Is that intentional? It would be really helpful to know if this is how it is or if I just didnt find the solution for that so far.thank you for any help on that (and as I said, even "doesnt work right now/on purpose/.

View 5 Replies View Related

Android :: Accelerometer Not Working When Screen Turns Off

Apr 13, 2010

As I understand it, there seems to have been a change in the OS that prevents the accelerometer from running when the screen turns off and the phone CPU goes into its power saving state.Can this be confirmed?I have gotten around this by using a wake lock, but this is a much less than ideal solution as it drains a lot of battery.If the accelerometer was disabled in low power mode to save the battery, it may very well have the opposite effect in many cases, such as mine.A partial wake lock seems to be required to keep it running, which is obviously much worse than if just the accelerometer were running without the need for the wake lock.Are there any other workarounds anyone knows of to getting accelerometer values while the phone is in low power mode?Also, are there any plans to change this in future versions of the OS?If there are no plans to change this, I would definitely like to petition for this to be changed.

View 14 Replies View Related

Android :: Map Accelerometer Values To Screen Coordinates?

Jun 8, 2009

I am developing a small application for learning purpose which will move image when accelerometer readings change. I want a mapping of accelerometer values to screen coordinates. I am using trial and error method rite now. But it seems that it will not help. Is there any algorithm??

View 2 Replies View Related

Android :: 2.0.1 - Accelerometer Seems To Stop Working When Turn Off Screen?

Dec 14, 2009

This used to be (what I thought was) a hardware problem with the G1 at some point, but I thought it was resolved for the Droid.

View 2 Replies View Related

Android :: Rotate Screen By Program Code But Not Accelerometer Sensor?

Sep 17, 2010

There are some shortcoming for system's rotate screen function:

1. It is too sensitive to result in many unwanted rotating actions.

2. Accelerometer consumed power greatly. I want disable it and control screen orientation by my own program. Is it possible?

View 9 Replies View Related

HTC Hero :: Accelerometer Turn Screen To Right?

Oct 14, 2009

If it could turn to the right as opposed to the left, typing on the landscape keyboard would be much easier. The botton of the phone would not get in the way. Just wondering.

View 1 Replies View Related

Motorola Droid :: Disable Accelerometer Home Screen

Mar 5, 2010

It seems no matter what I put my settings to, the home screen always has to change orientation when I rotate my phone sideways. This is quite an annoyance. I just want the home screen to be in portrait at all times (unless I open my keyboard). I'm currently on Smoked Glas 5.0.1.

View 9 Replies View Related

General :: Karbonn A30 Screen Rotation And Accelerometer Stops Working

Apr 20, 2013

I got my son a Karbonn A30 yesterday, and so far, the auto rotation as well as acceleration stopped working twice. I tried formatting cache but it did not work. the only workaroud is to open the phone, remove battery and restart again. I could not get any solution except the battery removal one.

View 4 Replies View Related

Android :: How To Check Screen Orientation While Call On Screen?

Dec 16, 2009

Is it possible to check the screen orientation (I mean whether the screen in landscape or portrait mode) while the outgoing call is going on.If it possible please suggest me how to achieve that.

View 2 Replies View Related

Motorola Milestone :: Manually Rotate Screen Or Keep / Fix Current Screen Orientation

May 29, 2010

is it possible to manually rotate the screen or fix the current screen orientation (with a key/button)? because it really annoys me having taken portrait pictures that cannot be viewed (with the media gallery application) in a portrait fashion on the milestone. this is because it always rotates the portrait picture back to landscape when rotating the milestone from landscape to portrait. right now there is no way of properly viewing portrait pictures on the milestone other than tilting your head (holding the milestone landscape and tilting your head along).this cannot be the way it was intended to be, right? or do I have to get a different viewing software which allows you to choose screen orientation? is there such an app?

View 1 Replies View Related

Android :: Set Screen Orientation Of A Tab

Mar 18, 2009

I would a Tab (in a TabHost) to have a Landscape orientation while the activity with the TabHost is in Portrait orientation, is that possible (if so how)? I tried setting the orientation of the Activity displayed in the tab in the Manifest but it didn't work.

View 7 Replies View Related

Android App And Screen Orientation

Jan 19, 2012

I was wondering if there was any java code that will allow you to make sure each window in your app stays in portrait despite the user flipping the phone to landscape. I already tried inserting android:screenOrientation="portrait" into both my android manifest and into every single XML file I had but unfortunately only some stayed in portrait and others still flipped to landscape.

View 3 Replies View Related

Android :: Screen Orientation Change

Oct 8, 2009

I notice when using the emulator that when the screen is flipped, I get a following logcat message:

INFO/WindowManager(589): onOrientationChanged, rotation changed to 1

How can I catch this in the code? I want to know whenever the orientation changes. I assume I have to set a listener, but I can't find an example anywhere.

View 6 Replies View Related

Android :: Keep Screen On And Change Orientation

Feb 11, 2009

I am making an Android app which is currently coming along nicely - I've hit upon a couple of stumbling blocks.

1) How do I stop the screen from going dim/off and the phone locking while the application is running?

2) Can I force the phone to enter landscape mode on running my application?

View 2 Replies View Related

Android :: Handling Screen Orientation

Jul 6, 2010

My project is working fine when i hold my HTC device vertical.But the moment i rotate my screen 90degrees , it throws a force close error.Starts all over again, runs fine until i again change the orientation.How do i handle it ?

View 1 Replies View Related

Android :: How To Get Current Screen Orientation

Jul 2, 2010

I simply want to do code...

The problem is - getRequestedOrientation always returns -1. Any suggestions?

View 2 Replies View Related

Android :: Live Wallpaper Screen Orientation

Sep 23, 2010

I have a series of live wallpapers out and one major sticking point I have with a certain set is that when devices switch to Landscape, the wallpaper, which in most cases is an image designed to fit the screen in portrait mode, appears off center. What is the conventional way to detect the shift from portrait to landscape?

View 2 Replies View Related

Android :: Threads And Screen Orientation Change

Aug 30, 2009

In the following sequence of events:

1. Start a new thread (as a result of a button click - or similar).

2. User changes the screen orientation (causing the Activity that started the thread to be destroyed).

3. Thread finishes, and wants to do some dialog (or any UI) work. However, doing a showDialog, dismissDialog, ... will crash, as the thread it still referring to the old Activity.

This can be solved by updating the data in the thread to refer to the new Activity upon a screen orientation change.

However, couldn't the Android framework just forward any requests from a destroyed activity, to the newly created Activity, saving us developers of handling it ourselves?

View 24 Replies View Related

Android :: On Screen Orientation Changes Activity Restarted

Aug 16, 2010

I know on screen orientation changes activity restarted, but suppose i don't want to restart the activity then what should I do? I had tried it by adding in manifest.xml. android:configChanges="keyboardHidden|orientation"

and override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); }

But still activity restarted each time when I change screen orientation.

View 17 Replies View Related

Android :: OutOfMemoryError When Changing Screen Orientation

May 8, 2009

I get an OutOfMemoryError every time i change the screen orientation and I am having a hard time finding the mistake...

The Activitie's view consists of an ImageView, two Buttons and a Spinner. I don't have static variables and can't imagine where i could leak a context.

Most of the times, the exception is thrown at setContentView (R.layout.upload); sometimes it goes fine until imgUpload.setImageURI(imageURI);

The images i am displaying are form the G1's camera, so about 500kb and 2048x1536pixels

Here is some code:

CODE:..................

View 3 Replies View Related

Android :: Prevent An App From Going To Home Screen When Orientation Is Changed?

Nov 18, 2010

I snap a photo, and it gets placed onto an ImageView. When the user sees the page where the Image View is, and I turn the phone sideways where the orientation is horizontal, the app immediately returns to the app's main screen.

View 1 Replies View Related

Android :: Way To Force Screen Orientation To Landscape Right As Of Froyo?

Sep 24, 2010

We currently use Activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_x) to set (and 'freeze') the orientation of our app. Froyo now supports two landscape modes tho and we'd like to allow our users to orient the app to 'landscape right' ... ie, the orientation obtained by turning a device naturally oriented to Portrait 90 degrees clock wise.

View 3 Replies View Related

Android :: Force Screen Orientation And Destroy Call

Aug 27, 2009

I want my Activity to be always in portrait mode and I do NOT want the onDestroy() method to be called. There are some interesting articles about that at: http://www.androidguys.com/2008/11/24/rotational-forces-part-four/

The solution seems to be: In AndroidManifest.xml:

CODE:...............

I've tried it and it seems to work. Is there any other alternative or is it the correct solution?

View 7 Replies View Related

Android :: Catch Screen Orientation Change In OnPause()?

Apr 23, 2010

Specifically, I need a way of _not_ performing the onPause functionality I've implemented when it occurs because of a change in screen orientation.

View 9 Replies View Related

Android :: Display Image From URL - Sizing And Screen Orientation?

Aug 30, 2010

I am trying to display an image from a URL, which may be larger than the screen dimensions. I have it kind of working, but I would like it to scale to fit the screen, and I also have problems when the screen orientation changes. The image is tiny, and I would like it to scale its width to the screen as well. (In both cases, I would like the image to fill the screen width with scrollbars (if necessary for height).

Here is my ImageView:

CODE:..............

Here is the java code which loads the image: (some error handling code removed for simplicity)

CODE:.........

I have tried different settings for android:scaleType. I'm sorry if this question has been asked before. I've gone through a number of tutorials on the subject, but they don't seem to work for me. Not sure if it has anything to do with the way the image is loaded. (from the web instead of a local resource)

Another issue is that sometimes the image doesn't even load. There are no runtime errors, I just get nothing in the ImageView.

View 1 Replies View Related







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