Nouveau : SDK Android 2.2, API 8, NDK r4…

 

Alors que la conférence Google I/O n’est pas terminée, Google vient de mettre à jour le site dédié au développement sur Android.

Nouveau SDK Android 2.2 (kit de développement), avec de nombreuses nouveautés du framework API. Dont par exemple les API OpenGL ES 2.0, un système d sauvegarde des données des applications,

La liste des nouveautés est à la suite de l’article.

Mais aussi le NDK r4 simplifié, un système de débogage…  Voir le site officiel.

Data backup

The platform now provides a generalized backup service that applications can use to backup and restore user data, to ensure that users can maintain their data when switching devices or reinstalling the application. The Backup Manager handles the work of transporting the application data to and from the backup storage area in the cloud. The Backup Manager can store any type of data, from arbitrary data to files, and manages backup and restore operations in an atomic manner. For more information, see Data Backup.

Graphics

Media

Speech recognition and third-party recognition engines

  • The platform provides new speech-recognition APIs that allow applications to have a richer interaction with the available voice recognizer. For example, the APIs are sufficient to integrate voice recognition deeply into an IME.
  • The platform also provides a RecognitionService base class that lets third-party developers create plug-in recognition engines.
  • New RecognitionListener interface to receive callbacks.
  • New RecognizerIntent extras that let a requester app specify details as preferred language, minimum length in milliseconds, and so on.

Camera and camcorder

Device policy manager

New device policy management APIs allow developers to write « device administrator » applications that can control security features of the device, such as the minimum password strength, data wipe, and so on. Users can select the administrators that are enabled on their devices. For more information, see the android.app.admin classees or the example application code in DeviceAdminSample.java.

UI Framework

  • New UI modes « car mode » and « night mode » and UiModeManager let applications adjust their application UI for specific user modes.
  • New ScaleGestureDetector that lets Views detect and handle transformation gestures that involve more than one pointer (multitouch) using the supplied MotionEvents.
  • Improvements in the way that multitouch events are reported in MotionEvent objects.
  • The layout attribute fill_parent is renamed to match_parent. This affects both XML and Java code (see ViewGroup.LayoutParams). Note that the platform will continue to honor uses of fill_parent in legacy applications.
  • New layout attributes tabStripEnabled, tabStripRight, and tabStripLeft let developers customize the bottom strip of TabWidgets.
  • Better support for managed dialogs in Activity.

Accounts and sync

  • New method AddPeriodicSync() lets you schedule a periodic sync with a specific account, authority, and extras at the given frequency.

New manifest elements and attributes

  • For specifying the application’s preferred install location (see App Installation on External Storage Media, above):
    • New android:installLocation attribute of the element. Specifies the default install location defined by an application.
  • New android:installLocation attribute of the element. Specifies the default install location defined by an application.
  • For managing user data backup (see Backup manager, above, for more information):
    • New android:backupAgent attribute of the element. Specifies the component name of the BackupAgent subclass provided by the application to handle backup/restore operations, if any.
    • New android:restoreAnyVersion attribute of the element. Boolean value that indicates whether the application is prepared to attempt a restore of any backed-up dataset, even if the backup is apparently from a newer version of the application than is currently installed on the device.
  • New android:backupAgent attribute of the element. Specifies the component name of the BackupAgent subclass provided by the application to handle backup/restore operations, if any.
  • New android:restoreAnyVersion attribute of the element. Boolean value that indicates whether the application is prepared to attempt a restore of any backed-up dataset, even if the backup is apparently from a newer version of the application than is currently installed on the device.
  • For managing the platform’s JIT compiler:
    • New android:vmSafeMode attribute of the element. Boolean value that specifies whether to disable JIT compiler optimizations when running the application.
  • New android:vmSafeMode attribute of the element. Boolean value that specifies whether to disable JIT compiler optimizations when running the application.

Permissions

  • android.permission.BIND_DEVICE_ADMIN — Any device administration broadcast receiver must require this permission, to ensure that only the system can interact with it.
  • android.permission.KILL_BACKGROUND_PROCESSES — Allows an application to call killBackgroundProcesses(String).
  • android.permission.BIND_WALLPAPER — Any WallpaperService must require this permission, to ensure that only the system can interact with it.
  • android.permission.SET_TIME — Allows an application to set the system time.

API differences report

For a detailed view of all API changes in Android 2.2 (API Level 8), see the API Differences Report.

NDK :

General notes:
  • Provides a simplified build system through the new ndk-build build command.
  • Adds support for easy native debugging of generated machine code on production devices through the new ndk-gdb command.
  • Adds a new Android-specific ABI for ARM-based CPU architectures, armeabi-v7a. The new ABI extends the existing armeabi ABI to include these CPU instruction set extensions:
    • Thumb-2 instructions
    • VFP hardware FPU instructions (VFPv3-D16)
    • Optional support for ARM Advanced SIMD (NEON) GCC intrinsics and VFPv3-D32. Supported by devices such as Verizon Droid by Motorola, Google Nexus One, and others.
  • Adds a new cpufeatures static library (with sources) that lets your app detect the host device’s CPU features at runtime. Specifically, applications can check for ARMv7-A support, as well as VFPv3-D32 and NEON support, then provide separate code paths as needed.
  • Adds a sample application, hello-neon, that illustrates how to use the cpufeatures library to check CPU features and then provide an optimized code path using NEON instrinsics, if supported by the CPU.
  • Lets you generate machine code for either or both of the instruction sets supported by the NDK. For example, you can build for both ARMv5 and ARMv7-A architectures at the same time and have everything stored to your application’s final .apk.
  • To ensure that your applications are available to users only if their devices are capable of running them, Android Market now filters applications based on the instruction set information included in your application — no action is needed on your part to enable the filtering. Additionally, the Android system itself also checks your application at install time and allows the installation to continue only if the application provides a library that is compiled for the device’s CPU architecture.
  • Adds support for Android 2.2, including a new stable API for accessing the pixel buffers of Bitmap objects from native code.

Téléchargez notre application Android et iOS ! Vous pourrez y lire nos articles, dossiers, et regarder nos dernières vidéos YouTube.

Les derniers articles