android - Kindle Fire orientation lock programmatically -


i add following line activity in android manifest

 android:screenorientation="nosensor" 

then add below code oncreate() in java class

 if (issmartphone(this))     {         setrequestedorientation(activityinfo.screen_orientation_portrait);     }  else     {       setrequestedorientation(activityinfo.screen_orientation_landscape);     } 

but in kindle fire devices it's not setting orientation. know how fix issue?


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -