摘要 |
Methods and systems for providing compatibility of applications with multiple versions of an operating system are provided. The method may comprise receiving, by a device, a request to perform a function-call of an application that references features of a first version of an operating system. The method also includes determining whether a version of the operating system and a system library on the device supports the function-call of the application so as to be able to perform dynamic compilation of code in the system library for the function-call at run-time, and based on the determination, accessing a compatibility library associated with the application that includes pre-compiled code for execution by a given device having a given version of the operating system other than the first version of the operating system. The method also includes at run-time, performing the function-call using corresponding pre-compiled code from the compatibility library. |
主权项 |
1. A method performed by a device having an operating system and a system library, the method comprising:
receiving, by a processor of the device, a request to perform a function-call of an application, wherein the function-call references one or more features of a first version of the operating system; at run-time of the application on the device, based on an identification of a version of the operating system and the system library on the device, determining whether the version supports the function-call of the application so as to be able to perform dynamic compilation of code in the system library for the function-call; based on the version of the operating system and the system library on the device being unable to support the function-call, accessing a compatibility library associated with the application, wherein the compatibility library includes pre-compiled code for execution by a reference device having a given version of the operating system other than the first version of the operating system; determining, based on the given version of the operating system hardware requirements for using the given version of the operating system; identifying compatibility between hardware of the device and the determined hardware requirements; and based on the identification of the compatibility, at run-time of the application on the device, executing given pre-compiled code from the compatibility library to emulate at least a portion of functionality of the code in the system library referenced by the function-call of the application. |