The Android application should be visible in the game store for regular screen devices as well as tablets and should look perfect in both (screen resolution)

I recently posted an Android app (sdk version 4.2) on the playstore. My requirement is that this application should be visible in the game store on both large-screen devices (including the Samsung Galaxy Tab 2 p3100), as well as on regular screen devices. I also want my application to appear on devices (with version 2.2 - 4.2).

This is a piece of code that I was proposed to fulfill my requirement.

<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true" android:xlargeScreens="true" /> <uses-sdk android:minSdkVersion="8" /> 

There are two cases, depending on the code above.

  • When I include the above code in manifest.xml

    Inclusion of the above code in the manifest seems to help me in fulfilling my requirement to make my application visible on the market for both the tablet and the small screen device. But in this case, the application screens only cover the screen size of the half screen when loading from the game store / market and it is also displayed in the same way (part of the half-screen is covered) when debugging in the tablet.

  • If I did not include the above code in manifest.xml

    Apart from the above code in the manifest, it seems that it works fine when debugging the application, since all application screens are displayed perfectly on ordinary screen devices (phones), as well as on large / x-large screen devices (tablets), but only in case debugging. The application becomes invisible in the game store for tablets.

So, both cases are not a solution to my requirement.

permissions and functions in the manifest as shown below

 <uses-feature android:name="android.hardware.touchscreen" android:required="false" /> <uses-feature android:name="android.hardware.telephony" android:required="false" /> <uses-feature android:name="android.hardware.camera.autofocus" android:required="false" /> <uses-feature android:name="android.hardware.camera" android:required="false" /> <uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.RECORD_VIDEO" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.GET_TASKS" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> 

And here is one of my layouts (xml) that only consumes half the screen when debugging on the tablet.

  <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:fillViewport="true"> <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/rl" android:background="#000000" android:focusableInTouchMode="true"> <LinearLayout android:layout_width="fill_parent" android:layout_height="40dp" android:gravity="center_vertical" android:orientation="horizontal" android:background="#0074AF"> <LinearLayout android:paddingLeft="5px" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:layout_gravity="center_vertical" android:orientation="horizontal" android:weightSum="10"> <TextView android:id="@+id/label" android:layout_weight="8.8" android:layout_marginLeft="5dip" android:textSize="22sp" android:textStyle="bold" android:layout_width="wrap_content" android:textColor="#ffffff" android:gravity="center_vertical" android:layout_gravity="center_vertical" android:text="@string/login" android:layout_height="wrap_content"/> <TextView android:id="@+id/version_no" android:layout_weight="1.2" android:textSize="14sp" android:textStyle="bold" android:layout_width="wrap_content" android:textColor="#222222" android:gravity="center_vertical" android:layout_gravity="center_vertical" android:text="@string/version" android:layout_height="wrap_content"/> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="4dp" android:layout_marginRight="4dp" android:layout_marginTop="45dp" android:background="@drawable/round_borders" android:orientation="vertical" android:paddingTop="10dp" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="5dp" android:paddingBottom="0dp" android:paddingTop="0dp" android:textColor="#000000" android:textSize="20px" android:text="Username*" android:id="@+id/user"/> <EditText android:id="@+id/name" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="2dp" android:paddingBottom="0dp" android:paddingTop="0dp" android:singleLine="true" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="5dp" android:paddingBottom="0dp" android:paddingTop="0dp" android:textColor="#000000" android:textSize="20px" android:text="Password*" android:id="@+id/pswd" /> <EditText android:id="@+id/pass" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="10dp" android:paddingBottom="0dp" android:paddingTop="0dp" android:singleLine="true" android:password="true" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="5dp" android:paddingBottom="0dp" android:paddingTop="0dp" android:textColor="#000000" android:textSize="20px" android:text="AccountId*" /> <EditText android:id="@+id/accid" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="10dp" android:paddingBottom="0dp" android:paddingTop="0dp" android:inputType="date" android:singleLine="true" /> <CheckBox android:id="@+id/check1" android:layout_width="fill_parent" android:textColor="#000000" android:layout_height="wrap_content" android:text="@string/remember_me" /> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <Button style="@style/RedButtons" android:layout_width="270dip" android:layout_height="50dip" android:layout_marginTop="10dp" android:gravity="center" android:paddingBottom="3dp" android:paddingTop="3dp" android:id="@+id/login" android:text="@string/login" android:textSize="20sp" /> <Button style="@style/RedButtons" android:layout_width="0dip" android:layout_height="0dip" android:layout_marginTop="10dp" android:layout_marginLeft="70px" android:gravity="center" android:paddingBottom="3dp" android:paddingTop="3dp" android:id="@+id/exit" android:text="@string/exit" android:visibility="gone" /> </LinearLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:layout_marginBottom="5dp" android:paddingBottom="0dp" android:paddingTop="0dp" android:orientation="vertical"> <TextView android:id="@+id/new_user_txt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#000000" android:textSize="16sp" /> </LinearLayout> </LinearLayout> </RelativeLayout> </ScrollView> 

This works great when debugging both on the tablet and on the phone, the screens also seem beautiful when I remove the code snippet of the supporting screens and use the sdk tags from manifest.xml. But, this is not an actual solution (since the application will be hidden in the game store, in this case), I think.

Please let me know what can be done to get rid of this problem.

+1
android android-layout android-manifest google-play
source share
3 answers

Zooming behavior is known as "screen compatibility mode." Google recommends changing the layout so as not to require this mode. Then you can save your <supports-screens> element as it is.

I have not tried this, but it looks like the largestWidthLimitDp attribute can be used to force the use of screen compatibility mode for larger devices.

 <supports-screens android:largestWidthLimitDp="320" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true"/> 
+1
source share

This code should work for you

  <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" /> <uses-sdk android:minSdkVersion="3"/> 
0
source share

his work is perfect for me

 <compatible-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true" /> 

and define the minsdk version as 1 (i.e. for all device versions)

 <uses-sdk android:minSdkVersion="1"/> 

if your applications do not support Android version less than 8, then use this code in the activity of your screen to prevent applications from crashing.

 if( Integer.parseInt(android.os.Build.VERSION.SDK) < 8){ Toast.makeText(getApplicationContext(), "Please upgrade your phone to 2.2+", Toast.LENGTH_LONG).show(); } 
0
source share

All Articles