Android :: Default Orientation Of Device
Mar 21, 2010
How can i get the default orientation of a Android device.DROID has portrait as the default orientation whereas many of the android tablets have landscape as the default orientation. I want to determine the default orientation of a android device through an OS call and this orientation should be independent of the device position/ rotation.I will be of great help if somebody can suggest a mechanism to achieve the same.
View 11 Replies
Oct 30, 2009
How do I map the device Y axis to the screen Y axis?I can't figure this out.I'm the developer of Tricorder, and I'm trying to make it so that the accelerometer and magnetometer indicators I draw always point in the right direction.On the G1 phone with the slider closed, all is well.But when I open the slider, I end up showing that gravity is pulling me to the left (if the phone is held with the display vertical).So, I know that the device, and hence sensor, Y axis is always in the direction of the earpiece; and the screen Y axis changes when I open the slider.And I know that I can use remapCoordinateSystem() to change the device axes to match the screen axes.But where do I find out what the device's orientation is?In other words, how do I compute the correct values for the X and Y parameters to remapCoordinateSystem()?
Configuration.orientation seems quite useless.Suppose it is set to LANDSCAPE.What does this mean?Does it mean a device which is "naturally" portrait (i.e. the sensor Y axis points to the narrow end), and which has been turned into landscape mode?If so, which way was it turned?Or does it mean a device which is naturally landscape?In other words, LANDSCAPE could mean that the screen axis is off from the sensor axis by +90, 0, OR -90 degrees.Not much help.So how do I do this?Obviously I want my app to work on all devices, not just the G1 phone.
View 2 Replies
View Related
Dec 18, 2009
I have a camera preview activity, which is forced to stay in landscape mode.Is there a way I can tell the current orientation of the phone (not the screen orientation).Basically I want to know if the user is holding the phone in portrait mode, or in landscape mode, so I can rotate the output captured bitmap correctly (right now it just always outputs in landscape mode).
View 1 Replies
View Related
Feb 18, 2010
I have application in landscape orientation, I set it as <android:screen Orientation="landscape"> in Android Manifest.xml. But when my app starts another activity - default internet browser - it starts in portrait orientation.
View 9 Replies
View Related
Oct 19, 2010
I have set my deveiec property to landscape in manifest file android:screenOrientation="landscape" No at runtime when I am trying to get the current orientaion of device using Configuration and ActivityInfo classes. Its always giving me landscape mode even my device is in portrait mode. Please suggest if you have any method which gives device orientation info at runtime.
View 2 Replies
View Related
Sep 20, 2010
How does my android activity know (is there a callback) when there is a change in screen orientation?
View 1 Replies
View Related
Feb 5, 2009
How do i find the current orientation of the phone (portrait or landscape) How do i find the slider position?
View 2 Replies
View Related
Feb 26, 2010
Is there a mechanism in Android to know the default layout of any device (landscape or potrait)?
View 3 Replies
View Related
May 14, 2009
I have created an activity for my game which handles all orientation changes by itself and has a fixed "portrait" layout. Actually it uses the accelerometer and is rendered using 2D canvas methods. If the level has been completed I show up a highscore dialog in which the user can enter his name. The dialog is floating above the underlying level screen which gets blurred out nicely. This generally works.
Problem is that the dialog does not get rotated if the orientation of the phone changes. So even if the keyboard is exposed the dialog is shown in portrait mode instead of landscape. I have tried to use an activity with dialog theme instead but the behavior didn't change. After several tries it seems that I have found the reason for this: Once there's an activity with fixed orientation in the activity stack then all subsequent activities keep this orientation, too. They will not react on orientation changes anymore (e.g. if the keyboard gets exposed).
After upgrading to 1.5 SDK the described behavior changed a little bit. Now at subactivities indead react on orientation changes like expected. However, the need to have an opaque background! That means that neither dialogs nor activities with dialog theme will work. Those will stick with the orientation of the underlaying activity. So my workaround is to first start a sub-activity with an opaque black background. This activity then shows my highscore dialog on top. It looks quite okay but I wonder if there's a better solution? Is it possible to show a dialog above a fixed portrait or landscape activity which automatically adapts to orientation changes?
View 3 Replies
View Related
Feb 5, 2010
My application collecting some data and have to send it by mail. How can it open the device's default email client?
View 2 Replies
View Related
Oct 8, 2009
I have added a second Virtual Device to test a different screen resolution (QVGA), but now I wanna switch back to the first AVD (HVGA) again. How can I set the virtual device in Eclipse to be used by default or even specifically for my project? In the properties I can only set the API level. I also couldn't find any information in the command line tool documentation to set this manually.
View 1 Replies
View Related
Jun 2, 2010
My app uses a custom View that does a lot of text drawing.To ensure my text is always readable I've been using the result of calling getTextSize() on a newly-created Paint() instance as the minimum size. Docs say calling 'new Paint()' sets attributes like text size to default values.One of my European users just got a Motorola Milestone phone and reports that some text is unreadably small.I believe I've duplicated this using the WVGA854 skin in a 2.1 emulator.Run in that emulator my app's smallest TextViews look fine, but the text I'm drawing myself using Paint instances where I haven't changed the text size from the default is too small. I confirmed this by commenting out all setTextSize() calls in my View subclass: the text becomes too small to read comfortably.
View 5 Replies
View Related
Sep 23, 2013
I have a tablet and I want to set the portrait mode as the default orientation mode instead of landscape mode.
View 2 Replies
View Related
Mar 10, 2010
I would like to see a site where I can register and specify features for a phone and get notified thru email when a device comes to market with those specification. Is there any service already? I am looking for a phone which has the following features:-Android OS 2.1 - with the default google supplied interface(i choose this because , i believe google will try to make future updates in android available for all phones)
View 1 Replies
View Related
Aug 19, 2010
I understand how to force a specific orientation per activity in the android manifest. I would like to know if it is possible to allow the keyboard to change orientation even though the activity(the layout really) must remain unchanged.
View 1 Replies
View Related
Jun 19, 2013
Are there any log files that are enabled by default pertaining to 'device administrators'?
I'm trying to look up the history of when an app with associated device administrator control was disabled? (Lotus Traveler)
I'm running CM10 on a Captivate (SGS1) if that's of any consequence.
View 2 Replies
View Related
Jul 17, 2009
I have a problem with working with the ORIENTATION values of the SensorManager. I would like to have some kind of 360°-value which directly shows me if the phone is in normal portrait (0°), landscape, portrait turned around (180°) or anything in between. So I could have, for example, an arrow that points to the floor (like gravity would do with a plummet) all the time, no matter how I tilt (sidewards) the phone. I thought this would be easy, but I'm pretty confused at the moment.
First of all, the X value of the orientation-array seems to correspondent with how I turn the phone, BUT: if it's completely uprightly standing, this value is about 60° ... why not 0° (or 90°, 180°, 270°), as I would expect?
Second: The value resets if I turn the phone and Android automatically changes screen orientation. So both in Portrait and in Landscape mode it will be sth. like 60° when the phone is in a 0° angel in real world. I set "android:screenOrientation" to "landscape" but this doesn't help anything :/
I want the app NOT to change orientation when I turn the phone, but I want it to get a continuous orientation value when I tilt the phone.
View 4 Replies
View Related
Sep 20, 2010
I want to override the default android messaging application.
If I receive a sms or mms I want to send that to email but i don't want any notification on phone.
So basically I want to replace the default messaging application.
How can I make my application the default one that receive the sms?
View 2 Replies
View Related
Dec 15, 2009
I have installed Dolphin and like it, and I've made it my default browser, which is great. However, it is not only the system default, but it even opens links I click on in the Android provided browser (sometimes I both open). On your computer, when you click links in your non-default browser it doesn't send the links to the default one, and it shouldn't on this OS, either. Any ideas how to keep Dolphin as my system default browser, but not have it open links I click on in the Android web browser?
View 1 Replies
View Related
May 28, 2010
Can someone explain a couple of very simple concepts to me - I'm interested in mobile devices running android and how they are identified over networks. Some scenarios: Device is connected over WiFi - presumably the device has a standard IP address as with any host and can communicate with any other android host over TCP/IP (assuming it knows the participating device's IP? device is connected over bluetooth - how are devices identified in this case? device is connected over mobile operator's network - this is the one I'm interested in and confused by - is there anyway for two or more devices to discover each other and communicate via the mobile operator's network? How does a device communicate with a backend server in this scenario? In other words, how do apps and devices communicate when not connected to a WiFi network?
View 2 Replies
View Related
Jun 6, 2010
I have developed and tested my app on the emulator, and now want to install it on my HTC device. the apk installs successfully, however my database is not going with it. I have created my database using sqliteman browser b/c I have to insert a bulk data before the app starts. I have four tables in my db and call each in different activities and created all on the sqliteman. after the data is inserted I pull back the db onto the data folder of the emulator. it works perfect on the emulator but failed on the device. when I try to pull my db on the real device, it shows access denied problem
View 2 Replies
View Related
Mar 24, 2009
I have developed a sports game which is single player. Now I want to have one more game mode which is multiplayer.
My question is how can i do device to device connection in android using sets of api which can be :
1.Bluetooth - whose APIs are not currently available.
2.gtalkservice - removed from sdk1.0 3.wifi - I dont knw how to connect 2 devices using wifi apis . I have asked about wifi because we have developed a game on iphone which used wifi connection for multiplayer stuff.
Or is there any other apis which can be used for implementation of multiplayer in game ?
View 3 Replies
View Related
Jun 7, 2010
Wasn't sure exactly how to ask this, but here we go So, for example, I installed "Dialer One", a dialer replacement.So whenever I hit the "Phone" button, it asks how I want to complete the action. Using Dialer One, or Phone. And it gives me the option to "Use by default for this action".So, lets say I want to use Dialer One by default, but then I change my mind. How do I set it back to the default Phone.Obviously, this question applies to more than just the phone app. After writing all that I think the simple way to ask my question is- I really just want to know how to undo the 'use by default for this action' choices I may make in the future.
View 2 Replies
View Related
Jun 20, 2010
I have the new HTC EVO 4 and I have certain ringtones set for different people, but my phone keeps playing my default ringtone I set for my phone, How do i fix this.
View 3 Replies
View Related
Oct 29, 2010
I have a standalone GPS enabled data recorder in my car that can function as either a USB host or device. (Its a class 0x00h USB device). I currently connect to it via a WM 6.5 app running on my Palm Treo 750. I would like to port my WM 6.5 app to an Android phone. (I don't have a specific Android phone in mind, I would like it to be as generic as possible).Replicating the GUI is not that difficult, but I am having trouble getting started on the USB communication. I'd appreciate it if someone could point me towards an example, or the appropriate tutorial.
View 1 Replies
View Related
Feb 28, 2014
Basically I have an old iPod touch 2g on iOS 4.x and a Nexus 5.
I want to use my iPod as my media player but I'd like to be able to control music from my Nexus (only basic controls).
Is there an app on either device that allows this? I know tsk skipping can be done by some Bluetooth headphones so I'm hoping there's a way to make iOS accept command from my Nexus
View 1 Replies
View Related
Oct 28, 2011
First of all I have a Sprint Epic Touch 4G AKA Samsung Galaxy 2 S and not rooted,
I keep getting prompt to select which launcher(launcher or twlauncher) when I press the home button. I would select set as default and then select twlauncher. This would work fine and I could do what I want and the home button acts normally. BUT if I long press the home button to bring up task manager and a list of recent apps, it would break the default setting on twlauncher. I could go to setting and manage app and see that the default on twlauncher is now cleared even though I did not manually clear it. I tried checking set as default and then select launcher. It too won't stick AFTER I long press the home button.
Long story short, I downloaded several launchers from the market and none of them will stay set as default IF I long press the home button. It breaks the default every time and ask me to select the launcher to use when I press the home button. Now this would be great if I could just delete all the other launcher and have only one but I can't delete the stock launcher or twlauncher.
So the first time this happen, I was driving down the road using telenav when I see the prompt to select which launcher(something that I've never seen after using the phone for 2 weeks).
1. Start task manager and kill all active app and clear memory from RAM
2. Clear defaults from manage application....twlauncher
3. Click home button, click set as default and then launcher instead of twlauncher- still does not stick after long press home button.
4. Manage application...twlauncher CLEAR DATA (sure enough my neatly organized homepage and apps folder was reset to stock).
5. Pull battery
6. Cycle power on and off.
7. Gave up after 24 hours and factory reset the phone.
8. Went on my merry way and reinstall apps and customizing home page and apps pages and so on.
9. In hindsight, I should have long press home button every time I installed a new app to see which one will break the default.
10. Phone works fine for 24 hours and then it mysteriously acts up again. It ask me to choose which launcher again.
11. Went back to googling and tried the following which did not work:
a. clear media hub data and default
b. installed Sprint "clean" ID and then later deleting it.
c. installed go launcher and see if it will stick
d. installed launcher pro
e. installed home switcher
f. I don't have Qik or some child lock apps
g. search XDA and found about 15 threads and tried everything in those thread short of using Titanium to freeze one launcher.
Right now I just won't long press the home button to bring up task manager or recent apps and everything will work just fine. Minor annoyance but I guess I can live with it until the ICS update.
View 9 Replies
View Related
Feb 13, 2010
I'm using the android plugin for eclipse, and when I try to run my program using a real device through the android device chooser, my phone is not listed as a device. I have updated eclipse and all of the android packages, but it still isn't showing up. My phone is running 1.6, which is also the target version listed in the eclipse project.Also, the reason I decided to try testing on a real device is because the emulator doesn't seem to be working right anymore when I run my project. The emulator launches, but the program never does. Any ideas?(using windows 7/t-mobile mytouch 3g)
View 3 Replies
View Related
Aug 10, 2010
Does anybody have an idea what I may be doing wrong. I have installed the usb drivers and have my device running in debugging mode but when I run my basic hello world application through eclipse my device wont show up in the device chooser. I have also tried re installing the sdk and all the drivers and still no luck.
View 4 Replies
View Related
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