문제

I want to make my App backward compatbible to API level 8 (Android 2.2).

My problem is, that Android Beam requires API level 14 (Android 4.0).

Is it possible to implements this function without creating two apks?

public class Beam extends Activity implements CreateNdefMessageCallback,OnNdefPushCompleteCallback {
    ...
}
도움이 되었습니까?

해결책

As long as the code that uses this function is not run on a device that does not support it, you will not have an issue.

Just check the current SDK level and hide the function from the user if the device does not support it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top