Search code examples
javaandroidpdfandroid-intentimplicit

Can I set landscape orientation on implicit intent for a diferent app activity?


I am trying to open a pdf file with Android default app for pdf's. I made an Implicit intent and works fine, but I need to set landscape orientation just when pdf is open, not after. I have this line:

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

This line set landscape when app select menu is open. But when I select "Pdf reader app" it just set portrait again. The question is: Can I modify anything aspect of an external app from my app? Is this possible?


Solution

  • I do not think that is possible. as the way an activity or fragment is displayed is under the cotrole of the code. This is not a feature of the system. So it would not be possible to change the display mode of an activity of an application that you have not developed