beautypg.com

Broadcast intents, Native api compatibility, Web api compatibility – Google Android Compatibility Definition: Android 1.6 User Manual

Page 9

background image

3.2.3.4. Broadcast Intents

Third-party applications rely on the platform to broadcast certain Intents to notify them of changes in the
hardware or software environment. Android-compatible devices MUST broadcast the public broadcast
Intents in response to appropriate system events. A list of required Broadcast Intents is provided in

Appendix B

; however, note that the SDK may define additional broadcast intents, which MUST also be

honored.

3.3. Native API Compatibility

Managed code running in Dalvik can call into native code provided in the application .apk file as an ELF
.so file compiled for the appropriate device hardware architecture. Device implementations MUST include
support for code running in the managed environment to call into native code, using the standard Java
Native Interface (JNI) semantics. The following APIs must be available to native code:

libc (C library)
libm (math library)
JNI interface
libz (Zlib compression)
liblog (Android logging)
Minimal support for C++
OpenGL ES 1.1

These libraries MUST be source-compatible (i.e. header compatible) and binary-compatible (for a given
processor architecture) with the versions provided in Bionic by the Android Open Source project. Since
the Bionic implementations are not fully compatible with other implementations such as the GNU C
library, device implementers SHOULD use the Android implementation. If device implementers use a
different implementation of these libraries, they must ensure header and binary compatibility.

Native code compatibility is challenging. For this reason, we wish to repeat that device implementers are
VERY strongly encouraged to use the upstream implementations of the libraries listed above, to help
ensure compatibility.

3.4. Web API Compatibility

Many developers and applications rely on the behavior of the android.webkit.WebView class [

Resources

,

11] for their user interfaces, so the WebView implementation must be compatible across Android
implementations. The Android Open Source implementation uses the WebKit rendering engine version to
implement the WebView.

Because it is not feasible to develop a comprehensive test suite for a web browser, device implementers
MUST use the specific upstream build of WebKit in the WebView implementation. Specifically:

• WebView MUST use the 528.5+ WebKit build from the upstream Android Open Source tree for

Android 1.6. This build includes a specific set of functionality and security fixes for the WebView.

• The user agent string reported by the WebView MUST be in this format:

Mozilla/5.0 (Linux; U; Android 1.6; -; name>; Build/) AppleWebKit/528.5+ (KHTML, like Gecko)
Version/3.1.2 Mobile Safari/525.20.1