현재 10 인치 태블릿에서 Android 휴대 전화를 지원하는 코드를 실행 해 보았습니다. 그러나 응용 프로그램은 "현재이 장치에서 지원되지 않는 응용 프로그램"오류를 표시합니다. 어떻게 작동시킬 수 있는지 궁금합니다. 나는 android : xlargescreen = "false">를 변경하려고 시도했지만 사실로 수정하지는 못했다. 여기 같은 내 안드로이드 매니페스트 코드입니다 : 장치가 지원되지 않는 경우 내가 경고를 호출하고 내 시작 활동에, 또한아무런 문제없이 휴대 전화에서 태블릿 화면으로 전환하는 방법
<supports-screens
android:anyDensity="true"
android:resizeable="false"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
/>
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="18" />
입니다 : 내가 얻을 수있는 방법
/**
* This method was originally used to detect if the device is supported or not
* The device detection has been moved to the Android Manifest XML file
* supports-screens tag
* @return boolean true if device is supported
*/
private boolean isDeviceSupported() {
if (!Application.getAppResources().getBoolean(R.bool.isDeviceSupported)) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(getResources().getString(R.string.device_not_supported)).setCancelable(false).setPositiveButton("Ok", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
finish();
}
});
AlertDialog alert = builder.create();
alert.show();
return false;
} else {
return true;
}
}
private void goToLoginActivity() {
//Device detection has been moved to Android manifest XML file
if (isDeviceSupported()) {
LoginActivity.newInstance(this);
finish();
}
}
모든 단서 내 10 인치 안드로이드 타블렛에서 작동합니까?
감사합니다. 같은 AndroidManifest.xml을에 사용-권한과 기능에 거짓 필요한
태블릿에서 전화와 같이 사용할 수없는 권한이 있습니까? – tyczj
이들은 내 권한입니다 : –