B.B.
B.B.

Reputation: 954

Can we have separate manifest for tablet and smartphones in Android?

Is it possible to have a single apk with two separate Android manifest for smartphones and tablets?

If two separate manifests are not possible, could differentiate behaviour of the manifest for tablets and smartphones?

NOTE - This is regarding application permissions, intent filters etc mentioned in the android manifest. Things that are to be configured during app installation.

Upvotes: 3

Views: 2388

Answers (1)

laalto
laalto

Reputation: 152847

Is it possible to have a single apk with two separate Android manifest for smartphones and tablets?

No. There's only a single manifest per APK. The manifest is static and cannot be varied at runtime.

If two separate manifests are not possible, could differentiate behaviour of the manifest for tablets and smartphones?

You can build more than one APK from the same codebase with the differentiation applied to them.

Have a look at product flavors. You can have the main manifest with the common content for all flavors and then have flavor-specific manifests that contain the phone or tablet-specific additions. The build tooling merges the manifests together to get a single APK-specific manifest.

For distribution, have a look at multiple APK support.

Upvotes: 1

Related Questions