2016-07-21 1 views
0

Google Cardboard 프로젝트 용 빌드를 만들고 Android 태블릿에서 다운로드되는 앱을 중지하고 싶습니다.태블릿의 Android 용 건물을 피하는 방법

아래의 코드를 내 매니페스트에 추가했지만 아직 약 1900 개의 장치가 사용 가능한 것으로 보입니다.

이유에 대한 의견이 있으십니까?

감사합니다,

(텍스트 주위에 괄호를 제거했다)

<supports-screens android:largeScreens="false" android:largestWidthLimitDp="540" android:normalScreens="true" android:requiresSmallestWidthDp="360" android:smallScreens="false" android:xlargeScreens="false"/> 

답변

0
당신은 당신의 매니페스트에이를 추가해야

:이 휴대폰에 응용 프로그램을 제한해야

<compatible-screens> 
    <!-- all small size screens --> 
    <screen android:screenSize="small" android:screenDensity="ldpi" /> 
    <screen android:screenSize="small" android:screenDensity="mdpi" /> 
    <screen android:screenSize="small" android:screenDensity="hdpi" /> 
    <screen android:screenSize="small" android:screenDensity="xhdpi" /> 
    <!-- all normal size screens --> 
    <screen android:screenSize="normal" android:screenDensity="ldpi" /> 
    <screen android:screenSize="normal" android:screenDensity="mdpi" /> 
    <screen android:screenSize="normal" android:screenDensity="hdpi" /> 
    <screen android:screenSize="normal" android:screenDensity="xhdpi" /> 
</compatible-screens> 

만 . 그러나 xxhdpi 또는 xxxhdpi 화면 밀도를 사용하는 기기가 점점 더 많아 지므로주의해서 사용해야하므로이 기능을 사용하면 일부 고급형 휴대 전화에서도 앱을 차단할 수 있습니다.

더 많은 정보를 정기적으로 : Android: Disable application for tablet

0

불행하게도 정제를 제거하는 정말 좋은 방법이 아니다. 결국 개발자 콘솔에서 직접 장치를 끄기 시작했습니다.

는 매니페스트에 화면 크기를 비활성화하는 대신 당신이 나와 무슨의이

<compatible-screens> 
    <!-- all small size screens --> 
     <screen android:screenSize="small" android:screenDensity="ldpi" /> 
     <screen android:screenSize="small" android:screenDensity="mdpi" /> 
     <screen android:screenSize="small" android:screenDensity="hdpi" /> 
     <screen android:screenSize="small" android:screenDensity="xhdpi" /> 
     <!-- all normal size screens --> 
     <screen android:screenSize="normal" android:screenDensity="ldpi" /> 
     <screen android:screenSize="normal" android:screenDensity="mdpi" /> 
     <screen android:screenSize="normal" android:screenDensity="hdpi" /> 
     <screen android:screenSize="normal" android:screenDensity="xhdpi" /> 
    </compatible-screens> 

를 사용해야합니다. 문제는 이것도 큰 전화를 제거하지만, 그 중 일부는 골판지에 들어 가지 않으므로 Google 골판지의 경우에는 괜찮을 수 있습니다.

0

에만 단말기
https://developer.android.com/guide/practices/screens-distribution.html#FilteringHansetApps
아니면 여기에서 시작할 수를 지원하는 방법을 찾을 수 있습니다
https://developer.android.com/guide/practices/screens-distribution.html#FilteringTabletApps 을 (태블릿 만 지원) 및이 방법

<manifest ... > 
    <supports-screens android:smallScreens="true" 
         android:normalScreens="true" 
         android:largeScreens="false" 
         android:xlargeScreens="false" 
         android:largestWidthLimitDp="600" /> 
    ... 
    <application ... > 
     ... 
    </application> 
</manifest> 
에 수정