I have written a dock app that utilizes the stock dialer within android but it always displays in portrait mode is there a snippet that I must include to get the dialer to respond to being in the dock. How do I call the layout that the stock dock program does?
Thanks in advance.
You can tell the user to put it in a dock, I suppose. If the device is in landscape mode, and the application does not support landscape mode (e.g., the dialer on my Nexus S), that is just the way it is.
More generally, you have no right to dictate how third party applications should look and behave, any more than other people have the right to dictate how your application should look and behave. The application will look and behave how its developers designed. If they have different layouts for landscape or being in some sort of dock, they will use those layouts... when they are in landscape or in some sort of dock.
Related
I'm developing an Android Application which is locked to portrait mode for phones. In one part of the application, the user can look at some nice Graphs. In this part (only), it would be nice to allow the user to change to landscape mode - if he wants to.
I know this would be quite simple if the Graphs were contained in their own activity, but unfortunately, they are not. They are shown by Fragments which in turn are shown in a somewhat complex Tab Layout.
In other words; I want to have to whole app locked to portrait mode except when the user is in a specific Fragment. Then I want to allow him to allow him to change to landscape mode (Not neccessarily by rotating the device, other solutions are welcome too). When the user navigates away from that part of the app from Landscape mode, the portrait mode should be restored.
Is there any way this can be achieved?
you can do it dynamically this way :
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
I have built an app that changes users wallpaper on a timer. I use the standard WallpaperManager.setWallpaper function, and things work great on AOSP-based devices.
However, on some OEM platforms like TouchWiz, it doesn't work for the lock screen (it only sets the launcher wallpaper). Is it possible to fix this? I'm willing to use reflection to access OEM APIs if there is a place to start.
Thanks!
I have a project requirement to create a kiosk based application which will always be in the landscape mode,for which I am making use of a tablet running on 4.2.2.One of the modules has the functionality to make phone calls.For making the calls from my app, I invoke the default android dialer app.However,I notice that even if my device is physically in the landscape mode,at times when the default dialer app is called,it first displays its portrait layout and the quickly switches to the landscape one(which is not visually appealing).Now,since I do not have access to modify the source code of the default dialer app,I was wondering if there is a way that I can specify a system level screen orientation as landscape ?
PS: I have root access for my tablet.
Any help would be appreciated.Many thanks !
There's an app for that: Rotation Locker
You can also add the switch ro.sf.hwrotation 90 in your build.prop file
Preface:
I moved to the S3 from an old flip phone with a small keypad with which I could easily type things like a telephone banking passcode or the like, shielding one hand with the other as I typed.
With the S3 smartphone, the dialpad is huge, making it hard to shield one hand with the other, and the required finger movement is too great and too easily observed.
Question:
Is there any way to either:
(A) Shrink the size of the "in call" dialpad used by the S3, through any means, even a screen scaler or spliiter, or
(B) Achieve a similar end using a custom dialer?
If I rotate the phone to landscape mode, I do get a nice sized, smaller dialer initially, but once I enter the call (say, voicemail), it jumps back to portrait mode and the stock dialer. From the research I've already done on custom dialers, it seems that they don't work once a call starts, so I'm not too hopeful.
Is the only solution to root the phone and hack it very deep? (Obviously, anything can be done with a rooted phone if you know what you're doing.)
Unless the phone provides such a setting, not really. Generally you cannot change/influence apps other than your own, and the only proper way to do this would be to right a custom dialer and replace the system one. A slightly easier way might be to replace the dialer keypad images with custom ones with smaller font, etc. and just repackage the app, but that won't change the overall layout.
Much better: don't use telephone banking, use their website, smartphone app, etc. (if available, if not bug them to create one :)
My app has to support landscape/portrait mode only for tablets, phones will only support portrait mode. What is the best way to implement this?
Options that I am considering:
a) using two apk files, one for phones and one for tablets. The one for phone will lock landscape mode in the manifest
2) using one apk file. Detect that device is a phone, lock landscape mode inside each activity.
any advice will be appreciated.
Regards
You can use a SuperClass for activities and implement this https://stackoverflow.com/a/9629127/710162 on, for example, onCreate().