7 Replies Latest reply on Dec 19, 2011 12:31 PM by VivD

    How to restrict app to Phones only

    VivD Level 1

      I'd like my app to be available only to phones as I'd like to build a different version for tablets. I didn't find any setting in the app xml put such a restriction.

       

      Is this something that can be done through the app.xml file or is it something I should do in the Android market? The only thing I see on the Android Market is a Devices option but there are thousands of devices in that list and I have no idea about some of those devices to make a decision on whether to allow it on that device or not.

        • 1. Re: How to restrict app to Phones only
          pauland Level 4

          Why would you want to do this?

           

          I'm pretty sure that's not possible on IOS, which is just as well since I've enjoyed running iPhone apps on the iPad.

          • 2. Re: How to restrict app to Phones only
            Jason Woodcock Level 1

            In the App Descriptor XML file use the following code to restrict to support screens:

             

             

            <supports-screens

                      android:smallScreens="true"

                      android:normalScreens="true"

                      android:largeScreens="false"

                      android:xlargeScreens="false" />

             

            You may want to read this as well to clarify on which screen sizes are what:

             

            http://developer.android.com/guide/topics/manifest/supports-screens-element.html

             

            For instance, I locked my app to tablets only by

             

            <supports-screens

                      android:smallScreens="false"

                      android:normalScreens="false"

                      android:largeScreens="false"

                      android:xlargeScreens="true" />

            In iOS devices you use:

             

             

            <key>UIDeviceFamily</key>

                            <array>

                                <string>2</string>

                            </array>

             

             

            Where the string is the value of the device type (2 being iPad only in this case)

            • 3. Re: How to restrict app to Phones only
              VivD Level 1

              Thanks Jason. I noticed the IOS settings but probably overlooked the Android one.

               

              Pauland - I don't want the app to be considered one that support tablets because it is not. Don't want people to put bad reviews thinking that it is supported and then find that it doesn't look or work great on the tablet. If a user wants to use the app knowing it's only supported on phones, that's ok.

              • 4. Re: How to restrict app to Phones only
                pauland Level 4

                Does the setting actually stop an iPad user running an iPhone App? I thought an iPad user can run any iPhone app (even if the phone bits don't work).

                • 5. Re: How to restrict app to Phones only
                  Jason Woodcock Level 1

                  They can still install and run it, but it will run it in iPhone mode (black borders all the way around and the 2x button in the corner).

                  • 6. Re: How to restrict app to Phones only
                    pauland Level 4

                    Jason Woodcock wrote:

                     

                    They can still install and run it, but it will run it in iPhone mode (black borders all the way around and the 2x button in the corner).

                     

                    Yes, that's my point. I don't think you can stop someone with an iPad running an iPhone application.

                    • 7. Re: How to restrict app to Phones only
                      VivD Level 1

                      Right. However, if you set is as supported in the app.xml then it will treat the app as an iPad app and show it in full screen and not as an iPhone app with a 2x option. I did't want to prevent the install but kind of make it clear that it is only supported on phones currently so either use it on a phone or a phone sized emulator on your ipad/tablet.