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