Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9195735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:41:37+00:00 2026-06-17T21:41:37+00:00

To avoid some Tablet/Phone wiring, I want my app to issue itself an intent

  • 0

To avoid some Tablet/Phone wiring, I want my app to issue itself an intent via an activity-alias, and make the manifest system deliver it to the main activity (for tablet) or a new activity (for phone).

If I have this in my manifest:

<activity-alias android:name="my.app.WebContent"
              android:targetActivity="my.app.activities.Home"/>

then all is well, and

Intent {
    act=android.intent.action.VIEW dat=http://www.app.my/url
    cmp=my.app/.WebContent (has extras) }

is delivered as expected.

If, however, I have this in my manifest:

<activity-alias android:name="my.app.WebContent"
              android:enabled="@bool/has_one_pane"
              android:targetActivity="my.app.activities.WebContent"/>
<activity-alias android:name="my.app.WebContent"
              android:enabled="@bool/has_two_panes"
              android:targetActivity="my.app.activities.Home"/>

with this in values/res.xml

<resources>
    <bool name="has_two_panes">false</bool>
    <bool name="has_one_pane">true</bool>
</resources>

and this in values-large/res.xml, and values-sw600dp/res.xml:

<resources>
    <item type="layout" name="content_frame">@layout/activity_item_twopane</item>
    <bool name="has_two_panes">true</bool>
    <bool name="has_one_pane">false</bool>
</resources>

then my code filters out the intent as ‘undeliverable’ according to PackageManager.resolveActivity().

It seems that values/res.xml overrides values-anything/res.xml, even though values-large is supposed to override values/res.xml for large displays.

Is this a bug in Android, or have I misunderstood how this should be done?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:41:38+00:00Added an answer on June 17, 2026 at 9:41 pm

    No, it’s not supported because things like screen width (res/layout-w600dp) can change by orientation but Google didn’t apparently notice that ‘smallest width’ (res/layout-sw600dp) isn’t affected by that. See Fragment Orientation Change – Better Test than for Landscape

    Note too that the workaround suggested in How to specify Activities that are only for phones or tablets on Android doesn’t work for competing <activity-alias> because you cannot construct a ComponentName to uniquely select between aliases of the name name.

    (Unless it’s possible to disable only one of the targeted activities and rely on ordering within the manifest to swap between the alternatives, but that has fragility issues.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to do some quick inserts but avoid duplicates into a Table. For
What are some options to avoid the latency of pointing local django development servers
I am trying to avoid using Net::SSH::Perl library since there is some problems in
I'm currently writing some update polling stuff. I try to avoid writing even a
I'm updating some properties in a component. In order to avoid missing property errors
I link with Qt statically, so can linker or some other tool avoid adding
To avoid the long class path issue in windows, i modified my build.xml like[1]
I am going through some pl/sql code with no comments. Trying to make sense
I decided to learn how to use an ORM to avoid learning some SQL
I am currently working on a Windows 8 app which needs to store some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.