2017-12-06 10 views
1

모바일 장치에만 설치해야하는 응용 프로그램을 만들고 모든 태블릿을 제외해야합니다. 이미 많은 질문이 있지만 그 당시 xxxhdpi 해상도의 장치는 Pixel 2 및 Samsung Galaxy S8과 같이 시작되지 않았으며 큰 화면을 제공합니다. 그렇다면 앱을 휴대 기기에만 설치하도록 제한하는 방법은 무엇입니까?모바일 장치에만 설치할 수있는 응용 프로그램을 제한하고 태블릿을 제외하십시오.

아래 코드를 시도했지만 도움이되지 않았습니다. 코드 아래에이 시도 할 수 있습니다 동일한 문제에 직면하고있어 누구에게도

<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" /> 
     <screen android:screenSize="small" android:screenDensity="xxhdpi" /> 
     <screen android:screenSize="small" android:screenDensity="xxxhdpi" /> 
     <!-- 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" /> 
     <screen android:screenSize="normal" android:screenDensity="xxhdpi" /> 
     <screen android:screenSize="normal" android:screenDensity="xxxhdpi" /> 

    </compatible-screens> 
+2

[Make android app for tablets] 가능한 복제본 (https://stackoverflow.com/questions/15547985/make-android-app-not-availble-for-tablets) – Prem

+0

어디에서 제한할까요? '플레이 스토어'에? 그렇다면 https://stackoverflow.com/questions/29429070/android-disable-to-install-app-on-tablets – Bek

+0

휴대 기기 만 @Bek –

답변

1

.

<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" /> 
    <screen android:screenSize="small" android:screenDensity="xxhdpi" /> 
    <screen android:screenSize="small" android:screenDensity="xxxhdpi" /> 
    <!-- 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" /> 
    <screen android:screenSize="normal" android:screenDensity="xxhdpi" /> 
    <screen android:screenSize="normal" android:screenDensity="xxxhdpi" /> 


    <screen android:screenSize="normal" android:screenDensity="420" /> 
    <screen android:screenSize="normal" android:screenDensity="480" /> 
    <screen android:screenSize="normal" android:screenDensity="560" /> 
    <screen android:screenSize="normal" android:screenDensity="640" /> 

    <screen android:screenSize="large" android:screenDensity="420" /> 
    <screen android:screenSize="large" android:screenDensity="480" /> 
    <screen android:screenSize="large" android:screenDensity="560" /> 
    <screen android:screenSize="large" android:screenDensity="640" /> 
</compatible-screens> 

화면 밀도 640은 전화 장치의 최고 밀도입니다. Playstore에서 모든 태블릿을 제외하고 모든 기기를 포함하는지 확인했습니다.