Android 애플리케이션이 있으며 이 앱을 Tablet에 설치하지 않으려합니다. 나는 많은 웹 사이트를 수색했다. 나는 몇 가지 아이디어를 가지고 그것을 따라 갔다. 그러나 그것은 제한하지 않습니다.태블릿에 앱 설치 제한
다음은 내가 방문한 사이트 중 일부입니다.
Android Manifest Restrict To Tablets
http://android-developers.blogspot.in/2011/09/preparing-for-handsets.html
나는 supports-screens
여전히 응용 프로그램은 태블릿에 설치되어 함께 노력했다. 이 작업을 수행하는 방법?
참고 : 내 애플 데의 minSdkVersion = 8 targetSdkVersion을 = 17
편집 1 : 내가 화면 크기를 찾으려면 다음 코드를 사용했다
xlarge screens are at least 960dp x 720dp
large screens are at least 640dp x 480dp
normal screens are at least 470dp x 320dp
small screens are at least 426dp x 320dp
WindowManager wm=getWindowManager();
DisplayMetrics dm=new DisplayMetrics();
wm.getDefaultDisplay().getMetrics(dm);
deviceWidth=dm.widthPixels;
deviceHeight=dm.heightPixels;
if((deviceHeight< 640 && deviceWidth<480)|| (deviceHeight<480 && deviceWidth< 640))
{
//large screen - TABLET
}
그러나 나는 where to put this code to restricts installation and what will be the code to stop installation if large screen is true
을 모른다.
EDIT2 : 아이폰 OS에서 대상 장치 그렇게 나는
고마워. 한 시간 이상 Airdroid에서 직접 설치하여 "Restricted app"을 시도했습니다. – Sakthimuthiah