2014-01-29 3 views
2

미디어 플레이어 응용 프로그램을 쓰고 있습니다. 10 인치 태블릿, 7 인치 태블릿, 5 인치 전화에서 보는 것이 가장 좋습니다. 그래서 나는 그 장치에만 설치하도록 앱을 제한하고 싶다. 어떻게해야합니까?앱을 특정 기기로 제한하는 방법은 무엇인가요?

<supports-screens android:smallScreens="false" 
       android:normalScreens="false" 
       android:largeScreens="true" 
       android:xlargeScreens="true" 
       android:anyDensity="true" 
       android:requiresSmallestWidthDp="480" 
       android:compatibleWidthLimitDp="integer" 
       android:largestWidthLimitDp="integer"/> 

또한 참조 링크를 따라 할 수 있습니다 : 당신의 AndroidManifest.xml<application> 전에 태그에 다음 사항을 추가

: 여기

내 현재의 매니페스트 파일

<application 
     android:hardwareAccelerated="true" 
     android:allowBackup="true" 
     android:icon="@drawable/logo_new" 
     android:label="@string/app_name" 
     android:theme="@style/AppTheme" > 
     <activity 
      android:hardwareAccelerated="true" 
      android:name="VideoActivity" 
      android:label="@string/app_name" 
      android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen" 
      android:screenOrientation="sensorLandscape"> 

      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 


    </application> 
+1
+0

감사합니다. 그 링크가 도움이되었습니다 – saa

답변

2

이 시도 값이다 ::

http://android-developers.blogspot.in/2011/09/preparing-for-handsets.html

enter image description here

위의 코드는 자동으로 Play 스토어에 의해 장치를 필터링합니다.

+0

ok ... 하지만이 속성 android : requiresSmallestWidthDp = "600"은 7 인치 태블릿 용입니다. 그러면 5 인치 화면에 설치할 수 있습니다. – saa

+0

@saa android : requiresSmallestWidthDp = "600"이것은 단지 예일 뿐이므로 직접 변경할 수 있습니다. 600을 넣는 것은 필수 사항이 아닙니다. 480 –

+0

@saa로 바꿀 수 있습니다. 편집 된 코드를 참조하십시오. –

관련 문제