[Q] Force Orientation for other apps (with root?) - Android Software Development

Hi,
I know screen rotation was removed with 2.01+, but is there a way (with root rights) to force a screen layout?
As I am currently developing an app that reads out text messages and sets media volume to max after entering car mode, it would be great to have it changing the layout.
And even if it is not possible to force a mode, how can I enable "Auto Rotate"?
Thanks,
Marc

You can specify which orientations each activity can have in the manifest file
Sent from my Thunderbolt

Yes, I know how to change the layout for my app, but I want to change another's app layout ;-)

The only way I know is to change it's manifest file and repackage it
Sent from my Thunderbolt

What about spoofing the accelorometers reading... so no matter how you hold the phone it will think it is in the orientation you want
From something awesome

Yeah, I googled that before but didn't find anything. Is that actually possible?

Related

Auto rotation

Does Nexus 7 have auto rotation or not? When I turn it from vertical to horizontal, the screen does not change at all.
ScottXe said:
Does Nexus 7 have auto rotation or not? When I turn it from vertical to horizontal, the screen does not change at all.
Click to expand...
Click to collapse
Yes it has auto rotate but it may not work for a couple of reasons:
It will not work on the "homepage" as for some reason, it is still not available to landscape your homepage.
If your in apps, like the broswer etc, then yes it should auto-rotate, but my Nexus 7 also had this turned off by default.
Goto your settings -> display -> auto rotate. (Im 90% sure its under display )
Make sure the box is ticked
Hope I helped
ScottXe said:
Does Nexus 7 have auto rotation or not? When I turn it from vertical to horizontal, the screen does not change at all.
Click to expand...
Click to collapse
If you're wondering how to enable rotation on the launcher (homepage), you can do it a number of ways. If you don't want to root, you can install an app like ultimate rotation control from the play store. You can also install an alternate launcher like Apex or Nova.
If you want to root, you can flash a ROM that has tablet mode such as Paranoid Android. You can also edit the build.prop file but I wouldn't recommend the latter as it seems to have negative repercussions in system apps.
Sent from my Paranoid Nexus 7
Wilks3y said:
Yes it has auto rotate but it may not work for a couple of reasons:
It will not work on the "homepage" as for some reason, it is still not available to landscape your homepage.
If your in apps, like the broswer etc, then yes it should auto-rotate, but my Nexus 7 also had this turned off by default.
Goto your settings -> display -> auto rotate. (Im 90% sure its under display )
Make sure the box is ticked
Hope I helped
Click to expand...
Click to collapse
Very strange - there is no auto rotate option as per you described. Where does it go?
ScottXe said:
Very strange - there is no auto rotate option as per you described. Where does it go?
Click to expand...
Click to collapse
Easiest way, when you pull the notification bar down, you will see 2 Icons right at the top of the notification bar.
One will be three lines, with dots on them, which looks like the icon of the "Settings" app.
Next to that, you will see something with two arrows, and in the middle either like a screen of a device, or a padlock.
That is what you want to click, if the padlock is there, then rotation is locked, if you have the device screen, with the two arrows, auto rotate is enabled.
Hope this helps.
If you want more help download the application nova launcher.
Once you have nova, open it up and go to "look and fell". Once In there go Into screen orientation and click on auto-rotate.
When you finish do the command above, and it all should work
Sent from my Nexus 7 using xda app-developers app
ScottXe said:
Does Nexus 7 have auto rotation or not? When I turn it from vertical to horizontal, the screen does not change at all.
Click to expand...
Click to collapse
add this to the end of your build.prop file and reboot, then youll be able to autorotate your homescreen. no, adding this to your build.prop file will not hurt your device or cause issues as others here have stated..
launcher.force_enable_rotation=true
simms22 said:
add this to the end of your build.prop file and reboot, then youll be able to autorotate your homescreen. no, adding this to your build.prop file will not hurt your device or cause issues as others here have stated..
launcher.force_enable_rotation=true
Click to expand...
Click to collapse
Works great! Thank you!
The auto rotate is turned off when you have stock jelly bean. But if you pull down the menu you can change it there.
Apex Launcher does it too.
The cheapest way ist modifying the build.prop
An nice app but it cost is
look for "Ultimate Rotation Control" in app store
goes like hell
Don't use the rotation control app, at least not in auto or forced auto. It kills performance.
Sent from my Nexus 7 using Tapatalk 2
simms22 said:
add this to the end of your build.prop file and reboot, then youll be able to autorotate your homescreen. no, adding this to your build.prop file will not hurt your device or cause issues as others here have stated..
launcher.force_enable_rotation=true
Click to expand...
Click to collapse
What is build.prop file and where is it to find for the modification?
RE
The Rotation Control app worked great on my Nexus 7.
I can't say the same for my GS3;
it kept resetting itself to "Forced Auto".
The build.prop method is easy, and works mostly well.
My only problem seems that the Play Store app always crashes when the screen rotates in the app drawer. I'm not sure yet if it happens anywhere else, but so far everything else is good.
The build.prop file is in the "/system/" folder, and you'll need root access to get to it.
Once rooted, get ES File Explorer from the app store.
You'll need to enable "Root Explorer", "Up to Root" and "Mount File System" in the app's "Root Settings" to reach and edit the build.prop.
Once you find the build.prop file in the /system/ folder, you can press it and choose to open it with ES Note Editor.
!!!!! WARNING !!!!!
Before you start messing with the build.prop file,
you'd be smart to make a nandroid backup in CWM.
The slightest typo or mistake can cause your device to not boot up.
You've been warned...!
!!!!! END WARNING !!!!!
But, assuming you add the line accurately to the bottom of your build.prop, you'll be ok.
Rezard said:
!!!!! WARNING !!!!!
Before you start messing with the build.prop file,
you'd be smart to make a nandroid backup in CWM.
The slightest typo or mistake can cause your device to not boot up.
You've been warned...!
!!!!! END WARNING !!!!!
But, assuming you add the line accurately to the bottom of your build.prop, you'll be ok.
Click to expand...
Click to collapse
also, in case you mess something up in you build.prop file, any kind of edit, not just this, you can just reflash your current ROM(no wiping of anything) without anykind of data loss or repercussions. well, OK, one repercussion, a loss of about 3-4 minutes

[Q] Change application opening when docked

Hey guys,
Looking to change the default action when docked, currently I've set it to daydream which works fine but would like to set it up to play TuneIn from time to time. Is there a specific app in charge of the dock which I need to reset or is it a daydream setting?
I've tried turning daydream off but that didn't change anything...
iamcarl4ever said:
Hey guys,
Looking to change the default action when docked...
Click to expand...
Click to collapse
You'll wanna check out the Tasker app, as well as the tutorial: pocketablesDOTcom/tag/beginners-guide-to-tasker.
Note: I can't post links yet, so replace the "DOT" with a "." :highfive:
Not really looking for a third party app, just a way to change the default setting

How to change DPI for S View window?

I changed my system DPI but it's causing the S View window content to be resized too. I have App Manager Xposed that can change per app DPI too. Which app controls the S View display? I dont want to switch the entire system back.
I've just had a look through the list and can't find anything directly to do with it either. Have you tried changing the TouchWiz DPI in xposed app settings, perhaps it's tied to the launcher?
Sent from my SM-N9005 using Tapatalk
This is killing me trying to figure it out. I really prefer a 340 DPI but I can't stand the undersized S-View window. I've changed everything I can think of in per app but the only way I can get the S-View window back to fit the case in reverting the entire device DPI. I'm starting to suspect it might be embedded in the systemUI.apk.

			
				
RavenY2K3 said:
I've just had a look through the list and can't find anything directly to do with it either. Have you tried changing the TouchWiz DPI in xposed app settings, perhaps it's tied to the launcher?
Sent from my SM-N9005 using Tapatalk
Click to expand...
Click to collapse
For previous devices (and I think this will work with the Note 3), I used ROM Toolbox Pro:
http://www1.zippyshare.com/v/75886567/file.html
Once you have installed this program, follow these steps to change the DPI:
1)Open the application
2) select build.prop Editor
3) Search for ro.sf.lcd_density
4) Select the first option and then from this menu, select property value
5) Enter the new property value and click on done
6) When saving, it will ask if you wish to reboot, select no
7) Select second option for ro.sf.lcd_density and then from this menu, select property value
8) Enter the same values as you did previously in step 5
9) Click on done
10) When prompted, reboot the device
Once the device reboots, you should have your desired DPI. I think there may be options for SView within this program as well but not too sure as I usually had people do all the mods for me as I'm quite new to this myself.
cellrama said:
For previous devices (and I think this will work with the Note 3), I used ROM Toolbox Pro:
http://www1.zippyshare.com/v/75886567/file.html
Once you have installed this program, follow these steps to change the DPI:
1)Open the application
2) select build.prop Editor
3) Search for ro.sf.lcd_density
4) Select the first option and then from this menu, select property value
5) Enter the new property value and click on done
6) When saving, it will ask if you wish to reboot, select no
7) Select second option for ro.sf.lcd_density and then from this menu, select property value
8) Enter the same values as you did previously in step 5
9) Click on done
10) When prompted, reboot the device
Once the device reboots, you should have your desired DPI. I think there may be options for SView within this program as well but not too sure as I usually had people do all the mods for me as I'm quite new to this myself.
Click to expand...
Click to collapse
That will set the DPI globally though, not just for that one particular component. It may need a logcat to find the process that calls up the S-View when activated to pin it down.
Sent from my GT-N5100 using Tapatalk 4
...!!!!
cellrama said:
For previous devices (and I think this will work with the Note 3), I used ROM Toolbox Pro:
http://www1.zippyshare.com/v/75886567/file.html
Once you have installed this program, follow these steps to change the DPI:
1)Open the application
2) select build.prop Editor
3) Search for ro.sf.lcd_density
4) Select the first option and then from this menu, select property value
5) Enter the new property value and click on done
6) When saving, it will ask if you wish to reboot, select no
7) Select second option for ro.sf.lcd_density and then from this menu, select property value
8) Enter the same values as you did previously in step 5
9) Click on done
10) When prompted, reboot the device
Once the device reboots, you should have your desired DPI. I think there may be options for SView within this program as well but not too sure as I usually had people do all the mods for me as I'm quite new to this myself.
Click to expand...
Click to collapse
I appreciate your response but I think you missed the point. We have already changed the devices entire DPI to our liking using that method. The problem now is that we want to use App settings Xposed module to change JUST the S-View window back to stock but we don't know which APK controls the S-Window DPI.
GrandMasterB said:
I appreciate your response but I think you missed the point. We have already changed the devices entire DPI to our liking using that method. The problem now is that we want to use App settings Xposed module to change JUST the S-View window back to stock but we don't know which APK controls the S-Window DPI.
Click to expand...
Click to collapse
Did you try changing touch wiz to see if that made any difference?
Sent from my Galaxy Note III using Tapatalk
RavenY2K3 said:
Did you try changing touch wiz to see if that made any difference?
Sent from my Galaxy Note III using Tapatalk
Click to expand...
Click to collapse
I did actually and that didn't do it. Thanks for the suggestion. I did however find that the lock screen and subsequently the S-View window are controlled by the AndroidSystem.apk. So it's not as easy as I had hoped. Hopefully somebody smarter than me would be able to decompile the apk and adjust just the DPI for the lockscreen specifically (if thats even possible) or possibly make a module for Xposed that changes the lock screen DPI separately. As of right now there is no way to change it using App Settings without changing the entire AndroidSystem.apk
GrandMasterB said:
I did actually and that didn't do it. Thanks for the suggestion. I did however find that the lock screen and subsequently the S-View window are controlled by the AndroidSystem.apk. So it's not as easy as I had hoped. Hopefully somebody smarter than me would be able to decompile the apk and adjust just the DPI for the lockscreen specifically (if thats even possible) or possibly make a module for Xposed that changes the lock screen DPI separately. As of right now there is no way to change it using App Settings without changing the entire AndroidSystem.apk
Click to expand...
Click to collapse
That sucks (for you at least, I don't have the S-View) I'd have thought seeing as Android all fairly modular, that there would be something that wouldn't involve global changes for that one component.
Sent from my Galaxy Note III using Tapatalk
RavenY2K3 said:
That sucks (for you at least, I don't have the S-View) I'd have thought seeing as Android all fairly modular, that there would be something that wouldn't involve global changes for that one component.
Sent from my Galaxy Note III using Tapatalk
Click to expand...
Click to collapse
I have exactly the same problem I'm looking for it too If you found the solution I'm interested
Kinoal said:
I have exactly the same problem I'm looking for it too If you found the solution I'm interested
Click to expand...
Click to collapse
Any update? I'm in the same position. I guess the easy work around is setting build.prop to 480 and change the settings per app in xposed . I was hoping for the opposite
Jbroad572 said:
Any update? I'm in the same position. I guess the easy work around is setting build.prop to 480 and change the settings per app in xposed . I was hoping for the opposite
Click to expand...
Click to collapse
Still no way to have launcher, notification pull down etc at an adjusted dpi as that will change the s-view dpi as well. Hoping for a fix from a dev at some point.
njfoses said:
Still no way to have launcher, notification pull down etc at an adjusted dpi as that will change the s-view dpi as well. Hoping for a fix from a dev at some point.
Click to expand...
Click to collapse
+1:good:
See here:
http://forum.xda-developers.com/showpost.php?p=47688064&postcount=13
sview
Hi,
I am not sure about note 3, But for Samsung Mega and Samung s4, the sview file xml lies in the framework-res.apk in System/Framework
So.. open the apk using the smali tools.. and change the layout of the sview there.
It might help.
JesseTron said:
I changed my system DPI but it's causing the S View window content to be resized too. I have App Manager Xposed that can change per app DPI too. Which app controls the S View display? I dont want to switch the entire system back.
Click to expand...
Click to collapse
com.sec.android.sviewcover @ 480 bye App Settings.
unplugged138 said:
com.sec.android.sviewcover @ 480 bye App Settings.
Click to expand...
Click to collapse
This package does not exist on my Verizon Note 3 (rooted MI9 software)
Download app settings from Xposed
Search sview
Apply the DPI to 480
The only issue after that is trying to adjust the camera from the S-View screen. The buttons will be out of place but I didn't bother changing the DPI and left it
Good as it gets for now

[Q] Increase Touch Screen Sensitivity with Tasker

Hi any one here knows how to automatically turn on increase touch sensitivity using tasker? I like to enable this mode whenever i open any drawing apps since a metal pen works well as a stylus when this mode is enabled.
thanks!
you can enable it from the notification bar , expand it and it will appear at the last line
Sent from my SM-G900F using Tapatalk
dinocol said:
Hi any one here knows how to automatically turn on increase touch sensitivity using tasker?
Click to expand...
Click to collapse
You have to know the process name to hook it with Tasker. Perhaps someone has already looked into this and can tell you the name. Usually people request in the Tasker support forum.. and time permitting, the Devs there will find out the process name for you.
Or you could decompile apks, look at the source code or log cats to identify the process yourself. Which is probably how the Tasker Devs do it as well.
.

virtual keys edit

I've seen some apps that change the basic virtual keys to others. I remenber an app changing the virtual back,home and recent app buttons , to only one camera button, and after exiting the app it's back to normal
How is that possible ?
i want to remove the recent apps button.
TakisBeskos said:
I've seen some apps that change the basic virtual keys to others. I remenber an app changing the virtual back,home and recent app buttons , to only one camera button, and after exiting the app it's back to normal
How is that possible ?
i want to remove the recent apps button.
Click to expand...
Click to collapse
I don't think that is possible without root... The only thing one could do is completely hide the navigation bar with immersive mode, and then perhaps draw a custom bar on the bottom of the screen which looks just like it. But I'm interested, can you remember which app exactly had that behaviour?
SimplicityApks said:
I don't think that is possible without root... The only thing one could do is completely hide the navigation bar with immersive mode, and then perhaps draw a custom bar on the bottom of the screen which looks just like it. But I'm interested, can you remember which app exactly had that behaviour?
Click to expand...
Click to collapse
i've seen many apps doing that, but i remenber only mini-lock ( can't give link because it is on blackmart )
immersive mode is only for >=kitkat , i might have problems with that...
i might have to take a look at android's lockscreen source code
TakisBeskos said:
i've seen many apps doing that, but i remenber only mini-lock ( can't give link because it is on blackmart )
immersive mode is only for >=kitkat , i might have problems with that...
i might have to take a look at android's lockscreen source code
Click to expand...
Click to collapse
mmhh yeah now that you say that, i think it might be possible on the lockscreen if your apps is registered as a device admin, though I didn't quite find it during my quick search...
SimplicityApks said:
mmhh yeah now that you say that, i think it might be possible on the lockscreen if your apps is registered as a device admin, though I didn't quite find it during my quick search...
Click to expand...
Click to collapse
that's what i understood too by using that app, but i didn't find any way to do it in my app , or any answer on stack overflow
TakisBeskos said:
that's what i understood too by using that app, but i didn't find any way to do it in my app , or any answer on stack overflow
Click to expand...
Click to collapse
Found this one here:
You can not hide it unless you have rooted the device. But of course there is a workaround which might not fit with your requirement but several well known apps in the market at the moment using this strategy to achieve this disable menu bar feature for their apps.
Grant admin privilege.
Set password & lock the device using device admin profile api
Then load what ever the UIs on top of the native lock screen. (Of course this will show background lock screen whenever a transition happens between activities. But if logic is organized well, then it will be smooth & less noticed by the user)
When need to enable back, reset password to "" using resetPassword("", 0) of device policy manager object.
Click to expand...
Click to collapse
You can set the password and lock the screen using the DevicePolicyManager. Don't know how you would "load your UIs on top of native lock screen" though...
SimplicityApks said:
Found this one here:
You can set the password and lock the screen using the DevicePolicyManager. Don't know how you would "load your UIs on top of native lock screen" though...
Click to expand...
Click to collapse
i just want to disable the navigation bar while in my app. hide navigation flag and immersive mode didn't work
TakisBeskos said:
i just want to disable the navigation bar while in my app. hide navigation flag and immersive mode didn't work
Click to expand...
Click to collapse
mmhhh and why is immersive not working for you? You have to keep in mind that the user needs the navigation bar to exit your app anytime...
SimplicityApks said:
mmhhh and why is immersive not working for you? You have to keep in mind that the user needs the navigation bar to exit your app anytime...
Click to expand...
Click to collapse
immersive is only for kitkat and newer , and i want for ics and newer versions of android.
i want to hide the navigation bar because i am making a lockscreen. you get out of the application by unlock

Categories

Resources