My Android app is configured to work on landscape mode only, so I want to make e-mail client, which is created by intent from my app, be landscape too. Is it possible?
Here is my code:
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("text/xml");
i.putExtra(Intent.EXTRA_EMAIL, new String[]{"example@mail.com"});
i.putExtra(Intent.EXTRA_SUBJECT, "Feedback");
i.putExtra(Intent.EXTRA_TEXT, "");
try {
Intent chooser_intent = Intent.createChooser(i, "Send e-mail");
startActivity(chooser_intent);
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(getApplicationContext(), "E-mail client not found", Toast.LENGTH_LONG).show();
}
It is not possible to specify the orientation of an Activity, if it is external to your app. If an Activity is local to your app (ie. defined in your own Manifest file) – then you could specify the orientation there.
Bottom line, you can not control the orientation of an Application that is not your own (ie. called via system Intent).