Quantcast
Channel: Android*
Viewing all 523 articles
Browse latest View live

Meshcentral.com - Improved Android Support

$
0
0

Today with work from Matt Primrose and Rick Edgecombe, we are announcing much improved Android support in Meshcentral with both new Mesh Agent for Android on the Google Play store and new Server Side management control.

Thanks to work from Matt Primrose, we have a new server side Android settings control panel. The new user interface is miles ahead of the older one with smart browser side caching, improves data queries and a much improved user interface. The new web user interface pulls data from the Android device much faster than before and caches the data in such a way that coming back to the Android settings UI will not cause new queries to be issued to the Android device unless needed.

Thanks to Rick Edgecombe, we have a significantly improved Android Mesh Agent on the Google Play store. The most impressive new feature is accelerated remote desktop capture on Android KitKat and higher using new internal Android API’s. The new screen capture system has significant improved speed. Since this uses internal Android API’s, for now, this new Mesh Agent feature must be activated on the agent-side user interface. Rick improved the WebRTC support with the latest version of the WebRTC libraries, support for FireFox (in addition to Chrome & Opera), color correction on some devices and much more.

The result of all these changes and many other bug fixes is our best ever support for Android device.

Questions and feedback appreciated,
Ylian Saint-Hilaire
info.meshcentral.com

Android settings control panel has significantly improved performances and looks.
Remotely monitor and manage your Android devices over the Internet better than ever.

Mesh Android Settings

Some of the Meshcentral team using remote video call for help.
From left to right (Matt Royer, Chris Piper, Rick Edgecombe, Ylian Saint-Hilaire)

Mesh WebRTC video

 

  • Mesh
  • MeshCentral
  • MeshCentral.com
  • android
  • WebRTC
  • Settings
  • Android Settings
  • Ylian
  • Ylian Saint-Hilaire
  • Icon Image: 

  • News
  • Education
  • Enterprise
  • Mobility
  • Open Source
  • Small Business
  • Android* Development Tools
  • Android*
  • Embedded
  • Laptop
  • Phone
  • Tablet
  • Developers
  • Partners
  • Professors
  • Students
  • Android*
  • Theme Zone: 

    IDZone

    Include in RSS: 

    1

    Encode\Decode problem with YUV420Planar

    $
    0
    0

    Hi,

    i'm developing a Voip application on Samsung GT-P5200 (10'') and i've an issue with OMX.Intel.VideoDecoder.AVC and OMX.Intel.VideoEncoder.AVC (both h.264). When i send/recive a video from another GT-P5200 it's Ok, but when i send a video to another Tablet/Desktop , this is without any color (black/white only), and the same when i receive a video from another device. I see that OMX.Intel supports only YUV420SemiPlanar format color, but the other device wants YUV420Planar, ther's a way to use YUV420Planar on OMX.Intel or to do a conversione between SemiPlanar and Planar ?

    Instrucciones de instalación de la imagen Intel® Atom™ x86 para Android* 4.4 KitKat - recomendada

    $
    0
    0

    Introducción

    Este documento lo guiará por los pasos de la instalación de la imagen Intel® Atom™ x86 para Android* KitKat, una imagen que se puede usar para desarrollar aplicaciones en la arquitectura x86 de Intel.

    Prerrequisitos

    La imagen de emulador x86 para Android necesita que esté instalado el SDK de Android. Para obtener instrucciones de instalación y configuración del SDK de Android, consulte el sitio web para desarrolladores de Android (http://developer.android.com/sdk/).

    Opcional: la imagen de emulador x86 para Android se puede acelerar con el Intel Hardware Accelerated Execution Manager (HAXM). Si desea conocer más información, consulte la sección "Optimización" de este documento.

    Instalación

    Descarga por medio del Android SDK Manager

    1. Inicie el Android SDK Manager.
    2. Seleccione la imagen “Intel x86 Atom System Image” bajo “Android 4.4 (API 19)”:
    3. Una vez seleccionada, haga clic en el botón de instalación Install Package.
    4. Lea el acuerdo de licencia de Intel Corporation. Si acepta los términos, seleccione Accept y haga clic en Install.
    5. El SDK Manager descargará y extraerá la imagen de sistema en el lugar apropiado dentro del directorio del SDK de Android.

    Uso de la imagen de sistema

    1. Inicie Android AVD Manager y cree un nuevo AVD, con "Target" configurado como "Android 4.4 – API Level 19", y "CPU/ABI" como "Intel Atom (x86)".
      La imagen Intel Atom x86 para Android KitKat puede aprovechar las prestaciones de GPU de hardware para mejorar el rendimiento de juegos, de programas que hagan un uso intensivo de gráficos y de elementos de la interfaz de usuario. Para mejorar el rendimiento, no olvide marcar la casilla "Use Host GPU" (usar GPU host) cuando cree la imagen.
      Nota:la funcionalidad y el rendimiento de la aceleración de la GPU depende en gran medida de la tarjeta gráfica y los controladores de gráficos de su equipo. La aceleración de la GPU se debe habilitar para cada AVD.


      Nota: si no está disponible la opción "Intel Atom (x86)" para CPU/ABI, asegúrese de que la imagen de sistema esté instalada correctamente.
    2. Haga clic en el botón "Create AVD".
    3. El AVD ya se ha creado y está listo para usarse:

    Optimización

    Aceleración de la CPU

    El rendimiento de la imagen Intel Atom x86 para Android KitKat se puede mejorar mediante virtualización basada en hardware con tecnología VT-x de Intel.

    Si su computadora tiene un procesador Intel compatible con VT-x, se recomienda usar el Supervisor de Ejecución Acelerada por Hardware Intel (HAXM) junto con esta imagen de sistema. Para obtener más información acerca de Intel HAXM, visite http://software.intel.com/es-es/android.

    Nota: Intel HAXM es sólo para los sistemas operativos Windows y OS X. En el caso de hosts Linux, para acelerar la emulación se puede usar la máquina virtual basada en kernel (KVM). En esta guía encontrará información sobre la instalación y configuración de KVM en Ubuntu: https://help.ubuntu.com/community/KVM/Installation

    Otros artículos y recursos relacionados

    Instrucciones de instalación de la imagen Intel Atom x86 para Android Ice Cream Sandwich - Manual
    Imagen de sistema del Emulador Android 4.4 (KitKat)
    Instrucciones de instalación de la imagen Intel Atom x86 para Android 4.4 KitKat - Manual
    Learning Series #5: Instalación del SDK Android para arquitectura Intel
    Acelerar la compilación: Parte 1 - ccache

    Para aprender más acerca de las herramientas de Intel para desarrolladores Android, visite Intel Developer Zone para Android.

  • Developers
  • Android*
  • Android*
  • Android* Development Tools
  • Intel Hardware Accelerated Execution Manager (HAXM)
  • Intel® Atom™ Processors
  • Phone
  • URL
  • Theme Zone: 

    Android

    HAXM installation failure on Windows 7

    $
    0
    0

    I have an Intel i5-3570K @ 3.4GHz and an Asus P8Z77-V LK motherboard with 16GB of RAM. The Intel Processor Identification Utility reports:

    Execute Disable Bit: Yes

    Intel(R) Virtualization Technology: Yes

    In the BIOS I have Intel Virtualization and Execute-Disable Bit Capability enabled and I am running the BIOS version 0403.

    The message I am getting is:

    'This computer meets the requirements for HAXM, but Intel Virtualization (VT-x) is not turned on. HAXM cannot be installed until VT-x is enabled. Please refer to the Intel HAXM documentation for more information.'

    The first time I attempted the installation Intel Virtualization was not turned on. I have enabled it in the BIOS, shut the system down for 10 minutes with power removed, and reattempted the installation several times with the same error message.

    I have attached the HAXM install log and the complete Processor Identification Utility report.

    I'm at a loss where to go next.

    AttachmentSize
    DownloadPIU.txt1.14 KB
    Downloadhaxm_install_log_6.txt259.38 KB

    Integration of the Intel® System Debugger into Eclipse*

    $
    0
    0

     

    Eclipse* IDE Integration

    The Eclipse* CDK, Eclipse* JRE and the Eclipse* CDT integrated development environment are not shipped with this package of the Intel® System Studio. The Eclipse* integration is automatically offered as one of the last steps of the installation process if you run install.sh or install_GUI.sh. If you decide against integration during an earlier install, simply rerun the Intel® System Studio installer.

    When asked point the installer to the installation directory of your Eclipse* install. Usually this would be /opt/eclipse/.

    The prerequisites for successful Eclipse integration are:

    1. Eclipse* 4.2 (Juno) – Eclipse* 4.3 (Kepler)

    2. Eclipse* CDT 8.0 – 8.3

    3. Java Runtime Environment (JRE) version 6.0 (also called 1.6) update 11 or later.

     

    Integrating the debuggers into Eclipse*

    Remote debugging with using the Eclipse* IDE requires installation of the C\C++ Development Toolkit (CDT) (http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/junosr2) as well as Remote System Explorer (RSE) plugins (http:\\download.eclipse.org\tm\downloads\). In addition RSE has to be configured from within Eclipse* to establish connection with the target hardware.

    Integrating the Intel® System Debugger into Eclipse* and Wind River* Workbench*

    To add Intel® System Debugger Eclipse* integration after full Intel® System Studio installation or to add the Intel® System Debugger launcher into Wind River* Workbench* this can be done from within Eclipse* by following these steps:

    1. Navigate to the “Help > Install New Software “  entry in the pulldown menu
    2. Select “Add” and  “Local” in the following menus … 
    3. Browse to <ISS_INSTALL_PATH>/intel_system_debugger_plugins, where the default for ISS_INSTALL_PATH is /opt/intel/system_studio_2015.0.xxx/

    1. Define which debugger start-up to launch under “Launcher Options …”
    2. Launch Debugger
  • Developers
  • Android*
  • Linux*
  • Tizen*
  • Yocto Project
  • Android*
  • Internet of Things
  • C/C++
  • Intermediate
  • Embedded
  • URL
  • Intel® System Debugger - Linux* host for latest Intel® architecture

    $
    0
    0

    The Intel® System Debugger included in the Intel® System Studio 2015 Beta adds Linux* hosted support for the latest Intel® Atom™ Processor, Intel® Core™ Processor and Intel® Quark SoC generations. 

    For Intel® ITP-XDP3 devices using the Intel® Dfx Abstraction layer it does so through using the Mono Runtime 2.10.8 or higher (more information at http://www.mono-project.com)

     

    New Target Platform Support

     

    • Support for platforms based on the processors listed below using the Intel® ITP-XDP3 device
      • Intel® Atom™ Processor  C2xxx
      • Intel® Quark™ SoC X1000
      • Intel® Atom™ Processor  E38xx, Z3680, Z37xx
      • 4th generation Intel® Core™ and Intel® Xeon™ processor
      • 3rd generation Intel® Core™ processor support available on request
    • Support for Intel® Quark SoC using the following OpenOCD* compatible  devices

    https://www.olimex.com/Products/ARM/JTAG/ARM-USB-OCD-H/

    The following pin adapter was used to connect the Intel® System Debugger to the Intel® Quark SoC board:

    https://www.olimex.com/Products/ARM/JTAG/ARM-JTAG-20-10/

    • Support of BIOS flashing for 4th generation Intel® Core™ processor
    • Support for 3rd generation Intel® Core™ processor target on request via IntelSystemStudio@intel.com

    Host Software Requirements

    • For installation of the Intel® System Debugger, root or sudo root rights are required. With user rights, the option to install the Intel® System Debugger is not available during installation. 

    For Intel® ITP-XDP3 support of the newly added target platforms (start_xdb_2015_products.sh)

    • Intel® Atom™ Processor  C2xxx
    • Intel® Quark SoC X1000
    • Intel® Atom™ Processor  E38xx, Z3680, Z37xx
    • 3rd and 4th generation Intel® Core™ and Intel® Xeon™ processor
    • 64bit (x86_64) Linux* system running
      • Ubuntu* 12.04 LTS, 13.04
      • Fedora* 17, 18
    • Mono Runtime 2.10.8 or higher (more information at http://www.mono-project.com)
      • The following packages are required:
        • Ubuntu*: mono-complete
        • Fedora*: mono-basic, mono-core, mono-data, mono-extras, mono-locale-extras
    • libusb 0.1.12 or higher
    • fxload 0.0.20020411 or higher

    > sudo apt-get install fxload

    or

    > yum install fxload

    • Java runtime environment (JRE) 1.7 or 1.6 to use the Eclipse* framework. In a web browser, access www.java.com , and download and install JRE 1.7. Make sure that the $PATH environment variable contains the path to the JRE bin-directory.

    For legacy Intel® Atom™ Processor  support (start_xdb_legacy_products.sh)

    • Linux* system (32bit or 64bit) running
      • Red Hat Enterprise* Linux* 5, 6
      • Ubuntu* 10.04 LTS, 12.04 LTS, 14.04
      • Fedora* 20, 21
      • openSUSE* 12.1
      • SUSE LINUX Enterprise Server*  11 SP2, 12
    • libusb 0.1.12 or higher
    • fxload 0.0.20020411 or higher

    > sudo apt-get install fxload

    or

    > yum install fxload

    • Linux32 OCDRemote v12.0-0 or newer is required for Macraigor Systems* usb2Demon* support.  (Check for recommended version at http://www.macraigor.com/Intel/)
    • Java runtime environment (JRE) 1.7 or 1.6 to use the Eclipse* framework. In a web browser, access www.java.com , and download and install JRE 1.7. Make sure that the $PATH environment variable contains the path to the JRE bin-directory.
    • Kernel development sources for your development host system will be required for Macraigor System* driver installation   

    Starting the Debugger

     

    To start the Intel® System Debugger change into the /opt/intel/system_studio_2015.0.xxx/debugger/xdb installation directory.

    From there run the debugger launch shell script that best fits your host-target setup.

    1. start_xdb_legacy_products.sh -  this script allows the user to debug older processors using either Intel® ITP-XDP3 or Macraigor* usb2Demon*, such as:
      • Intel® Atom™ Processor  E600, N2000, Z500, Z600, Z2400, Z2500, Z2700, CE4100, CE4200, CE5300
      • Intel® Puma™ 6 Media Gateway

     

    1. start_xdb_2015_products.sh -  this script allows the user to debug recent processors/platforms using the Intel® ITP-XDP3 device, such as
    • Intel® Atom™ Processor  C2xxx
    • Intel® Quark SoC X1000
    • Intel® Atom™ Processor  E38xx, Z3680, Z37xx
    • 3rd and 4th generation Intel® Core™ and Intel® Xeon™ processor
    1. start_xdb_gdb_remote.bat – this script launches the debugger for connection to Intel® Quark SoC using the OpenOCD* interface.  See Using Intel® System Debugger with OpenOCD* for more details.

     

  • Developers
  • Android*
  • Linux*
  • Yocto Project
  • Android*
  • Internet of Things
  • C/C++
  • Intermediate
  • Embedded
  • URL
  • Creating a Hardware Decoder Integrating FFmpeg with MediaCodec for Intel® Atom™-Based Android* Platforms

    $
    0
    0

    Download PDF

    Introduction

    The electronics market is teeming with a multitude of Android* devices with different versions of the OS and different hardware. As a result, online video ISVs have a difficult time delivering their content. Since Android 4.1+ devices will occupy the market in the future, this article shows how to integrate FFmpeg with MediaCodec to support the many types of video formats and create a hardware decoder for Intel® Atom™-based Android platforms.

    Background

    Google created MediaPlayer as a simpler way to control audio and video playback. However, MediaPlayer is limited in that it offers only three media formats: mp4, 3gpp, and mkv (beginning with Android 4.0). However, most online video ISVs use other video formats like FLV, etc. To play unsupported formats and be compatible with the greatest number of Android devices in the market, online video developers have adopted FFmpeg as their software decoder of choice. Alternatively, some developers integrate OpenMAX* (a well-known standard in the media industry) to access Android’s low-level hardware decoder for Android 2.3 devices, a codec to enable Android 4.0 devices, and MediaCodec to enable Android 4.1+ devices. They had to buy most of the popular Android devices in the market for testing. Even then, they still had some compatibility problems, so they had to adopt FFmpeg for backup.

    FFmpeg with MediaCodec solution analysis

    FFmpeg [1] is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter, and play pretty much anything that humans and machines have created. FFmpeg can also provide the function of parsing video streaming. 

    MediaCodec was first introduced in the Android 4.1 release, based on the Java* API, and provides the interface to access low-level system codecs, either hardware codec, or, as with the audio codec, a highly optimized software codec. Use of MediaCodec can provide reasonable performance as well as power savings.

    Besides mp4, 3gpp, and mkv video formats, which Android MediaPlayer can support directly, many other popular video formats in the market, such as flv, mov, rm, rmvb, and so on, are not. For these unsupported formats, online video ISVs usually adopt FFmpeg as their software decoder, which will cost more CPU workload and power.

    One solution is to integrate FFmpeg with MediaCodec, which will support all the different kinds of video formats and create a hardware decoder for Intel Atom-based Android platforms.

    The solution is shown in the following diagram: 

    ffmpeg mediacodec solution diagram
    Figure1. Integrating FFmpeg with MediaCodec solution

    In this solution, FFmpeg unpacks the video container as separate raw video data and audio data in a native layer. Then, the raw video data is transferred into MediaCodec’s APIs in the Java layer for hardware decoder. The audio data is decoded by FFmpeg directly, which does not cost much CPU workload. Finally, FFmpeg syncs the audio and video by time stamp.

    This solution supports some other popular video formats that aren’t supported by MediaPlayer, and online video ISVs are finding it helpful.

    Building FFmpeg for Android on x86

    FFmpeg has supported Android since the 2.1 release, but the FFmpeg package did not have a build script for x86 on Android. Following are the steps for how to build FFmpeg for Android on x86:

    1. On FFmpeg's web site, download the latest FFmpeg release: ffmpeg-2.2.4.tar.bz2 [2]. 
    2. Copy the FFmpeg package to a Ubuntu* build machine and extract using this “tar” command:
      wangsy@ubuntu:~/Desktop$  tar  xvf  ffmpeg-2.2.4.tar.bz2
    3. Set up ANDROID_NDK_HOME environment with the "export" command: 
      export  ANDROID_NDK_HOME= $ ANDROID_NDK_HOME :/~/android-ndk-r9c
    4. Copy the following configuration file to ~/ffmpeg-2.2.4 and add the "run" permissions: 
      wangsy@ubuntu:~/Desktop$  cp  config_build_x86.sh  ~/ffmpeg-2.2.4
      wangsy@ubuntu:~/Desktop$  sudo chmod  a+x  ~/ffmpeg-2.2.4/config_build_x86.sh

      Config Build Icon

    5. Run the configuration script and build using the “make” and “make install” commands: 

      wangsy@ubuntu:~/Desktop/ffmpeg-2.2.4$  make
      wangsy@ubuntu:~/Desktop/ffmpeg-2.2.4$  make install

    The generated Android for x86 libs are under ~/Desktop/ffmpeg-2.2.4/android/x86/lib$.  

    Developers can copy these generated libs for development. Because YASM [3] assembler compiler and Intel® Streaming SIMD Extensions (Intel® SSE) [4] are enabled in the config_build_x86.sh, the generated Android for x86 libs are optimized for high performance on Intel Atom-based Android platforms.

    Integrate MediaCodec Java APIs from FFmpeg Native Layer

    The MediaCodec class can be used to access the low-level media codec, i.e., encoder/decoder components. It is easy to call it from the Java layer. But in this solution, the FFmpeg unpacks the raw video data under the native layer, so we need to parse the MediaCodec functions from native layer and transfer the raw video data to these APIs.

    Demo code: Accessing the MediaCodec class from the native layer:

    struct classname
    {
        const char *name;
        int offset;
    };
    static const struct classname classes[] = {
        { "android/media/MediaCodecList", OFF(media_codec_list_class) },
        { "android/media/MediaCodec", OFF(media_codec_class) },
        { "android/media/MediaFormat", OFF(media_format_class) },
        { "android/media/MediaFormat", OFF(media_format_class) },
        { "android/media/MediaCodec$BufferInfo", OFF(buffer_info_class) },
        { "java/nio/ByteBuffer", OFF(byte_buffer_class) },
        { NULL, 0 },
    };
    JNIEnv* env = NULL;
        ATTACH_THREAD;
    
        for (int i = 0; classes[i].name; i++) {
            *(jclass*)((uint8_t*)p_sys + classes[i].offset) =
                (*env)->FindClass(env, classes[i].name);
    
            if ((*env)->ExceptionOccurred(env)) {
                msg_Warn(p_dec, "Unable to find class %s", classes[i].name);
                (*env)->ExceptionClear(env);
                goto error;
            }
        }

     

    Demo code: Accessing the MediaCodec functions from the native layer:

    struct member
    {
        const char *name;
        const char *sig;
        const char *class;
        int offset;
        int type;
    };
    static const struct member members[] = {
        { "toString", "()Ljava/lang/String;", "java/lang/Object", OFF(tostring), METHOD },
    
        { "getCodecCount", "()I", "android/media/MediaCodecList", OFF(get_codec_count), STATIC_METHOD },
        { "getCodecInfoAt", "(I)Landroid/media/MediaCodecInfo;", "android/media/MediaCodecList", OFF(get_codec_info_at), STATIC_METHOD },
    
        { "isEncoder", "()Z", "android/media/MediaCodecInfo", OFF(is_encoder), METHOD },
        { "getSupportedTypes", "()[Ljava/lang/String;", "android/media/MediaCodecInfo", OFF(get_supported_types), METHOD },
        { "getName", "()Ljava/lang/String;", "android/media/MediaCodecInfo", OFF(get_name), METHOD },
    
        { "createByCodecName", "(Ljava/lang/String;)Landroid/media/MediaCodec;", "android/media/MediaCodec", OFF(create_by_codec_name), STATIC_METHOD },
        { "configure", "(Landroid/media/MediaFormat;Landroid/view/Surface;Landroid/media/MediaCrypto;I)V", "android/media/MediaCodec", OFF(configure), METHOD },
        { "start", "()V", "android/media/MediaCodec", OFF(start), METHOD },
        { "stop", "()V", "android/media/MediaCodec", OFF(stop), METHOD },
        { "flush", "()V", "android/media/MediaCodec", OFF(flush), METHOD },
        { "release", "()V", "android/media/MediaCodec", OFF(release), METHOD },
        { "getOutputFormat", "()Landroid/media/MediaFormat;", "android/media/MediaCodec", OFF(get_output_format), METHOD },
        { "getInputBuffers", "()[Ljava/nio/ByteBuffer;", "android/media/MediaCodec", OFF(get_input_buffers), METHOD },
        { "getOutputBuffers", "()[Ljava/nio/ByteBuffer;", "android/media/MediaCodec", OFF(get_output_buffers), METHOD },
        { "dequeueInputBuffer", "(J)I", "android/media/MediaCodec", OFF(dequeue_input_buffer), METHOD },
        { "dequeueOutputBuffer", "(Landroid/media/MediaCodec$BufferInfo;J)I", "android/media/MediaCodec", OFF(dequeue_output_buffer), METHOD },
        { "queueInputBuffer", "(IIIJI)V", "android/media/MediaCodec", OFF(queue_input_buffer), METHOD },
        { "releaseOutputBuffer", "(IZ)V", "android/media/MediaCodec", OFF(release_output_buffer), METHOD },
    
        { "createVideoFormat", "(Ljava/lang/String;II)Landroid/media/MediaFormat;", "android/media/MediaFormat", OFF(create_video_format), STATIC_METHOD },
        { "setInteger", "(Ljava/lang/String;I)V", "android/media/MediaFormat", OFF(set_integer), METHOD },
        { "getInteger", "(Ljava/lang/String;)I", "android/media/MediaFormat", OFF(get_integer), METHOD },
        { "setByteBuffer", "(Ljava/lang/String;Ljava/nio/ByteBuffer;)V", "android/media/MediaFormat", OFF(set_bytebuffer), METHOD },
    
        { "<init>", "()V", "android/media/MediaCodec$BufferInfo", OFF(buffer_info_ctor), METHOD },
        { "size", "I", "android/media/MediaCodec$BufferInfo", OFF(size_field), FIELD },
        { "offset", "I", "android/media/MediaCodec$BufferInfo", OFF(offset_field), FIELD },
        { "presentationTimeUs", "J", "android/media/MediaCodec$BufferInfo", OFF(pts_field), FIELD },
    
        { "allocateDirect", "(I)Ljava/nio/ByteBuffer;", "java/nio/ByteBuffer", OFF(allocate_direct), STATIC_METHOD },
        { "limit", "(I)Ljava/nio/Buffer;", "java/nio/ByteBuffer", OFF(limit), METHOD },
    
        { NULL, NULL, NULL, 0, 0 },
    };
    
    JNIEnv* env = NULL;
    jclass last_class;
        for (int i = 0; members[i].name; i++) {
            if (i == 0 || strcmp(members[i].class, members[i - 1].class))
                last_class = (*env)->FindClass(env, members[i].class);
    
            if ((*env)->ExceptionOccurred(env)) {
                msg_Warn(p_dec, "Unable to find class %s", members[i].class);
                (*env)->ExceptionClear(env);
                goto error;
            }

    Using the method above, developers can parse the MediaCodec class and functions from native layer. For more information on how to use them, go to http://developer.android.com/reference/android/media/MediaCodec.html

    Summary

    The Intel optimization method was developed to help developers integrate FFmpeg with MediaCodec to support many different types of video formats and create a hardware decoder for Intel Atom-based Android platforms.

    Related Articles

    High Quality Video Compression: Integrating an H.265/HEVC Solution for Intel® Atom™-Based Android* Platforms:  https://software.intel.com/en-us/android/articles/high-quality-video-compression-integrating-an-h265hevc-solution-for-intel-atom-based-android-platforms

    Android* Hardware Codec‒MediaCodec:  https://software.intel.com/en-us/android/articles/android-hardware-codec-mediacodec

    References

    [1] FFmpeg: http://www.ffmpeg.org/index.html

    [2] FFmpeg downloads: http://www.ffmpeg.org/olddownload.html

    [3] Yasm Modular Assembler Project: http://yasm.tortall.net/

    [4] Intel® Streaming SIMD Extensions (Intel® SSE): https://software.intel.com/en-us/articles/performance-tools-for-software-developers-intel-compiler-options-for-sse-generation-and-processor-specific-optimizations.

    About the Author

    Songyue Wang is a senior application engineer in the Intel Software and Solutions Group (SSG), Developer Relations Division, Intel® Atom™ Processor Mobile Enabling Team. Songyue is responsible for Android app enabling on Intel Atom processors. He focuses on optimizing multimedia performance on the Bay Trail platform, working closely with the most popular online video providers in the PRC region to enable the H.265/HEVC encoder and decoder solution and Intel® Wireless Display differentiation features on Android for x86 platforms.

  • ffmpeg
  • MediaCodec
  • android
  • Developers
  • Android*
  • Android*
  • Intermediate
  • Media Processing
  • Tablet
  • URL
  • Theme Zone: 

    Android

    Analyzing the Performance of C/C++ and Debugging OpenGL ES* Frames on Mainstream x86 and ARM* Android* Devices

    $
    0
    0

    Download PDF

    Introduction

    When developing an Android* application, you usually need to test, optimize, and debug on many different platforms. While basically every hardware and chip manufacturer provides a set of custom tools for this, developers can find it cumbersome to install and learn how to use all of them. With the latest releases (2014 R2 as of now), Intel® Graphics Performance Analyzers (Intel® GPA), Intel® Frame Debugger, and Intel® VTune™ Amplifier are able to support most mainstream Android 4.x devices regardless of their architecture (ARM* or x86).

    We have tested these Intel tools and successfully used them on the ARM Android devices listed below, but basically any Android 4.x device is probably compatible. (Note:  ARM*-based devices not shown in the following list are unsupported but may still work with the Intel GPA toolset.):

    ModelGPUAndroid* Version

    Samsung* Galaxy Nexus
    (GT-i9250)

    Imagination Technologies*
    PowerVR SGX540

    Android 4.3

    Samsung* Galaxy S4
    (GT-I9500ZNASER)

    Imagination Technologies*
    PowerVR SGX544

    Android 4.4

    Samsung* Galaxy S III
    (GT-i9300)

    ARM* Mali 400MP

    Android 4.3

    Google* Nexus 4

    Qualcomm* Adreno 320

    Android 4.4

    Google* Nexus 5

    Qualcomm* Adreno 330

    Android 4.4

    LG* G2 D802

    Qualcomm* Adreno 330

    Android 4.4

    Amazon* Kindle Fire HD

    Imagination Technologies*
    PowerVR SGX544

    Amazon* Fire OS 3.0

    Intel® GPA System Analyzer ‒ High-Level View of App Performance

    Intel GPA System Analyzer can run on Windows* 7/8.x, Mac* OS X*, and Linux* and can be used to analyze apps running on almost any Android 4.x device connected over ADB. It’s a free tool, part of the Intel GPA suite you can get with dedicated tools for graphics analysis and optimization, or INDE, the native cross-platform productivity suite supporting Intel® Architecture and ARM*. If your device is rooted, this tool can analyze any application installed on the device. Otherwise, it can only analyze apps with Internet permission and the debuggable flag set to “true”.

    Setting the debuggable flag to “true” in the AndroidManifest is done automatically when you’re doing a debug build with gradle or ant / Android Studio or Eclipse*. But when it comes to analyzing the real performance of an application, you want to run a version that has been optimized for release.

    You can manually set this flag to “true” in your manifest, but lint will complain about it and cause your build to abort. You can easily overcome that.

    In Eclipse: disable “HardcodedDebugMode” in Lint Error checking inside Android Preferences.
    In Android Studio: set inside your build.gradle

    
    android {
               lintOptions {
                   disable 'HardcodedDebugMode'
    }
    }

    Now, when running, you first get a list of applications running on the device you’ve chosen:

    Selecting one will trigger its launch on the device, along with its real-time analysis:

    From there, you can drag-and-drop any metric from the left side to see its value evolve in real time.  You may not get hardware-specific metrics on every device as their support varies, but you’ll have at least: Target App CPU Load, RAM usage, Device and Network IOs, OpenGL* metrics (draw calls, vertex count, frame time).

    In addition to these real-time values, you have the ability to trigger “state overrides” from the bottom left of the window. This will help you determine the current bottleneck in your application:

     Normal scene:
     

    With all the textures set to a simple 2x2 one:

     With disabled alpha-blending:
     

    Showing wireframe:

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    You can also disable all the Draw calls. Then, no graphics will be rendered, but if the FPS improves, the bottleneck isn’t on the OpenGL* side.

    A more in-depth article on Intel GPA along with a sample code is available: https://software.intel.com/en-us/android/articles/using-the-intel-gpa-system-analyzer-to-improve-android-apps.

    Intel® Frame Debugger ‒ Debugging an OpenGL Rendered View

    Intel Frame Debugger is used to capture and fully debug OpenGL frames. It’s also a free tool you can get from https://software.intel.com/en-us/vcsource/tools/intel-gpa or INDE and fully works on most Android devices.

    As of now, it can be run on Windows 7/8.x platforms only.

    First, add a frame from a device by clicking “Add”:

    This will show you a list of applications that you may, or may not, have the right to analyze. Just like with Intel GPA System Analyzer, you may analyze any application on a rooted device. Otherwise, you can analyze only the ones with Internet permission and the debuggable flags set to “true”:

    Double-click to launch one and click on “capture” to get a frame. Once it’s done, go back to the previous view and select the captured frame:

    You can see all the draw calls that have been made on the left side and the associated simulated OpenGL ES frame buffer on the right side.

    A double click on one of these draw calls will allow you to inspect all steps of the OpenGL ES pipeline associated with the draw call, among these:

    • The primitives and the associated Vertex Buffer Objects

    • The vertex and fragment shaders:

    You can see and modify these shaders and even modify the values they’re receiving. This will modify the simulated frame as well as the rendered frame on your device if it’s still connected!

    Intel® VTune™ Amplifier ‒ Analyzing the Performance of C/C++ Code from Android Applications

    Intel VTune Amplifier is part of Intel® System Studio suite. Unlike the previously mentioned tools, this suite isn’t free unless it’s for non-commercial software development. As of now, this tool can be run from Windows and Linux hosts.

    To begin with VTune Amplifier, create a new project:

    In its Properties, choose your device and “Launch Android Package” as type, then you can enter your package name or click on “browse” to look for it:

    Once this is done, you can launch a “basic hotspot” analysis. Starting the analysis will launch the app on your device:

    Click on “Stop” to stop the collection (and automatically close the application).

    The trace will be collected and displayed:

    From there you can start looking at the results with the “Bottom-up” view and group data by Module / Function / Call Stack:

    To associate full library symbols and sources with your results, you can add their paths to your project properties (usually ./obj/local/ABI/ for the non-stripped libs and ./jni for the sources).

    More information on performance analysis using VTune can be found at: https://software.intel.com/en-us/node/471808

    On supported x86 Android Devices (Intel® reference designs and Dell Venue* 8 with developer image), VTune Amplifier can be used to analyze Java* workloads, get CPU and GPU metrics, and do power analysis. You can find more details at the following links:

  • Intel® GPA
  • OpenGL
  • Intel Frame Debugger
  • INDE
  • Developers
  • Android*
  • Android*
  • C/C++
  • Beginner
  • Intermediate
  • Intel® Integrated Native Developer Experience (INDE)
  • Intel® Graphics Performance Analyzers
  • OpenGL*
  • Debugging
  • Development Tools
  • Game Development
  • URL
  • Theme Zone: 

    Android

    Editor’s App Picks May/June 2014

    $
    0
    0

    Here at the Intel Developer Zone, we’ve launched an exciting platform called the "Share Your App Project”, a great way for interested developers to share what they’re working on with the greater developer community. Every month, we plan to recognize a few apps for innovation, creativity, and intuitive and interesting use of technology. If this sounds intriguing to you, and you’d like to get more information, visit the Share Your App page and let us know what you’re working on right now.

    In April’s Editor’s App Picks, we took a look at Comptines et chansons, ZonzoFox, The Zombie Tale, Amazing Ant Smasher, and Sound Pranker. For a special combined issue of May and June, we’re going to look at Status and Quotes, Press and Guess Hard, and Home Remedies.

    Status and Quotes

    Ever wonder how your friends on whatever social networks you frequent come up with all those amazing quotes? This app might be what you’ve been looking for. New quotes and possible status updates added on a regular basis so you can keep your profiles fresh and interesting.

    This app (under development) features Windows-style tiles and icons with a grid-view; categories include Alone, Amazing, Revenge, Insult, and many, many more, with quotes on anything from Age to Yoga. More than 3000 quotes and statuses available from which to choose from.

    Developed using Java*/Dalvik, Eclipse development framework.

    Press and Guess! HARD

    You might be a whiz at puzzles, but this app adds an interesting dimension – an angry cat that apparently gets very  angry if you win (although he is appeased with milk and belly rubs).

    The aim of the game is to figure out what the selected images are really representing; you have a time limit, and you also have to solve it before the cat does. The game gives you tips, but even these can stump you at higher levels; however, if you really get stuck you can skip a level and come back to it later. Interesting gameplay note: between levels, you can read up on interesting cat facts.

    Developed using Java*/Dalvik. Available in Google Play.

    Home Remedies

    Home RemediesLooking for  more natural ways to treat common ailments? This app, still under development, offers natural solutions to minor problems, mild deviations from normal health and those that can be easily diagnosed and self-managed (not meant to substitute for actual medical device). More from the app description:

    “A home remedy is a treatment to cure a disease or ailment that employs certain spices, vegetables, or other common items. Home remedies may or may not have medicinal properties that treat or cure the disease or ailment in question, as they are typically passed along by laypersons (which has been facilitated in recent years by the Internet). Many are merely used as a result of tradition or habit or because they are effective in inducing the placebo effect. A significant number, however, have been demonstrated to effectively treat ailments such as sprains, minor lacerations, headaches, fevers, and even the common cold.” Developed using HTML5 and the Intel XDK.

    Interested in getting your apps featured? We invite you to take a look at the Share Your App Android project, where you can share your app projects in process or completed on the Intel® Developer Zone to get feedback, gain exposure, or be discovered for co-marketing opportunities..

     

  • android
  • share your app
  • SYAP
  • Icon Image: 

  • Android*
  • Windows*
  • Developers
  • Android*
  • Include in RSS: 

    1

    An investigation of fast real-time GPU-based image blur algorithms

    $
    0
    0

    In this blog post I'm going to start exploring the topic of blur filters. My original intention was to…

    -    Provide an overview and optimization ideas for a few of the popular real time image blur filters, applicable on very different range of hardware (from sub-4W mobile device GPUs to high end 250W+ desktop GPUs).

    -    Give an example of the techniques that runs on Windows Desktop OpenGL and Android OpenGL ES 3.0 and 3.1, including compute shader use on OpenGL ES 3.1.

    ...but I realised that it might take more than one blog post (and a lot more work) to properly explore the topic, so below is the first installment. Thus, please feel free to contribute ideas and corrections in the comments section at the bottom.

    Image blur filters


    Image blur filters are commonly used in computer graphics – whether it is an integral part of a Depth of Field or HDR Bloom, or another post process effect, blur filters are present in most 3D game engines and often in multiple places. Blurring an image is a fairly trivial thing to do: just collect neighboring pixels, average them and you get your new value, right? 

    Bloom and Depth of Field – two common uses of a blur filter
    Bloom and Depth of Field – two common uses of a blur filter

    Well, yes, but there are different ways of doing it with different visual results, quality and performance.

    In this article I’ll focus primarily on performance (and quality trade-offs), as the difference in cost between a naïve and a more optimal solution can sometimes be an order of magnitude, but also different algorithms can be more optimal on different hardware.

    I have set out to explore and contrast three most common techniques and how they behave in a sample of modern GPU hardware, ranging from mobile GPUs to integrated graphics and discrete GPU cards. Please feel free to comment if you are using something better or different - I would love to add it to the sample for profiling and testing, and provide with the next update.

    These three algorithms are:

    They are all generic algorithms that are fully applicable to effects like a Bloom HDR filter. However, in a specific scenario, for example for use in Depth of Field, they would require additional customization (such as weighted sampling to avoid haloing/bleeding) which can impact relative performance. Even more modification would be needed to achieve something akin to a median filter (http://en.wikipedia.org/wiki/Median_filter). However, the optimizing techniques and numbers presented here should be helpful even if you are setting out to do a special blur like Bokeh (http://en.wikipedia.org/wiki/Bokeh), Airy disk (http://en.wikipedia.org/wiki/Airy_disk) or various image space lens flare effects. The sample also provides a real time Graph visualization which can be used to analyze any custom blur technique.

    Cross-section of a white 10x10 pixel block on black background before/after application of a 15x15 Gauss blur filter
    Cross-section of a white 10x10 pixel block on black background before/after application of a 15x15 Gauss blur filter

    It should also be noted that, although generic algorithms are easier to understand, implement, reuse and maintain, there are cases where specialized ones might do a better job. One such example (although I have not compared it with algorithms presented here) is presented here: http://software.intel.com/en-us/articles/compute-shader-hdr-and-bloom  (based on "HDR: The Bungie Way. Microsoft Gamefest 2006.").

    2D Gaussian blur filter


    Let’s start with a “Gaussian blur filter”, a widely used filter that reduces image detail and noise (for example, to simulate lens out of focus blurring). It is called Gaussian because the image is blurred using a Gaussian curve (http://en.wikipedia.org/wiki/Gaussian_function). 

    Examples of 1D convolution filter kernels with Gaussian “bell curve”
    Examples of 1D convolution filter kernels with Gaussian “bell curve”

    Naïve implementation

    The common way of doing Gaussian blur is to use a convolution kernel (http://en.wikipedia.org/wiki/Kernel_(image_processing)#Convolution). This simply means that we build a 2D matrix of normalized pre-calculated Gaussian function values and use them as weights, and then do a weighted sum of all neighboring pixels in order to calculate each pixel’s new (filtered) value.

    Example of a 7x7 convolution kernel with Gauss distribution values. Adding them all together should yield 1 as values are normalized.
    An example of a 7x7 convolution kernel with Gauss distribution values. Adding them all together should yield 1 as values are normalized.

    For a 2D filter, this also means that to calculate each pixel, we have to do a kernel sized double loop so the algorithm complexity becomes O( n^2 ) for each pixel (where n is the kernel height and/or width, since they are the same). For anything but smallest kernel sizes, this gets very costly, very quickly.

    Separable Horizontal / Vertical

    Thankfully, 2D Gaussian filter kernel is separable as it can be expressed as the outer product of two vectors (see http://blogs.mathworks.com/steve/2006/10/04/separable-convolution/ and http://blogs.mathworks.com/steve/2006/11/28/separable-convolution-part-2/), which in turn means that the filter can be split into two passes, horizontal and vertical, each with O( n ) complexity per pixel (where n is the kernel size). This drastically reduces computation cost while providing the exact same results.

    Example of a 7x7 convolution kernel done using the two pass separable filter approach
    Example of a 7x7 convolution kernel done using the two pass separable filter approach

    It is useful to note that at this stage, the same algorithm can be used for any other applicable convolution (see link above for more details), such as some sharpening filters or edge detection such as Sobel filter.

    Better separable implementation using GPU fixed function sampling

    So far we have ignored actual hardware implementation, but when we apply this algorithm to a real world scenario, the Gaussian blur filter pass needs to happen in real time, often on images with 1280x720 or more pixels. Modern GPUs (both on mobile and desktop devices) are designed with this in mind so it is no wonder that they can do it in just a few milliseconds – however, saving some of those few milliseconds could still mean a difference between a game running at sub-optimal 25 or smooth 30 frames per second.

    Algorithmically much better, this separable filter can run on highly parallel GPU execution units as it is, by executing image reads, math and writes in the form of GPU shaders.

    Shader pseudocode for horizontal separable gauss 7x7 filter pass:

    color = vec3( 0, 0, 0 );
    for( int i = 0; i < 7; i++ )
    {
        color += textureLoad( texCoordCenter + vec2( i, 0 ) ) * SeparableGaussWeights[p];
    }
    return color;

    However, as detailed in http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/, we can take advantage of fixed function GPU hardware, namely samplers, which can load two (in our case) neighboring pixel values and return an interpolated result based on the provided texture coordinate values, all for approximately the cost of one texture read. This roughly halves the number of shader instructions (halves the number of sampling instructions and slightly increases the number of arithmetic instructions) and can increase performance by a factor of two (or less, if we are memory bandwidth limited).

    To do this, we have to calculate new set of weights and sampling offsets such that when sampling two neighboring pixels with a linear filter, we get an interpolated average between them which is in correct proportions in regards to their original Gauss separable filter weights. Then, we add all the samples up using the new set of weights, and we end up with a filter that is much faster but has identical quality compared to the non-optimized naïve implementation that we started from.

    Actual GLSL code from the sample used to do a separable horizontal or vertical pass for a 7x7 filter:

    // automatically generated by GenerateGaussFunctionCode in GaussianBlur.h
    vec3 GaussianBlur( sampler2D tex0, vec2 centreUV, vec2 halfPixelOffset, vec2 pixelOffset )
    {
        vec3 colOut = vec3( 0, 0, 0 );
    
        ////////////////////////////////////////////////;
        // Kernel width 7 x 7
        //
        const int stepCount = 2;
        //
        const float gWeights[stepCount] ={
           0.44908,
           0.05092
        };
        const float gOffsets[stepCount] ={
           0.53805,
           2.06278
        };
        ////////////////////////////////////////////////;
    
        for( int i = 0; i < stepCount; i++ )
        {
            vec2 texCoordOffset = gOffsets[i] * pixelOffset;
            vec3 col = texture( tex0, centreUV + texCoordOffset ).xyz +
                       texture( tex0, centreUV – texCoordOffset ).xyz;
            colOut += gWeights[i] * col;
        }
    
        return colOut;
    }
    

    4 texture samples used to get 7 sample separable filter (two center ones overlap for code simplicity reasons – this inefficiency becomes irrelevant with bigger kernels), with arrows marking offsets (gOffsets from code above).
    4 texture samples used to get 7 sample separable filter (two center ones overlap for code simplicity reasons – this inefficiency becomes irrelevant with bigger kernels), with arrows marking offsets (gOffsets from code above).

    Testing shows that this two approach can bump up performance by nearly a factor of two, increasing with kernel size. However, for very large kernels, the algorithm becomes limited by memory bandwidth (hardware-specific) providing diminishing benefit: the effect starts being noticeable on Intel GPUs on kernel sizes at and above 127x127 (RGBA8), but is likely higher on discrete GPUs (not tested).

    Effect of using hardware sampling and filtering on an i5-4350U Ultrabook (cost in milliseconds)
    Effect of using hardware sampling and filtering on an i5-4350U Ultrabook (cost in milliseconds)

                    Very similar performance differences were observed both on discrete desktop GPU (Nvidia GTX 650) and a Bay Trail tablet CPU with integrated graphics (Atom Z3770) with tested (7x7, 35x35, 127x127) kernel sizes.

    The FastBlurs sample demonstrates this optimized Gauss filter implementation and contains GLSL shader code generator (in GaussianBlur.h) to generate any custom kernel size. In addition, the GLSL code can be generated by running the sample, selecting the required kernel width and clicking on the “Gaussian Blur” interface button repeatedly a few times.

    Working in lower resolution

    So, we’ve got a good Gaussian blur implementation – but our “getting-hit” in-game effect requires a large blur kernel and our target hardware is a high res mobile device. Gaussian is still a bit too expensive, can we do better?

    Well, it turns out it is fairly common to sacrifice some quality and, since blurring is a low-pass filter (preserves low frequency signals while attenuating high frequency ones), down-scale to a smaller resolution buffer, for example to ½ by ½, perform the blur effect and then up-scale back to the original frame buffer. For the blur filter this has two big benefits:

    1. The number of pixels that need to be processed is reduced by 4 for a ½ x ½ intermediate blur buffer.
    2. Same kernel size in the smaller buffer covers 2 x 2 larger area, so for the same final effect the blur kernel should be reduced by ½ in each dimension.

    These two things compound so that the cost for the similar effect is reduced by a factor of 8 when a ½ x ½ intermediate buffer is used, although there is a fixed cost associated with down-sampling to it, and up-sampling the results back into the main one. So this only makes sense for Blur kernels of, for example, 7x7 and above (smaller kernels are also not enough to hide losses in quality due to down-scaling and up-scaling).

    Blurring using intermediate lower resolution buffer at approx. 1/6 of the computation cost
    Blurring using intermediate lower resolution buffer at approx. 1/6 of the computation cost

    The main drawback is that with a small amount of blur (small blur kernels), the “blockiness” pattern from down-sampling to lower resolution and back becomes obvious, so this can be problematic if an effect needs to fade in/out, especially with moving images. This can be resolved, for fade-in and fade-out effects, by interpolating between blurred down-sampled and the final image for small kernel values. In some other cases, such as when using a blur filter to produce a Bloom effect, issues with lower resolution intermediate buffers are even more attenuated by movement and bloom function, so trial and error is often needed to find a more optimal blur filter resolution with regards to quality vs performance.

    To stress the importance of working in smaller (½ by ½, or even ¼ by ¼) intermediate buffers whenever possible, I’ve used the accompanying sample to measure the time needed to blur an image 2560x1600 image on a big desktop AMD R9-290X GPU, and a 1280x720 image on a Nexus 7 tablet:

    Impact of working in lower resolution intermediate buffers
    Impact of working in lower resolution intermediate buffers

    In the case of R9-290X, a large blur kernel of 127x127 is used for the full resolution image, requiring around 3ms in computation time. Using ½ by ½ intermediate buffer requires a 63x63 blur kernel and executes in 0.5ms, producing nearly identical quality image at 1/6 of the time; ¼ by ¼ intermediate buffer requires only 0.17ms. Performance difference on Nexus 7 Android tablet is proportionally similar (running appropriate, much smaller workloads).

     "Kawase blur" filter


    So we’ve got an optimized Gaussian blur implementation and we are processing it in ½ by ½ resolution for our HDR Bloom effect (in a hypothetical game development scenario), but it is still costing us 3ms per frame. Can we do better? Dropping the resolution to ¼ by ¼ doesn’t look good enough, as it causes Bloom to shimmer on movement, and reducing the kernel size does not produce enough of the effect. 

    Well, one Bloom-specific alternative is the (already mentioned) http://software.intel.com/en-us/articles/compute-shader-hdr-and-bloom  (based on "HDR: The Bungie Way. Microsoft Gamefest 2006."). However, it requires a number of render targets, is a bit messier to implement and maintain, not very reusable as a generic blur algorithm and is, by default, fixed to one kernel size (making the effect screen resolution dependent and not easily “tweakable” by artists). 

    However, it turns out that there is a generic blur algorithm that can have even better performance than our optimized Gaussian solution – although there is a trade-off in in filter quality / correctness (it provides fair from ideal distribution, but is acceptable for most game engine purposes) – introduced by Masaki Kawase in his GDC2003 presentation “Frame Buffer Postprocessing Effects in DOUBLE-S.T.E.A.L (Wreckless)” (www.daionet.gr.jp/~masa/archives/GDC2003_DSTEAL.ppt). Initially used for Bloom effect, it can be generalized to closely match Gauss in appearance.

    It is a multi-pass filter where each pass uses results from the previous one and applies small amount of blur, accumulating enough to approximate Gauss distribution. In each pass, the new pixel value is the average of 16 samples in a rectangular pattern at variable distance from the pixel center. The number of passes and sampling distance from the center varies depending on the expected result.

    An example of 5-pass Kawase blur with 0, 1, 2, 2, 3 kernels, matching in output a 35x35 Gauss blur kernel. Marked in blue is 1 sample covering 4 pixels; marked in red is the destination pixel receiving averaged sum of those samples
    An example of 5-pass Kawase blur with 0, 1, 2, 2, 3 kernels, matching in output a 35x35 Gauss blur kernel. Marked in blue is 1 sample covering 4 pixels; marked in red is the destination pixel receiving averaged sum of those samples

    This approach fully utilizes GPU Sampler hardware (http://www.realworldtech.com/ivy-bridge-gpu/6/) to get four pixels with one sample call (4 samples / 16 pixel values per pass). The number of passes needed to achieve close equivalency to a specific Gauss distribution kernel size increases less than linearly with the Gauss kernel size.

    The number of passes and kernel pattern of the four samples used to match specific Gauss filter kernels is, at the moment, based on empirical comparison – a more automatic approach will be explored in future updates to this article.

    The sample provides a graph display used to enable more precise “matching” of different techniques to resemble Gauss filter distribution, and to ensure correctness of distribution.

    Quality

     top down view)
    Input values: 12x12 block of white pixels on black background 
    (Left: middle cross-section along x axis; right: top down view)

    Values after applying a 35x35 Gauss filter
    Values after applying a 35x35 Gauss filter

    Values after applying a 5-pass Kawase filter with 0, 1, 2, 2, 3 kernels - closely (but not perfectly) matching the 35x35 Gauss filter
    Values after applying a 5-pass Kawase filter with 0, 1, 2, 2, 3 kernels - closely (but not perfectly) matching the 35x35 Gauss filter

    Values after applying a 4-pass Kawase filter with 2, 3, 3, 3 kernels - not closely matching… anything, but could be good for bright light streaks or a similar effect
    Values after applying a 4-pass Kawase filter with 2, 3, 3, 3 kernels - not closely matching… anything, but could be good for bright light streaks or a similar effect

     original image; 35x35 Gauss filter; closely matching Kawase filter; mismatched Kawase filter
    From left: original image; 35x35 Gauss filter; closely matching Kawase filter; mismatched Kawase filter

    Performance

    Although better performing in almost all tested cases, the main impact of Kawase blur filter is at bigger kernels and some hardware benefits from it more (Nexus 7 specifically). Also, “bigger” GPUs need bigger working textures for the difference to become obvious.

    Gauss vs Kawase, performance at 1920x1080 (½ by ½ working texture)
    Gauss vs Kawase, performance at 1920x1080 (½ by ½ working texture)
    (Nexus 7 numbers not shown for 127x127 Gauss kernel due to issues with big kernels)

     

    Gauss vs Kawase, performance at 2560x1080 (½ by ½ working texture)
    Gauss vs Kawase, performance at 2560x1080 (½ by ½ working texture)
    (Intel 4th generation Ultrabook GPUs to discrete GPUs)

    The sample measures the difference between drawing the basic scene (screenshot and moving triangles), and drawing the basic scene plus down-sampling to working texture size, applying blur and applying results back to the full resolution frame buffer texture.

    Results show that Kawase blur seems to use 1.5x to 3.0x less computation time than the optimized Gauss blur filter implementation across the wide range of hardware, resolutions and kernel sizes, although it scales particularly well with bigger kernels and bigger working texture sizes, and on lower power GPUs.

    Unfortunately, although the sample covers sizes up to 127x127, I don’t have (as of yet) a deterministic way of generating Kawase kernels to match arbitrary sized Gauss filter – this is one of the few things I plan to cover in the next article.

    Moving averages compute shader version


    Finally, it turns out it is possible to devise a simple, linear time per pixel blur filter ( with O( 1 ) complexity), by applying multiple passes of a “moving averages” box filter. However, due to the high fixed cost this approach seems to only starts reaching the performance of Gauss/Kawase filters on modern GPUs for very large blur kernel sizes, so it might only be applicable in very specific scenarios.

    Still, it’s a cool thing to have in ones algorithm toolbox and could definitely come in handy. The moving averages box filter is explained in very fine detail in Ryg’s excellent articles (http://fgiesen.wordpress.com/2012/07/30/fast-blurs-1/) but here is the short summary:

    • A box filter is an image filter that replaces each pixel’s values with an average of m x n neighboring pixels (convolution filter kernel with all equal normalized values).

     

    3x3 Box filter kernel
    3x3 Box filter kernel

    • 2D box filter can be achieved by doing 2 separable 1D horizontal/vertical passes, in the same way as described for the separable Gauss filter, for O( n ) complexity, however, in addition to that, it is possible to do each of the vertical and horizontal passes using “moving averages” for O( 1) complexity.

    Moving averages basically does one pass over the whole column (or row), iterating over the whole length:

    1. For the first kernel size elements, a sum is created and averages are written into the output.
    2. Then, for the each new element, a value of the element no longer covered by the kernel size is subtracted from the average, and the value to the right is added. Averaged sum (divided by kernel size) is then written to the output.

    The effect of this is that, for sufficiently large array size, computation time does not grow with the kernel size.

    1D moving average algorithm, with kernel size 9
    1D moving average algorithm, with kernel size 9

    GLSL code for a horizontal moving averages Box filter pass:

    vec3 colourSum = imageLoad( uTex0, ivec2( 0, y ) ).xyz * float(cKernelHalfDist);
    for( int x = 0; x <= cKernelHalfDist; x++ )
        colourSum += imageLoad( uTex0, ivec2( x, y ) ).xyz;
    
    for( int x = 0; x < cTexSizeI.z; x++ )
    {
        imageStore( uTex1, ivec2( x, y ), vec4( colourSum * recKernelSize, 1.0 ) );
    
        // move window to the next
        vec3 leftBorder     = imageLoad( uTex0, ivec2( max( x-cKernelHalf, 0 ), y ) ).xyz;
        vec3 rightBorder    = imageLoad( uTex0, ivec2( min( x+ cKernelHalf +1, cTexSizeI.z-1 ), y ) ).xyz;
    
        colourSum -= leftBorder;
        colourSum += rightBorder;
    }
    

    Visual comparison of one and two pass Box filters and the Gauss filter
    Blurring using intermediate lower resolution buffer at approx. 1/6 of the computation cost

     no filter; 1-pass Box filter; 2-pass Box filter
    From left: no filter; 1-pass Box filter; 2-pass Box filter

    The accompanying sample uses a two pass version, as it provides good enough quality at reasonable performance, although the 3 pass one does provide noticeably better results in some cases.

    Performance

    The following graph demonstrates the performance of a 2-pass Box Moving Averages against Gauss and Kawase filters. As expected, the Moving Averages filter has a fairly fixed cost regardless of the kernel size and it starts being more optimal at around 127x127 kernel size (especially on the more memory bound Ultrabook HD4400 GPU).

    Cobmined across various hardware
    Combined across various hardware (will replace this with combined relative performance, makes more sense)

    A few notes:

    • Performance on Windows OpenGL and Android OpenGLES on Bay Trail (Atom Z3775) was near-identical in all cases so the numbers cover both platforms.
    • The Moving Average filter is not supported on Nexus 7 because it lacks Compute Shader support.
    • On tested AMD hardware there was an issue with the multi-pass compute shader, where a call to “glMemoryBarrier(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT)” does not seem to work correctly, requiring a call to “glFinish()” instead, which invalidates correctness of performance numbers, so these were omitted.
    • On tested Nvidia hardware, the performance is consistent but unexpectedly slow, hinting at a non-optimal algorithm implementation (for example, there are big performance variations based on compute shader group dispatch size and I could not find best fit for two different Nvidia GPUs), so these were omitted pending further investigation.

    This also demonstrates how tricky it is to hit the “sweet spot” for a compute shader workload, in order to execute optimally, as it requires vendor-specific (and even vendor GPU generation-specific) tuning.

    Summary


    Performance of the 3 algorithms
    Performance of the 3 algorithms (and the cost of down-sampling and up-sampling to smaller working texture) on the most common 4th Generation Intel Ultrabook CPU on the market

    I hope this article gave you some useful info on:

    • How to potentially make your Gauss blur filter run faster (along with the source code generator).
    • How to write and use a Kawase filter, a good alternative to Gauss from performance perspective for anything but smallest kernels sizes. This holds on hardware ranging from Nexus 7 tablets, across Intel Ultrabooks and to discrete GPUs.
    • That a two (or more) pass Moving Average Box filter will do even better with very large kernel sizes, on platforms that support compute shaders (Intel’s Bay Trail being the first one to do so on Android, with its OpenGL ES3.1 support). However, compute shader approach only makes practical sense in specific scenarios and requires hardware-specific tuning.

    If you have any suggestions, spot any errors or have any other kind of comment, please leave them in a comment section at the bottom of the page. 

    Few additional notes


     

    Memory layout on GPUs and cache friendliness

    1. Doing large kernels per pixel might be worse than doing multi-pass with smaller localized kernels access because of texture cache (and large kernels are wasteful and inefficient).
    2. Due to non-linear, tiled texture memory addressing (see http://www.x.org/wiki/Development/Documentation/HowVideoCardsWork/#index1h3), doing horizontal and vertical compute shader passes has essentially equal performance. This only holds for accessing Texture objects, but not when manually addressing a buffer in a scanline fashion, in which case memory access in the horizontal pass will be much more cache-friendly. In this case, transposing before and after the vertical pass can yield better overall performance.

    Profiling notes

    All profiling (the “Run Benchmark” button in the sample) is done by drawing to the off-screen buffer in the size of the selected scene content (1280x720, 1600x900, 1920x1080 and 2560x1600) and displaying it to 1280x720 viewport, so the numbers are fairly device resolution independent.

    First, the baseline cost is measured by drawing the off-screen content and applying it on screen (1280x720 viewport).

    Then, the workload cost is measured (drawing the off-screen scene, down-sampling, applying filter, up-sampling, drawing to screen)

    The difference between the baseline and the workload is displayed on screen.

    While profiling, this is looped 8 times before drawing GUI and presenting on screen to reduce interference. V-sync is disabled (although this doesn’t seem to work on Nvidia latest driver, so it must be manually disabled in the graphics control panel).

    Things that I would like to cover in an update

     

    • Generic (and non-integer) Kernel size support and fading in/out of the effect:
      The sample provides a generic Gauss kernel generator that works for any n*4-1 kernel size, but not for any size in between. "Kawase blur" comes in a number of presets, but at the moment there is not a generic way to calculate these. Moving Averages implementation is similar to the Gauss one. 
      What I would like to do next is to:
      -    Add support for any, non-integer kernel sizes for Gauss filter.
      -    Either a mathematically correct way of creating Kawase passes for any given Gauss kernel, or a brute force system to pre-generate these presets, along with handling of non-integer kernel sizes.
      -    Implement non-integer support for Moving Averages filter.
      -    Potentially implement a simple DoF / HDR Bloom effect using the Kawase filter for testing purposes.
       
    • More optimal moving average compute shader implementation:
      Need to investigate more optimal memory access patterns and GPU thread scheduling
       
    • A better Gauss filter implementation?
      Any ideas - send them my way (I already received a good one that I'm investigating)! :) 

    Code sample

    The code sample is built using OpenGL for Windows platform and OpenGL ES for Android platform (NDK) and demonstrates Gauss, Kawase and Moving Averages (Compute Shader) blur filters, and provides benchmarking support for each on various kernel sizes and screen resolutions.

     When OpenGL ES 3.1 support is detected (such as on Intel Bay Trail Android tablets), the moving average compute shader path will be enabled.

    Code sample
    "Fast blurs" code sample

    A package with the source code and binaries is attached below.

     

    Icon Image: 

    Attachments: 

    https://software.intel.com/sites/default/files/managed/1a/b7/FastBlurs.zip
  • OpenGL*
  • C/C++
  • Android*
  • Windows*
  • Developers
  • Professors
  • Students
  • Android*
  • Microsoft Windows* (XP, Vista, 7)
  • Microsoft Windows* 8
  • Include in RSS: 

    1

    Intel® System Studio 2015 Support Matrix

    $
    0
    0

    Please email intelsystemstudio@intel.com if you would like additional support for a particular Intel® System Studio 2015 component.


    Intel® C++ Compiler

    Host OS:
    Linux*

    Target OS:
    Yocto Project* 1.2 through 1.5
    Tizen* IVI 2.x through 3.x
    WindRiver Linux* 4.0 through 6.0
    WindRiver Linux* 4.0 and 5.0 Native
    CE Linux* PR35
    Android* 4.1.x through 4.4.x (Android* NDK R9a, R9b, R9c, R9d)

    Target Platform:
    Intel® Quark SoC with Yocto Project* 1.5 or WindRiver Linux* 5.0
    Intel® Atom™ Processor Z5xx, Z6xx, E6xx, Z3xxx, C2xxx, N2xxx, E3xxx with Yocto Project* or WindRiver Linux*
    Intel® E3xxx with Tizen*
    Intel® Atom™ Processor CE4100, CE4200, CE5200, Intel® Puma6 Media Gateway with CE Linux* PR35
    Intel® Core™ Processor except for CE Linux* PR35
    Intel® Xeon™ Processor except for CE Linux* PR35
    Intel® Atom™ Processor Z2xxx and Z3xxx with Android*
    Intel® 4th Generation Core™ ULT Processors with Android*

    Eclipse* Integration:  Yes, go to documentation for Android*


    Intel® C++ Compiler

    Host OS:
    Windows*

    Target OS:
    Tizen* IVI 2.x through 3.x
    WindRiver Linux* 4.0 through 6.0
    Android* 4.1 through 4.4.x (Android* NDK R9a, R9b, R9c, R9d)
    Target Platform:
    Intel® Quark SoC with Yocto Project* 1.5 or WindRiver Linux* 5.0
    Intel® Atom™ Processor Z5xx, Z6xx, E6xx, Z3xxx, C2xxx, N2xxx, E3xxx with Yocto Project* or WindRiver Linux*
    Intel® Core™ Processor
    Intel® Xeon™ Processor
    Intel® Atom™ Processor Z2xxx and Z3xxx with Android*
    Intel® 4th Generation Core™ ULT Processors with Android*

    Eclipse* Integration:  Yes, go to documentation for Android*


    Intel® System Debugger

    Host OS:
    Linux* and Windows*
    (No UEFI and EDK2 debug on Linux* host)

    Target OS:
    Yocto Project* 1.2 through 1.5
    Tizen* IVI 2.x through 3.x
    WindRiver Linux* 4.0 through 6.0
    WindRiver Linux* 4.0 and 5.0 Native
    CE Linux* PR35
    Android* 4.1 through 4.4.x

    Target Platform:
    For flash programming information, email intelsystemstudio@intel.com

    Intel® Quark SoC with Yocto Project* 1.5 or WindRiver Linux* 5.0
    Intel® Atom™ Processor Z5xx, Z6xx, E6xx, Z3xxx, C2xxx, N2xxx, Z2xxx, E3xxx
    Intel® Atom™ Processor CE4100, CE4200, CE5200, Intel® Puma6™ Media Gateway
    Intel® 3rd Generation Core™ Processors on request
    Intel® 4th Generation Core™ Processors
    Intel® 4th Generation Xeon™ Processors

    Eclipse* Integration: Light integration – see Knowledge Base Article on the subject


    Software Visible Event Nexus Technology (SVEN)

    Host OS:
    Linux* and Windows*

    Target OS:
    Yocto Project* 1.2 through 1.5
    Tizen* IVI 2.x through 3.x
    WindRiver Linux* 4.0 through 6.0
    WindRiver Linux* 4.0 and 5.0 Native
    CE Linux* PR35
    Android* 4.1 through 4.4.x

    Target Platform:
    Intel® Quark SoC with Yocto Project* 1.5 or WindRiver Linux* 5.0
    Intel® Atom™ Processor Z5xx, Z6xx, E6xx, Z3xxx, C2xxx, N2xxx, Z2xxx, E3xxx
    Intel® Atom™ Processor CE4100, CE4200, CE5200, Intel® Puma6 Media Gateway
    Intel® Core™ Processors
    Intel® Xeon™ Processor

    Eclipse* Integration:  Yes, for trace viewer


    GNU GDB* Debugger

    Pre-built GDB servers provided for: CE Linux PR35, Tizen IVI, WindRiver Linux 4 through 7, Yocto 1.4 through 1.7 for IA32.

    For Intel64 Pre-built GDB servers available for WindRiver Linux 5.

    Host OS:
    Linux*, Windows*

    Target OS:
    Yocto Project* 1.2 through 1.5
    Tizen* IVI 2.x through 3.x
    WindRiver Linux* 4.0 through 6.0
    WindRiver Linux* 4.0 and 5.0 Native
    CE Linux* PR35
    Android* 4.0.x through 4.4.x

    Target Platform:
    Intel® Quark SoC with Yocto Project* 1.5 or WindRiver Linux* 5.0
    Intel® Atom™ Processor Z5xx, Z6xx, E6xx, Z3xxx, C2xxx, N2xxx, Z2xxx, E3xxx
    Intel® Atom™ Processor CE4100, CE4200, CE5200
    Intel® Puma6 Media Gateway
    Intel® Core™ Processors
    Intel® Xeon™ Processor

    Eclipse* Integration:  Yes


    Intel® VTune™ Amplifier for Systems Sampling Enabling Product (SEP) component

    Host OS:
    Linux*

    Target OS:
    Yocto Project* 1.2 through 1.5
    Tizen* IVI 2.x through 3.x
    WindRiver Linux* 4.0 through 6.0
    WindRiver Linux* 4.0 and 5.0 Native
    CE Linux* PR35

    Target Platform:
    Intel® Atom™ Processor Z5xx, Z6xx, E6xx, Z3xxx, C2xxx, N2xxx, Z2xxx, E3xxx
    Intel® Atom™ Processor CE4100, CE4200, CE5200, Intel® Puma6 Media Gateway
    Intel® Core™ Processors
    Intel® Xeon™ Processors

    Eclipse* Integration:  No


    Intel® Energy Profiler

    Host OS:
    Linux* and Windows*

    Target OS:
    Yocto Project* 1.2 through 1.5
    Tizen* IVI 2.x through 3.x
    WindRiver Linux* 4.0 through 6.0
    WindRiver Linux* 4.0 and 5.0 Native
    CE Linux* PR35

    Target Platform:
    Intel® Atom™ Processor Z5xx, Z6xx, E6xx, Z3xxx, C2xxx, N2xxx, Z2xxx, E3xxx
    Intel® Atom™ Processor CE4100, CE4200, CE5200, Intel® Puma6 Media Gateway
    Intel® Core™ Processors
    Intel® Xeon™ Processors

    Eclipse* Integration:  No


    Intel® Math Kernel Library

    Host OS:
    Linux* and Windows*

    Target OS:
    Yocto Project* 1.2 through 1.5
    Tizen* IVI 2.x through 3.x
    WindRiver Linux* 4.0 through 6.0
    WindRiver Linux* 4.0 and 5.0 Native
    CE Linux* PR35

    Target Platform:
    Intel® Atom™ Processor Z5xx, Z6xx, E6xx, Z3xxx, C2xxx, N2xxx, Z2xxx, E3xxx
    Intel® Atom™ Processor CE4100, CE4200, CE5200, Intel® Puma6 Media Gateway
    Intel® Core™ Processors
    Intel® Xeon™ Processor

    Eclipse* Integration: Yes


    Intel® Integrated Performance Primitives

    Host OS:
    Linux* and Windows*

    Target OS:
    Yocto Project* 1.2 through 1.5
    Tizen* IVI 2.x through 3.x
    WindRiver Linux* 4.0 through 6.0
    WindRiver Linux* 4.0 and 5.0 Native
    CE Linux* PR35
    Android* 4.3 through 4.4.x

    Target Platform:
    Intel® Atom™ Processor Z5xx, Z6xx, E6xx, Z3xxx, C2xxx, N2xxx, Z2xxx, E3xxx
    Intel® Atom™ Processor CE4100, CE4200, CE5200, Intel® Puma6 Media Gateway
    Intel® Core™ Processors
    Intel® Xeon™ Processor

    Eclipse* Integration: Yes


    Intel® System Analyzer

    Host OS:
    Linux* and Windows*

    Target OS:
    Android* 4.3 through 4.4.x

    Target Platform:
    Intel® Core™ Processors
    Intel® Atom™ Processor Z2xxx, Z3xxx

    Eclipse* Integration: No

  • Embedded C++
  • Developers
  • Android*
  • Apple OS X*
  • Linux*
  • Microsoft Windows* (XP, Vista, 7)
  • Microsoft Windows* 8
  • Tizen*
  • Yocto Project
  • Android*
  • Internet of Things
  • Server
  • Tizen*
  • Windows*
  • C/C++
  • Java*
  • Advanced
  • Beginner
  • Intermediate
  • Intel® System Studio
  • Development Tools
  • Embedded
  • Phone
  • Server
  • Tablet
  • URL
  • Getting started
  • Creating Android Tablet Apps for Intel Architecture-Based Devices

    $
    0
    0

    Download PDF

    Intel is seeing a greater number of design wins in the burgeoning Android phone and tablet market, and many developers want to create apps for this market. In this blog I’ll show you how to create a simple app for a Samsung Galaxy Tab 3 10.1 with an Intel® Atom™ processor Z2560 and provide some sample Android tablet code.

    Install Development Tools

    First, make sure you have the latest versions of the following software tools installed:

    • Eclipse* IDE
    • ADT Plugin for Eclipse
    • JDK and JRE
    • Android SDK

    Installing Eclipse* IDE

    It's simple. Go to the Downloads section on the official site: https://www.eclipse.org/downloads and download the Classic version. Then unzip the files into an appropriate folder on your development system.

    Installing the ADT Plugin for Eclipse

    Run Eclipse. In the dialog box, install the plugin via the menu Help → Install new software.

    In the Work with window, type in the plugin’s download address: https://dl-ssl.google.com/android/eclipse/ (If it fails, the plugin can be downloaded and installed manually using this link: http://developer.android.com/sdk/eclipse-adt.html). In the table will appear Developer Tools. Click the box next to Developer Tools and then click Next. After a successful installation, I recommend restarting the Eclipse environment.

    Setting Up the Java*Environment

    If you have not yet installed the Java Development Kit (JDK) and Java Runtime Environment (JRE) , you should install them now. Download and install the JDK and JRE from this Oracle web page.

    Installing the Android SDK

    The last step is to download and install the latest version of the Android SDK. This can be done from this site for Android developers. Then you add the platform and other additional elements of the SDK. I recommend that you add all available elements.

    Now that you’ve installed all the necessary tools, you can create your first application. The next section leads you through a sample tablet app.

    Creating a Tablet App for Android

    Let’s create a sample app for a Samsung Galaxy Tab 3 10.1 with an Intel Atom processor Z2560.

    1. First, run Eclipse and select File | New | Project…, in the list. Select Android | Android Application Project and press the Next button.
    2. On a dialog box called Setup Wizard New Android App, fill in the following text fields with your information:
      • Application name - a descriptive name for the application, like “MyApp.”
      • Project Name - enter the name of the project, like “MyProject.”
      • Package Name - enter a unique name for the package, such as “ru.egorfilimonov.helloworld”.
      • Minimum Required SDK - select the minimum supported platform. In the Target SDK platform, choose a value under which you will write a program. You can leave the default value if you wish.
      • Compile With - the default is the latest version of Android. We do not need to change this.
      • Theme - choose a theme from the list of standard themes for your application or leave it unchanged.
    3. After filling in all the fields, click the Next button.
    4. Leave the Create custom launcher icon box checked, so you can use your own icon for the program.
    5. Leave the Create activity box checked as well.
    6. Do not check the Mark this project as library box, as you are not creating a library.
    7. Leave the Create Project in Workspace box checked so that all your projects will be stored in a special folder: C:\Users\UserName\workspace
    8. When finished with these settings, click the Next button. Here we need to choose the appearance of the application screen. Most applications targeted for Android have a screen called Create Activity that features a Project Wizard offering several templates that can help you build your app:
      • Blank Activity
      • Fullscreen Activity
      • Master / Detail Flow
    9. The Master / Detail Flow template is designed for tablet apps. Choose this template.

    Click the Finish button. We will now create a new project.

    Working with a Project

    The “Hello, World!” program is already built into any new project, so you do not even need to write anything. You just need to start the project and get ready to program! Expand the src folder and the ru.<…>.helloworld subfolder, which is the name of your package, to see the MainActivity.java file. Double-click the file to open it in the Code Editor. The IDE has already generated the minimum code required for the MainActivity.java file. It is even easier to open the file via the toolbar, which is located on the form. Find the button of MainActivity and select Open MainActivity.

    Look at the code:

    package ru.<…>.helloworld;
    
    import android.support.v7.app.ActionBarActivity;
    import android.support.v7.app.ActionBar;
    import android.support.v4.app.Fragment;
    import android.os.Bundle;
    import android.view.LayoutInflater;
    import android.view.Menu;
    import android.view.MenuItem;
    import android.view.View;
    import android.view.ViewGroup;
    import android.os.Build;
    
    public class MainActivity extends ActionBarActivity {
    
    	@ Override
    	protected void onCreate (Bundle savedInstanceState) {
    		super.onCreate (savedInstanceState);
    		setContentView (R.layout.activity_main);
    
    		if (savedInstanceState == null) {
    			getSupportFragmentManager (). beginTransaction ()
    			. Add (R.id.container, new PlaceholderFragment ()). Commit ();
    		}
    	}
    
    	@ Override
    	public boolean onCreateOptionsMenu (Menu menu) {
    
    		// Inflate the menu; this adds items to the action bar if it is present.
    		getMenuInflater (). inflate (R.menu.main, menu);
    		return true;
    	}
    
    	@ Override
    	public boolean onOptionsItemSelected (MenuItem item) {
    		// Handle action bar item clicks here. The action bar will
    		// Automatically handle clicks on the Home / Up button, so long
    		// As you specify a parent activity in AndroidManifest.xml.
    		int id = item.getItemId ();
    		if (id == R.id.action_settings) {
    			return true;
    		}
    		return super.onOptionsItemSelected (item);
    	}
    
    	/**
    	* A placeholder fragment containing a simple view.
    	*/
    	public static class PlaceholderFragment extends Fragment {
    
    		public PlaceholderFragment () {
    		}
    
    		@ Override
    		public View onCreateView (LayoutInflater inflater, ViewGroup container,
    		Bundle savedInstanceState) {
    			View rootView = inflater.inflate (R.layout.fragment_main, container,
    			false);
    			return rootView;
    		}
    	}
    }
    

    This is file where name of class MainActivity coincides with Java file (this rule established language Java). The first line is the name of the package (Package Name). Next, there are lines that import the required classes for the project. If warning icons appear to the left of the class names, read the messages that pop up when your cursor is over them. For example, if you see a yellow triangle with an exclamation mark and the message is that “this class is not used,” you can safely remove the extra lines.

    After that is the announcement of the class that inherits (extends) from the abstract class ActionBarActivity. In the class we see the method onCreate (). It is called when the application creates and displays the markup activity. Let’s examine the method's code.

    Line super.onCreate (savedInstanceState); is the parent class that performs the operations necessary for the activity. You do not need to touch this line; leave it unchanged.

    The second line setContentView (R.layout.activity_main); is of more interest. The setContentView (int) method connects the content of the markup file. In the argument, we specify the file name without the extension from a folder res/layout/. By default, it creates a project file called activity_main.xml.

    Further, there is a fragment of dynamic loading.

    if (savedInstanceState == null) {
    	getSupportFragmentManager (). beginTransaction ()
    	. Add (R.id.container, new PlaceholderFragment ()). Commit ();
    }

    After the onCreate () method, the onCreateOptionsMenu () and onOptionsItemSelected () methods are associated with the handling menu.

    And finally, at the end of an internal static class fragment is the PlaceholderFragment.

    Now that you’ve seen the tools and steps involved in creating Android apps for Intel processor-based tablets, I hope you’ll agree that it’s fun, simple, and interesting. This was a simple introduction, so for more information check out these resources:

    http://developer.android.com/samples/index.html

    http://code.tutsplus.com/tutorials/android-sdk-samples--mobile-20901

    About the Author

    Egor Filimonov works in the Software & Service Group at Intel Corporation. He is a student of Lobachevsky State University in Nizhni Novgorod, Russia, on mechanic and mathematics faculty. His specialty is applied mathematics and informatics. Egor’s main interest is High Performance Computing (HPC) and mobile technologies.

     

    Intel, the Intel logo, and Atom are trademarks of Intel Corporation in the U.S. and/or other countries.
    Copyright © 2014 Intel Corporation. All rights reserved.
    *Other names and brands may be claimed as the property of others.

  • Android
  • Eclipse
  • JDK
  • JRE
  • Developers
  • Android*
  • Android*
  • Java*
  • Beginner
  • Android* Development Tools
  • Development Tools
  • Tablet
  • URL
  • Theme Zone: 

    Android

    UI testing of Mobile Web Applications on Android devices

    $
    0
    0

    Hi,

    I am currently working on Proof of Concept for MonkeyRunner tool, are we able to achieve UI testing of Mobile Web Applications on Android devices? If So, Kindly share related links and videos. If not, Kindly let me know if any other tool can do so.

    Thanks,

    Raju

    El juego gratuito continúa prevaleciendo sobre otros modelos de monetización de aplicaciones

    $
    0
    0

    En un artículo que publicó esta semana Super Data Research, cuyos datos se toman directamente de empresas publicadoras y desarrolladores, y se combinan con los datos de puntos de venta digitales de millones de usuarios de juegos, se incluyó un ranking de los juegos “gratis para jugar” que más recaudaron. En el primer puesto de la lista figuraron CrossFire y League of Legends, de Tencent, que juntos tuvieron una recaudación bruta anual de 1581 millones de dólares estadounidenses. La empresa multimedia Nexon ocupó tres de los diez primeros lugares, con un monto combinado de 800 millones de dólares. Wargaming se llevó 372 millones por World of Tanks (que según se dice tendría su versión para Xbox One). Lineage 1 quedó en la sexta posición con 257 millones de dólares en ventas totales. World of Warcraft, a pesar de haber perdido suscriptores, generó 213 millones (nota: en este informe solo se consideran las ventas por microtransacciones, no por suscripciones). Uno ya viejito pero bueno, Star Wars: The Old Republic, ganó 139 millones de dólares, mientras que Valve hizo suyos los dos últimos casilleros de la lista con Team Fortress 2 y Counter-Strike Online.

    Estos son otros puntos destacados del informe:

    • El mercado estadounidense de ventas digitales de juegos creció un 11 % en 2013 y alcanzó 11.766 millones de dólares en ventas en todos los segmentos, en comparación con los 10.582 de hace un año.
    • El total de ventas del segmento de juegos de redes sociales fue de 1815 millones de dólares en 2013, una caída del 21 % con relación al año anterior.
    • La categoría de juegos que se pueden jugar gratis por Internet recaudó 2893 millones de dólares en 2013, un 45 % más que los 1991 millones de 2012.
    • El total del segmento de juegos pagos fue de 1126 millones en 2013, lo que representa un descenso del 19 % respecto de 2012. Los juegos en línea por suscripción se estabilizaron, según la comparación mensual, y su total fue de $83 millones; la cantidad de jugadores en esta categoría llegó a 5.3 millones en diciembre.
    • El mercado de juegos móviles de los EE. UU. percibió 2893 millones de dólares en 2013, un 28 % más que los 2391 millones de 2012. I
    • El total combinado del segmento DLC (PC + consola) alcanzó los 2870 millones de dólares en 2013, un aumento del 13 % en comparación con los 2523 millones de un año antes.

    El modelo comercial “freemium”

    CrossFire de Tencent es gratis para jugar y tiene un modelo de monetización básico de compras desde la aplicación; sin embargo, está ideado de manera tal que hay que pagar con dinero real hasta por el más ínfimo de los accesorios, lo cual explicaría los asombrosos ingresos que tuvo en 2013. ¿Este modelo recompensa más el gasto que la habilidad? La respuesta es en apariencia obvia, pero parece ser el modelo más eficiente para monetizar. Más de i4u.com:

    “Supuestamente, el juego se adentra en el territorio de ‘pagar para ganar’, ya que con efectivo se pueden conseguir mejores armas, más protección y diferentes ventajas que potencian la capacidad para el combate. Algunos artículos especiales solo se pueden comprar con dinero del mundo real, y parece que si un jugador gasta lo suficiente, tendrá ventaja tanto frente a amigos como enemigos. La mejora de las habilidades es un motivador mucho más eficaz que los meros cambios estéticos, de ahí los enormes ingresos de CrossFire. Va contra el principio fundamental de los juegos gratis para jugar y basados en microtransacciones, el de no permitir que los jugadores paguen por ventajas directas sobre otros, pero sea cual sea la razón, a los usuarios no parece importarles. Con CrossFire, Tencent encontró la gallina de los huevos de oro”.

    El modelo comercial “freemium” funciona, no cabe duda. En 2013 hubo una tendencia creciente hacia este modelo; las aplicaciones que cobran para jugar tienen una porción cada vez más pequeña de los ingresos generales de aplicaciones. Un informe de cierre de año de Distimo deja esta situación en evidencia:

    “El modelo comercial ‘freemium’ (aplicaciones gratuitas con compras desde la aplicación) componen la porción más grande de ingresos de Apple App Store. Nuestro análisis mostró que esta porción incluso se incrementó a lo largo del año: de un 77 % en enero a un 92 % en noviembre, según datos combinados de todo el mundo de la tienda digital de Apple. Los otros modelos comerciales, aplicaciones pagas con o sin compras desde ellas, apenas representaron el 4 % de los ingresos en noviembre de 2013. Y la misma tendencia se observa en Google Play”. – 2013 Year in Review, Distimo.com

    Dominación asiática

    La mayoría de los juegos que figuran en la lista obtienen la mayor parte de sus ganancias en Corea, China y otros países de Asia. Y las compras desde la aplicación dan buenos resultados en estos países; según artículos recientes, se calcula que el sector de los juegos generó en China ingresos por 9700 millones de dólares el año pasado y se espera que esa cifra crezca a 21.700 millones para 2017. Más estadísticas de App Annie sobre el el mercado de juegos asiático:

    • Según el "Informe del mercado de juegos móviles chino 2013" de Niko Partners, en 2012 hubo 192 millones de usuarios de juegos para dispositivos móviles en China. Este año serán 288 millones. En 2014 habrá 390 millones.
    • El segmento de juegos para dispositivos móviles es el que más rápido crece de todo el mercado de juegos chino.
    • Incluso en ciudades pequeñas y pueblos donde no todos tienen teléfono, hay más teléfonos que personas en una relación de 1,25 a 1.
    • Los usuarios de teléfonos móviles dedicaron un 40 % más de tiempo a jugar en sus dispositivos en 2013 que en 2012, y acceden a sus juegos favoritos con una frecuencia un 41 % más alta que en 2012.

    Algo que encontré interesante mientras investigaba para este artículo es que CrossFire, el juego que más recaudó en compras desde la aplicación el año pasado, no es considerado de los mejores por sus gráficos; en realidad, todo lo contrario. ¿Por qué le va tan bien en China y otros países asiáticos? Porque es fácil de descargar por redes rurales que podrían no tener las mismas velocidades y capacidades de procesamiento que otras redes; además, los usuarios de estos países están más acostumbrados que sus pares occidentales a las compras desde las aplicaciones. Las siguientes son algunas estadísticas de International Data Corp que respaldan esta explicación (principalmente para Android):

    • El 44 % de los usuarios de Android en China usan Wi-Fi para acceder a Internet, en especial para ver videos. Un 31 % accede por redes 2G, y un 23 %, por redes 3G.
    • Las descargas de aplicaciones por parte de usuarios de dispositivos Android en China están creciendo exponencialmente; en promedio, descargaron 10,5 aplicaciones por mes en el tercer trimestre de 2013; el año anterior, la cifra era de 8,2 aplicaciones por mes.
    • Un 15 % de los usuarios de Android en China instalan al menos una nueva aplicación al día, en comparación con un 11 % en el tercer trimestre de 2012.
    • El 59 % usa tiendas digitales para descargar aplicaciones, mientras que un 13 % hace búsquedas en tiendas digitales y un 21 % usa su PC para enviar descargas a sus dispositivos Android.

    Será interesante ver cómo continúa esta tendencia en 2014; los especialistas parecen opinar con unanimidad que el mercado asiático no tiene rival en cuanto al desarrollo de aplicaciones se refiere.

    ¿El juego gratuito tiene mejor retención de usuarios? Es muy probable que sí.

    Pensemos en esta situación: hemos descargado un juego que es gratuito para jugar, quizá uno de los que figuran en el informe al que hicimos referencia. Comenzamos a subir de nivel y, cuanto más avanzamos, más tiempo y dinero invertimos en esta aplicación que en un principio era gratuita. Quizá terminemos gastando una cantidad considerable de dinero para llegar a algo de lo que nos sintamos orgullosos. Si dejáramos de usar esta aplicación para jugar con otra, habría que comenzar otra vez desde el principio, ya que obviamente no se puede transferir lo hecho en la otra. Tiene sentido a esta altura continuar con el juego en el que ya estamos invirtiendo. El costo de cambiar a otro juego una vez alcanzado cierto nivel se vuelve prohibitivo y lo que antes era un juego “gratuito” se ha convertido en algo muy diferente

    Por supuesto que esta situación hipotética no se aplica a todos los usuarios. Pero es interesante ver los aspectos psicológicos de los jugadores con relación al juego gratuito. La misma persona que se negaría a desembolsar 50 dólares por un juego, no titubea en pagar 99 centavos para avanzar de nivel en un juego que quizá solo use unas pocas veces. Esto hace menos exigente la barrera de entrada para los desarrolladores; saben que la gente va a estar más dispuesta a pasarse a algo nuevo, lo cual aumenta el potencial de monetización. Es bueno entrar en este circuito económico, como se puede deducir de la cantidad de dinero que están ganando las principales empresas solamente con este modelo.

    La primera dificultad es lograr que los usuarios descarguen el juego. Si se puede hacer que la descarga sea gratuita, ya se habrá puesto un pie en la puerta. Y aquí es donde realmente entra en juego la gran virtud del modelo “freemium”. Ya existen innumerables aplicaciones y los consumidores son recelosos de pagar por un producto cuando pueden encontrar algo similar gratis. Cuando uno piensa en las aplicaciones que todavía exigen un pago por adelantado, viene a la mente el refrán “si no puedes con el enemigo, únete a él”, ya que se espera un aumento aún mayor de popularidad de las aplicaciones gratuitas en los próximos años. Un informe reciente de Gartner parece confirmarlo; predice que las aplicaciones gratuitas constituirán un 94,5 % de todas las descargas para 2017:

    "Estas tiendas de aplicaciones se vuelven cada vez más activas debido a la mayor riqueza de los ecosistemas y a la existencia de comunidades de desarrolladores no solo grandes, sino también muy activas", manifestó Brian Blau, director de investigación de Gartner. "Sin embargo, esperamos que el promedio de descargas mensuales en dispositivos iOS baje de 4,9 en 2013 a 3,9 en 2017, mientras que en los dispositivos Android caerá de 6,2 en 2013 a 5,8 en 2017… Las compras desde las aplicaciones representarán el 17 % de las ventas de las tiendas en 2013, cifra que se elevará a 48 % en 2017. No obstante, se espera que, tal como ocurre con las descargas, las compras desde las aplicaciones aumenten muy rápido en 2013 y 2014, y lentamente durante los años siguientes. Esto se debe a que los dispositivos inteligentes llegarán a más consumidores del mercado masivo que no están tan dispuestos o no tienen tantos medios económicos para hacer este tipo de gastos. De todas maneras, las compras desde las aplicaciones serán un método de monetización fundamental para las tiendas y los desarrolladores de aplicaciones”.

    Las aplicaciones libres serán la norma

    Si se juzga estrictamente a partir de las tendencias actuales y las predicciones del sector, parece que el modelo de monetización “freemium” llegó para quedarse. Con él, todos ganan: por un lado los consumidores, pero especialmente los desarrolladores, porque tienen la posibilidad de que haya una base de usuarios más grande para descargar sus aplicaciones, además de mayor potencial de retención de usuarios. ¿Qué piensa del modelo “freemium”? ¿Es viable a largo plazo o será reemplazado por algún otro? Háganos conocer su opinión en los comentarios.

    Artículos y recursos relacionados:

  • app monetization
  • Android app development
  • mobile app development
  • freemium
  • Icon Image: 

  • Android*
  • Windows*
  • Theme Zone: 

    IDZone

    Include in RSS: 

    1

    Por qué los usuarios desinstalan aplicaciones

    $
    0
    0

    Desarrollar una aplicación es apenas el primer paso de un largo camino. Uno de los problemas más desmoralizadores con los que se enfrentan los desarrolladores es el interés del usuario; básicamente, cómo hacer para que los usuarios instalen aplicaciones y nos las quiten. Es difícil mantener a los usuarios satisfechos después de la instalación inicial, y aún más difícil tener una exposición considerable cuando hay empresas más grandes que ofrecen muchas aplicaciones que tienden a ocupar los primeros puestos de las listas.

    Diferentes tipos de desinstalaciones

    Las desinstalaciones simples no son necesariamente algo malo y tampoco indican que haya algún problema. Aquí nos encontramos con un dilema: ¿es mejor que nuestra aplicación sea ignorada por la mayoría de los usuarios o que parezca tan poco fácil de usar que la desinstalen de inmediato?

    Las aplicaciones que no ofrecen nada útil o exclusivo tienden a ser las que se desinstalan con mayor frecuencia. La gente pasa de una aplicación a otra con una rapidez notable hasta encontrar la que más se adecua a sus necesidades. El interés y la retención son dos cosas muy diferentes, como se puede ver en esta medición de Flurry Analytics, en la cual se usó una muestra de aplicaciones usadas más de 1700 millones de veces por semana:

    Una de las maneras más fáciles de lograr fidelidad es prestar atención a los datos. Los desarrolladores deben aprovechar los datos analíticos de interacción del lado del cliente para hallar qué es lo que impulsa el comportamiento de su base de clientes y hacer mejoras específicas que respondan a lo que buscan los usuarios. Aquellos que estén atentos a los intereses de sus clientes van a cosechar los frutos. También hay varias herramientas (tanto gratuitas como pagas) que monitorizan lo que buscan los usuarios en diferentes tiendas digitales y por la Web.

    Factores que influyen en la desinstalación de aplicaciones

    Cómo reducir la cantidad de desinstalaciones es una pregunta a la que muchos desarrolladores no cesan de buscar la respuesta. Muchas aplicaciones tienen un ciclo de utilidad limitado por su naturaleza, como las relacionadas con el estreno de una película o las que sirven para llevar registros durante el embarazo o celebrar un día festivo. Además, las de funcionalidad limitada, como los juegos “lite” limitados, se desinstalan cuando el usuario domina todos los niveles. Esto no es algo malo en sí. Si la aplicación despierta un interés suficiente, los usuarios descargarán la aplicación siguiente del desarrollador, lo cual creará un ciclo de interés continuo.

    No hay realmente una respuesta única a la pregunta “¿por qué los usuarios desinstalan mi aplicación?”. Pero sí parece haber algunos factores en común que contribuyen a que ello suceda.

    Formularios engorrosos: pedir a los usuarios que acaban de instalar una aplicación que llenen formularios largos y engorrosos perjudica la experiencia del usuario, en especial en dispositivos móviles.

    Pedir una calificación: las aplicaciones que molestan una y otra vez pidiendo una buena calificación terminan por lo general siendo eliminadas; hay que cuidar la frecuencia de estos pedidos para no causar saturación.

    Recopilar datos innecesarios: si una aplicación recoge datos personales sin que tenga una necesidad demostrable de hacerlo (con o sin consentimiento), es más probable que la desinstalen. No hay necesidad de pedir información confidencial que la aplicación no necesite para funcionar bien.

    “Si las aplicaciones pudieran anunciar sus maneras de proceder con la información en el momento en el que usted inicia una relación con ellas y cuando usted inicia una relación conmigo, entonces, por lo menos, usted estaría mejor informado. Este conocimiento hace posible decidir si uno quiere realmente usar la aplicación. Imagínese lo siguiente:

    • Cuando usted agrega un contacto a su smartphone, se le informa cómo todas las aplicaciones de su smartphone usarán esa información.
    • Cuando agrega una nueva aplicación a su perfil de Facebook, le muestra cómo va a usar la aplicación sus grafos sociales (una evaluación de impacto).

    Lo que esto transmite es un deseo de control. Las aplicaciones que intenten respetar el nivel de integridad con que se maneje el usuario proporcionarán una mayor visibilidad y darán más opciones respecto del uso de información sobre relaciones. Las aplicaciones que no actúen igual de bien no brindarán esas opciones y es probable que hagan lo imposible por ocultar cómo usan la información”. - Gartner.com, “Me gustas, pero odio tus aplicaciones”

    Facilidad de uso: si se necesitan más de unos pocos segundos para aprender a usar la aplicación, la mayoría de los usuarios se deshará de ella.

    ¿Es gratuita? Las aplicaciones gratuitas tienen mayor probabilidad de ser desinstaladas, en especial si su utilidad no es clara. Esa probabilidad baja aunque la aplicación cueste apenas 99 centavos de dólar, porque si las desinstalaran, estarían tirando a la basura esa cantidad. En este aspecto hay que lograr un equilibrio, porque las aplicaciones gratuitas pueden generar ganancias con las compras desde la aplicación.

    Errores: las aplicaciones con muchas fallas, que consumen demasiada memoria o que se cuelgan todo el tiempo tienden a durar poco en los dispositivos. No es habitual que los usuarios perdonen estos inconvenientes. Probar repetidas veces la aplicación en varios dispositivos y en diferentes versiones de cada sistema operativo limitará la cantidad de problemas que puedan aparecer. Los usuarios se están volviendo cada vez más sofisticados con relación a lo que buscan:

    “Un estudio que realizó uSamp por Internet determinó que los principales problemas de las aplicaciones eran que se bloqueaban (76 %), fallaban (71 %) o tardaban en responder (59 %); también se mencionó el uso intensivo de la batería (55 %) y el exceso de anuncios comerciales (53 %). Los usuarios afirmaron que las aplicaciones en las cuales más importaba el rendimiento eran las de transacciones bancarias (74 %) y las de mapas (63 %); este último caso se debe sin dudas a lo ocurrido con Apple, que tuvo dificultades con su propio software de mapas en el iOS 6. Casi todos los encuestados (96 %) dijeron que escribirían una reseña negativa si una aplicación fuera deficiente, mientras que un 44 % dijo que la quitarían de inmediato. Otro 38 % dijo que la eliminaría si se bloqueara durante más de 30 segundos y un 32 % y un 21 %, respectivamente, indicaron que hablarían mal de la aplicación a sus amigos o compañeros de trabajo en persona o por Facebook y Twitter. Un considerable 18 % eliminaría una aplicación si se bloqueara durante cinco segundos, pero un 27 % dijo que la conservaría si hubiese pagado por ella. Aquellos que tuvieron experiencias con malas aplicaciones lo que más hicieron es instar a los desarrolladores a resolver el problema (89 %), seguido de pedir el reembolso de lo gastado (65 %) y pedir el número de atención al cliente (49 %)”. - Business Insider, “A los clientes no les gustan las aplicaciones que se bloquean”

    Notificaciones innecesarias: cuando una aplicación molesta a los usuarios, hace que su propósito pase a un segundo plano. Las notificaciones innecesarias que solo aumentan la relación ruido a señal son irritantes. Deben tener una frecuencia tal que no sean invasivas ni demasiado insistentes.

    La buena experiencia del usuario es lo primero que debe ofrecer una buena aplicación. Las más fáciles de usar son también las más exitosas. A juzgar por la cantidad de descargas en las diferentes tiendas (que llegan a miles de millones solo en la de Apple), la gente está dispuesta a probar nuevas aplicaciones. Sin embargo, corresponde a los desarrolladores mirar más allá de la descarga inicial y dilucidar cómo retener a esos clientes, convertirlos en seguidores fieles que continuarán usando la aplicación durante mucho tiempo. Estudiar los datos analíticos de las descargas de aplicaciones (que por lo general se pueden ver desde el panel de información que ofrece la tienda) ayuda los desarrolladores a analizar los perfiles demográficos de la gente interesada en sus aplicaciones, lo cual permite hacer una campaña de marketing más dirigida y es útil para futuras actualizaciones de las aplicaciones.

    Otros artículos y recursos relacionados:

    Para aprender más acerca de las herramientas de Intel para el desarrollador de Android, visita Intel® Developer Zone for Android.

  • app engagement
  • Android apps
  • mobile app development
  • Icon Image: 

  • Android*
  • Windows*
  • Developers
  • Theme Zone: 

    IDZone

    Include in RSS: 

    1

    2D Animation for Android* Series: Comparing and Contrasting Different Ways of Doing the Same Animation

    $
    0
    0

    Part II: View Animation

    Part I of this series showed how to create various property animations on a view. In Part II we will use view animations to accomplish the same thing. Please see Part I of the series for more information on set up.

    Table of Contents

    1. View Animation
      a. View Animation (Non-Set and Set)
      b. View Animation with XML
      c. Custom Animation

    View Animation

    The following ways of creating animation must be done on a view, whether it is the generic view from the Android API or your own custom extended view class. Note that this will change only where the view is drawn on the screen and not where it will actually be located. For example, a button will appear to move across the screen, but the clickable area of the button will not move with it. You can get around this by writing your own custom animation and having it update the properties instead of applying a transformation matrix to the object. View animations also use an implementation of the AnimationListener interface to do callbacks instead of like an AnimationListenerAdapter class used in property animation, which means you have to include all of its methods even if you don’t need them.

    a. View Animation (Non-Set and Set)

    You can either nest your view animations or group them together in a set. This allows you to have one start call for all your simultaneous or chained animations. If you do nest them, you will need to set <animation>.setFillAfter to true, so the view stays where it is at the end of the first animation instead of jumping back to the starting point and then starting the next animation. Note that the implementation we are doing here takes advantage of the fact that we are doing the same animation twice, but in reverse the second time by setting repeat count to one and setting the repeat mode to reverse. We could have nested them together instead, but this way is more concise in our case. You can also use the repeat in reverse logic on some of the property animations explained in part one; we opted not to do this as it might interfere with the techniques we were illustrating there. TranslateAnimation and the other view animations are different in that the values they take in are not absolute values but the amount of change to apply at the start and end of the animation. Hence the first value we have put in is 0 as we want it to stay in place at the start of the animation, and then we want it to move half way to the left at the end of animation so –x/2.

    public void doViewAnimation(){
         TranslateAnimation transTo= new TranslateAnimation(0, -mLittleChef.getX()/2, 0, 0);
         transTo.setRepeatCount(1);
         transTo.setRepeatMode(Animation.REVERSE);
         transTo.setAnimationListener(new Animation.AnimationListener(){
               @Override
               public void onAnimationEnd(Animation animation) {
                    simpleLock=  false;
               }
              @Override
              public void onAnimationStart(Animation animation) {
                   // TODO Auto-generated method stub
    	 }
              @Override
              public void onAnimationRepeat(Animation animation) {
                  // TODO Auto-generated method stub
               }
     });
         transTo.setInterpolator(new LinearInterpolator());
         transTo.setDuration(mShortAnimationDuration/2);
         mLittleChef.startAnimation(transTo);
    }
    And the view animation set method:

    
    public void doViewAnimationSet(){
         TranslateAnimation transTo= new TranslateAnimation(0, -mLittleChef.getX()/2, 0, 0);
         TranslateAnimation transBack= new TranslateAnimation(0, mLittleChef.getX()/2, 0, 0);
         transTo.setDuration(mShortAnimationDuration/2);
         transBack.setDuration(mShortAnimationDuration/2);
         transTo.setStartOffset(0);
         transBack.setStartOffset(transTo.getDuration());
         AnimationSet transSet= new AnimationSet(true);
         transSet.setInterpolator(new LinearInterpolator());
         transSet.addAnimation(transTo);
         transSet.addAnimation(transBack);
         transSet.setAnimationListener(new AnimationListener(){
              @Override
              public void onAnimationEnd(Animation animation) {
                   simpleLock= false;
              }
    
              @Override
              public void onAnimationStart(Animation animation) {
                   //  TODO Auto-generated method stub
               }
    
              @Override
              public void onAnimationRepeat(Animation animation) {
                   //  TODO Auto-generated method stub
              }
         });
         mLittleChef.startAnimation(transSet);
         //another way to start your set animation:
         //set.setTarget(mLittleChef);
        //set.start();
         }
    

    b. View Animation with XML

    You can also set your animation parameters in an XML file in the res/anim folder. Again, this has similar disadvantages as object animation with XML explained in Part I of the series in that the values are static, making it hard to compensate for different screen sizes. However, for a translation animation, we are choosing the “toXDelta” instead and combining it with being able to use values that end in % (percentage relative to itself) or %p (percentage relative to its parent). This makes it more manageable.

    public void doViewAnimationXML(){
         Animation trans = AnimationUtils.loadAnimation(getActivity(), R.anim.view_animation);
         trans.setRepeatCount(1);
         trans.setRepeatMode(Animation.REVERSE);
         trans.setAnimationListener(new AnimationListener(){
              @Override
              public void onAnimationEnd(Animation animation) {
                   simpleLock= false;
              }
    
              @Override
              public void onAnimationRepeat(Animation animation) {
                   // TODO Auto-generated method stub
              }
    
              @Override
              public void onAnimationStart(Animation animation) {
                   // TODO Auto-generated method stub
              }
         });
         mLittleChef.startAnimation(trans);
    }
    

    The view_animation.xml in the res/anim-xhdpi:

    <?xml version="1.0" encoding="utf-8"?><translate xmlns:android="http://schemas.android.com/apk/res/android"
         android:duration="2000"
         android:fromXDelta="0"
         android:toXDelta="-15%p"
         android:interpolator="@android:anim/linear_interpolator"
    />

    c. Custom View Animation

    As mentioned in the view animation overview, here is how you would write your own custom animation to move your actual view and not just where it is drawn. We achieve this by overriding the applyTransformation method and using setX to update with interpolated the value.

    public void doCustomAnimation(){
         final Float startingPoint= mLittleChef.getX();
         Animation animation = new Animation()
              {
              @Override
              protected void applyTransformation(float interpolatedTime, Transformation t) {
                   mLittleChef.setX(startingPoint - (int)(startingPoint/2 * interpolatedTime));
    	          }
    
          };
    
         animation.setAnimationListener(new AnimationListener(){
               @Override
               public void onAnimationEnd(Animation animation) {
                   simpleLock= false;
               }
              @Override
              public void  onAnimationRepeat(Animation animation) {
                   // TODO Auto-generated method stub
              }
              @Override
              public void onAnimationStart(Animation animation) {
                   // TODO Auto-generated method stub
    
    	  });
    
              animation.setInterpolator(new LinearInterpolator());
              animation.setRepeatCount(1);
              animation.setRepeatMode(Animation.REVERSE);
              animation.setDuration(mShortAnimationDuration/2);
              mLittleChef.startAnimation(animation);
    }
    

    Summary

    View animations can give you the capability to animate the transformation of different properties of the view. You can define them individually, in a set, or separately in an XML file. Next up in this blog series are drawables and canvas.

    References

    http://developer.android.com/guide/topics/graphics/index.html

    Part I on Property Animations

    https://software.intel.com/en-us/articles/2d-animation-for-android-series-comparing-and-contrasting-different-ways-of-doing-the-same

    About the Author

    Whitney Foster is a software engineer at Intel in the Software Solutions Group working on scale enabling projects for Android applications.

    *Other names and brands may be claimed as the property of others.
    **This sample source code is released under the Intel Sample Source Code License Agreement

  • Android
  • animation
  • View Animation
  • Developers
  • Android*
  • Android*
  • URL
  • Theme Zone: 

    Android

    Getting Started with Intel® Integrated Native Developer Experience

    $
    0
    0

    Intel® Integrated Native Developer Experience (Intel® INDE) is a powerful cross-platform framework for creating applications for Android* and Windows* devices. Intel INDE can be integrated into popular IDEs and provides a complete and consistent set of C++/Java* tools, libraries, and samples for environment setup, code creation, compilation, debugging, and analysis for apps on Intel® architecture-based devices,and select capabilities on ARM*-based Android devices.

    Intel INDE helps you set up and maintain the components you need for every step in the development process, allowing you to selectively choose libraries and tools to differentiate and optimize your app. It alerts you when new versions of tools and technology are available and allows you to install them with a click of a button.

    Intel INDE can be downloaded here. This product is most useful for those who currently develop or plan to develop Android native code and/or video apps.

    Some of the major development tools Intel INDE provides are:

    • Intel INDE Media Pack
    • Intel® C++ Compiler for Android
    • Intel® Threading Building Blocks (Intel® TBB)
    • Compute Code Builder beta
    • Intel® Graphics Performance Analyzers (Intel® GPA)

    Intel INDE’s main window looks like this:

    On this screen you can chose the components you want to download and install. The Environment Setup and Media components include:

    • Android Studio
    • Android SDK
    • Eclipse* 4.3
    • Android NDK r9d
    • Android Design elements
    • Intel® Hardware Accelerated Execution Manager
    • vs-android* for Visual Studio*
    • Apache Ant*
    • Intel INDE Plugins for Eclipse
    • Intel INDE Plugins for Visual Studio 2012 and 2013 (Express Edition not supported)

    Users can choose one of three popular IDEs: Eclipse, Android Studio, or Visual Studio. I installed Eclipse because it is my favorite IDE.

    Media

    Intel INDE Media Pack is included for video applications. Complete information for it can be found here. After installing Intel INDE Media Pack, you can find sample code here: <path_to_media_pack>/samples/

    In the root of this directory is the samples.apk, which is the application with all samples. Install this application to your device with the command:

    $ adb install <path_to_media_pack>/samples/samples.apk

    On the device will appear this icon:

    Run this application. You will see the main window listing the samples that come with the Media Pack:

    One sample is camera capturing with sepia effect, which looks like this:

    All source code is in the <path_to_media_pack>/samples/apps/ and <path_to_media_pack>/samples/effects/ directories. In these directories you can find how the code works, and you can use any effects or applications that interest you.

    Intel® C++ Compiler for Android

    The Intel C++ Compiler that optimizes code for Intel architecture is now available for Android. This tool is great for applications with complex calculations that can benefit from optimization. According to performance tests, simply recompiling native code using the Intel C + + Compiler can give up to 30% performance increase.

    This compiler has a minimal cost (less than $100) but is currently included in Intel INDE for free. So, it makes sense to download and give it a try. After registration you will be given a product key for 12 months.

    Intel® Threading Building Blocks

    Intel TBB is a cross-platform library of templates for creating parallel programs. It completely abstracts the work of creating synchronization streams of data, hiding the details of the architecture and allowing you to work at a higher level of abstraction. It works on all architectures; the only requirement is Android 4.3 and above.

    An example of using Intel TBB can be found here.

    Compute Code Builder

    The Compute Code Builder (also known as the Code Builder) is the development platform for compute APIs and programmable graphics. The Code Builder provides capabilities for creating, building, debugging, and analyzing Windows and Android applications accelerated with OpenCL™ and RenderScript technologies. This development tool can be used in a standalone environment or be integrated into Microsoft Visual Studio and Eclipse IDEs. You can find detailed information here.

    Intel® Graphics Performance Analyzers (Intel® GPA)

    Intel GPA provides the following tools for analyzing different factors that influence performance and energy consumption of mobile applications:

    Intel GPA System Analyzer displays various performance metrics for the OpenGL ES* API, CPU, and GPU and makes it possible, without changing the code, to experiment with different rendering parameters and see how they affect performance. In addition, the tool allows you to collect data that can be analyzed in more detail. By running the data analysis on the host, not on the Android device, you can almost completely eliminate the influence of Intel GPA System Analyzer on device performance.

    Intel GPA Frame Analyzer provides detailed information about the process of constructing each frame on the screen. It allows developers to see how specific drawing functions affect construction of the frame and performance and provides the opportunity to experiment with rendering without making any changes to the application. For example, you can experiment with shaders directly with the built-in editor without changing the code. All changes are immediately visible in the preview and on the connected Android device.

    Intel GPA Platform Analyzer allows you to monitor the state of the mobile platform and display the load of the GPU and CPU for each process to see which call leads to performance degradation.

    Summary

    As you can see, Intel INDE includes many interesting tools that Android developers will find useful, especially those who are or plan to develop native code or video applications.

    Related Articles and Resources

    About the Author

    Egor Churaev is from Nizhniy Novgorod, Russia. He is a software intern in the Developer Relations Division at Intel .

  • Intel INDE
  • INDE
  • Intel TBB
  • tbb
  • Intel GPA
  • GPA
  • Compute Code Builder
  • Developers
  • Android*
  • Android*
  • Beginner
  • Intel® Integrated Native Developer Experience (INDE)
  • Intel® C++ Compiler
  • Intel® Threading Building Blocks
  • Intel® Graphics Performance Analyzers
  • Development Tools
  • URL
  • Opciones de publicación de aplicaciones Android* nativas para la Arquitectura Intel® (x86)

    $
    0
    0

    Introducción

    En la versión 2.3.7 de Android, Intel y Google anunciaron que trabajarían para que futuras versiones de Android ejecutaran de manera optimizada aplicaciones nativas en x86 (arquitectura Intel®).

    Pero publicar y empaquetar aplicaciones basadas en el NDK de Android es importante para aquellos desarrolladores que deseen ofrecer un mejor rendimiento y quieran que el usuario tenga una mejor experiencia en cada arquitectura. En este artículo se presentan varias opciones para empaquetar aplicaciones basadas en el NDK de Android. Para ello, se analizarán algunas aplicaciones de ejemplo específicas escogidas de Google Play. Usted puede elegir la opción que más se adecue a su aplicación.

    Opciones de publicación de aplicaciones basadas en el NDK de Android

    Tabla 1. Opciones de publicación de aplicaciones basadas en el NDK de Android

    Como se muestra en la Tabla 1, por lo general son cuatro las opciones de publicación de aplicaciones basadas en el NDK de Android. Están marcadas con dos colores. En verde figuran “Single APK” (Un APK) y “Multiple APKs” (Múltiples APK), que son las opciones básicas en Google Play. En realidad, con estas dos opciones se pueden abarcar la totalidad de las publicaciones. Pero como todos saben, Android es un sistema operativo muy abierto y flexible. Hay algunas opciones especiales marcadas en amarillo: “Separate APK” (APK separados) y “Tricky APK” (APK astuto). Ninguna de estas dos es una opción oficial de Google Play.

    En primer lugar, queremos explicar cómo analizar cada opción desde la perspectiva de ofrecer mayor compatibilidad con x86. En las secciones siguientes, detallaremos las “Ventajas”, las “Desventajas”, los “Posibles riesgos” y “Cómo evitar riesgos”, de manera específica para x86.

    Los “Posibles riesgos” son situaciones que podrían ocurrir si el desarrollador adopta esta opción. Se basan en casos reales. También explicaremos cómo evitar esos posibles riesgos en su aplicación.

    Un APK

    Tabla 2. Características para “Un APK”

    TipoDetalle
    Ventajas1. Siempre es compatible con la versión más reciente de x86.
    2. Se encuentra habitualmente en las tiendas de aplicaciones.
    DesventajasEl APK tiene gran tamaño y por eso ocupa mucha memoria.
    Posibles riesgosPodría perder el archivo de biblioteca en /lib/x86 cuando la aplicación se integra a un componente que no es compatible con x86.
    Cómo evitar los riesgosTanto los desarrolladores como las tiendas de aplicaciones deben validar la aplicación en dispositivos x86 antes de presentarla al público.

    Google recomienda a los desarrolladores crear y publicar aplicaciones de un APK que sean compatibles con tantas configuraciones de dispositivos como sea posible. Sin dudas, la opción de un APK es la mejor y la más sencilla para la compatibilidad con x86 en la última versión, y es la opción más común en las tiendas de aplicaciones. Pero el binario resulta más grande.

    Un riesgo posible es que la aplicación pierda los archivos de biblioteca cuando se integra a un nuevo componente, posiblemente de un tercero, que no sea compatible con x86. En este caso, la aplicación fallará cuando se la inicie y el sistema informará el error de que no se puede encontrar una biblioteca. Para evitar este riesgo, tanto los desarrolladores como las tiendas de aplicaciones deben validar las aplicaciones en dispositivos basados en la Arquitectura Intel antes de presentarlas al público.

    La aplicación de ejemplo es Sina Weibo, que empaqueta todos los archivos de bibliotecas nativas juntos, como se muestra en la siguiente captura de pantalla.

     



    Figura 1. Bibliotecas de NDK de Sina Weibo

     

    La opción de un único APK es muy adecuada para aplicaciones con NDK de poco tamaño, como Sina Weibo. El tamaño total de los cuatro archivos que componen la biblioteca x86 es de solo 235 KB, lo cual es insignificante en comparación con los 20 archivos del APK, que tienen un tamaño total de 809 KB antes de ser comprimidos.



    Figura 2. Tamaño de las bibliotecas x86 de Sina Weibo

    Múltiples APK

    Tabla 3. Características para “Múltiples APK”

    TipoDetalle
    Ventajas1. Menor tamaño del APK.
    2. Siempre es compatible con x86.
    3. Se encuentra habitualmente en las tiendas de aplicaciones.
    DesventajasGoogle Play recién comenzó a admitir esta modalidad recientemente.
    Posibles riesgosLa tienda de aplicaciones de un tercero podría enviar un APK basado en x86 a un teléfono ARM y eso lo haría fallar.
    Cómo evitar los riesgosLa aplicación debería hacer una comprobación de CPU antes de cargar bibliotecas nativas.

    La opción de múltiples APK permite a los desarrolladores publicar diferentes APK para la aplicación, cada uno dirigido a una configuración de dispositivo específica, en especial arquitecturas de CPU. Cada APK debe tener el mismo nombre de paquete, pero puede ser una versión independiente y tener tamaños de archivo distintos.

    La siguiente es una captura de pantalla de Chrome* para Android tomada de Google Play. Podemos ver que el tamaño y la versión varían según el dispositivo.



    Figura 3. Chrome* para Android* en Google Play

    La opción de Múltiples APK tiene muchas ventajas. El tamaño del archivo APK que se descarga al dispositivo es menor que en el caso de un solo APK, lo cual hacer ahorrar tiempo a los usuarios y reduce el tráfico de red. Los usuarios siempre pueden recibir la versión nativa x86. Y resulta fácil para los usuarios encontrar el APK para x86, porque cada APK comparte el mismo listado de aplicaciones en Google Play. Parece ser una solución perfecta. Sin embargo, sólo es útil para Google Play; la mayoría de las tiendas de aplicaciones de terceros no admiten esta opción.

    El riesgo posible es que una tienda de terceros envíe incorrectamente el APK x86 a un teléfono ARM porque lo considere una versión actualizada de ARM. La razón es que el código de versión del APK para x86 es mayor que el del APK para ARM (para conocer más detalles sobre la regla de códigos de versión, lea: /es-es/articles/google-play-supports-cpu-architecture-filtering-for-multiple-apk). Cuando el usuario inicie la aplicación, se producirá un error.

    La mejor manera de evitar este riesgo es que los desarrolladores agreguen a sus aplicaciones la funcionalidad de comprobación de CPU previa a la carga de la biblioteca nativa. Si la arquitectura de la CPU del dispositivo de destino no coincide con la correspondiente del APK, aparecerá un cuadro de mensaje que notificará a los usuarios que deben descargar la versión apropiada.

    La mejor solución sería que todas las tiendas de aplicaciones admitieran múltiples APK. Entonces todo funcionaría como debe.

    APK separados

    Tabla 4. Características para “APK separados”

    TipoDetalle
    Ventajas1. Menor tamaño de APK que en la opción de un solo APK
    2. Buena opción para los desarrolladores porque no todas las tiendas admiten múltiples APK.
    Desventajas1. La versión para x86 es difícil de hallar en las tiendas de aplicaciones.
    2. La gran cantidad de versiones puede confundir a los usuarios.
    Posibles riesgosLos usuarios con dispositivos x86 podrían instalar la versión para ARM.
    Cómo evitar los riesgosLa aplicación agrega comprobación de CPU antes de cargar bibliotecas nativas y guía a los usuarios para que instalen la versión correcta.

    La diferencia más importante entre APK separados y múltiples es el nombre del paquete. Presentamos una aplicación de ejemplo, UC Browser. Podemos ver el sufijo “x86” en el nombre del paquete de UC Browser(X86). Y el sistema Android las considera dos aplicaciones distintas.



    Figura 4. Nombre del paquete de UC Browser

    A los desarrolladores les gusta esta opción porque no necesitan mantener la rama x86 para cada versión de la aplicación. Como la internet móvil cambia rápidamente, los desarrolladores tienen que actualizar sus aplicaciones para dispositivos móviles con mucha frecuencia para mantener el ritmo de las tendencias, pero los recursos de ingeniería de los desarrolladores son limitados. Con la opción de APK separados, se transige para posibilitar a los desarrolladores admitir más arquitecturas con un esfuerzo mínimo. La desventaja es que la versión x86 es difícil de hallar porque muy pocas veces se descarga como aplicación nueva.

    El posible riesgo es que los usuarios que todavía no conocen la diferencia entre x86 y ARM instalen la versión para ARM. Si la aplicación agrega comprobación de CPU previa a la carga de la biblioteca nativa, evitará este riesgo y guiará a los usuarios hacia la descarga de la versión correcta.

    Esta solución de APK separados es temporaria, no a largo plazo, y desaparecerá cuando más tiendas de aplicaciones admitan múltiples APK.

    APK astuto

    Tabla 5. Características para “APK astuto”

    TipoDetalle
    Ventajas1. Menor tamaño de APK que en la opción de un solo APK
    2. Mejor rendimiento en cada dispositivo según CPU.
    DesventajasDos pasos de instalación.
    Posibles riesgosN/D
    Cómo evitar los riesgosN/D

    Esta es una opción especial. La idea básica es descargar la biblioteca nativa en dos pasos. Se puede pensar en esta opción como un mecanismo de actualización controlado por la aplicación misma.

    MoboPlayer es un ejemplo de aplicación que usa esta solución. Hay más información en la siguiente captura de pantalla.

     



    Figura 3. Instalación en dos pasos de las bibliotecas del NDK de MoboPlayer

     

    MoboPlayer es un reproductor multimedia Android basado en el proyecto de código fuente abierto FFMPEG. Tiene un solo APK. Para comenzar, el usuario se limita a descargar la aplicación sin tener que descargar incómodos archivos de bibliotecas del NDK. Cuando el usuario ejecuta por primera vez la aplicación, esta comprueba el tipo de CPU y luego guía al usuario a la descarga de los binarios optimizados para la arquitectura de CPU correspondiente, de modo que el usuario pueda obtener el máximo rendimiento.

    Resumen

    Existen varias soluciones para empaquetar y publicar aplicaciones basadas en el NDK de Android. Los desarrolladores deben conocer a fondo sus aplicaciones, en especial lo relativo al código nativo. ¿Cuál es su prioridad? ¿Optimizar el rendimiento y el consumo de energía? ¿El tamaño del APK? ¿La compatibilidad con varias arquitecturas de CPU? etc. A la vez, deben evitar el posible riesgo de descargar un APK erróneo, y para ello deben agregar en el código la comprobación de CPU, lo cual garantizará que se descargue la biblioteca nativa correcta. También hay que incluir un control de excepciones y ayuda para el usuario por si se produce una discordancia de APK. El objetivo final es que la experiencia del usuario sea la mejor en todas las arquitecturas de CPU.

    Enlaces y recursos relacionados

    Si desea conocer más acerca de las herramientas de Intel dedicadas a los desarrolladores para Android, visite la Zona para desarrolladores Intel® para Android.

    Enlaces de consulta

    https://software.intel.com/es-es/android

    http://developer.android.com/google/play/publishing/multiple-apks.html

    https://software.intel.com/es-es/articles/google-play-supports-cpu-architecture-filtering-for-multiple-apk

    https://play.google.com/store/apps/details?id=com.sina.weibo

    https://play.google.com/store/apps/details?id=com.android.chrome

    https://play.google.com/store/apps/details?id=com.UCMobile.intl

    https://play.google.com/store/apps/details?id=com.UCMobile.intl.x86

    https://play.google.com/store/apps/details?id=com.clov4r.android.nil

    http://www.moboplayer.com/moboplayer_en.html

    Copyright © 2013 Intel Corporation. Todos los derechos reservados.

    *Es posible que la propiedad de otros nombres y marcas corresponda a terceros.

  • Developers
  • Android*
  • Android*
  • URL
  • Theme Zone: 

    Android

    Ventajas y desventajas de las herramientas HTML5 de desarrollo de aplicaciones móviles Android* multiplataforma en dispositivos basados en procesadores Intel®

    $
    0
    0

    El éxito de las aplicaciones para dispositivos móviles depende de llegar al público de destino independientemente del dispositivo que usen. Y las herramientas para desarrollar aplicaciones móviles multiplataforma ayudan a los desarrolladores a lograr precisamente eso. Un cliente típico podría usar un smartphone Android para acceder a la Internet mientras se desplaza, una PC con Windows* en el trabajo o un iPad* de Apple en una cafetería.

    En lugar de usar tecnologías complejas, como Objective-C*, Xcode* o API de iOS* para Mac*, iPhone* e iPad; API de Windows, Visual Studio* y C# para Windows PC; y Android APIs, Java* y Eclipse* para smartphones Android, es mucho más fácil y eficaz usar herramientas de desarrollo HTML5 para aplicaciones móviles multiplataforma. La clave es que la aplicación tenga las funcionalidades adecuadas para que la experiencia del usuario sea perfecta. En segundo lugar, la aplicación debe tener la capacidad intrínseca de funcionar en los nuevos dispositivos que se suman continuamente al mercado.

    HTML5, que es un lenguaje de marcado, tiene varias funcionalidades que le permiten ejecutarse en dispositivos diseñados específicamente para que consuman menos electricidad. Por ejemplo, las laptops, los smartphones y las tabletas tienen procesadores que consumen considerablemente menos energía que los equipos de escritorio. Es el lenguaje de marcado preferido en la actualidad para estructurar y presentar contenido en la Internet. Strategy Analytics predijo que para fines de 2013 se usarán en todo el mundo más de mil millones de dispositivos compatibles con HTML5. Este lenguaje se puede usar en el desarrollo de páginas web interactivas para múltiples plataformas y navegadores. Por lo tanto, las herramientas de desarrollo de aplicaciones móviles multiplataforma basadas en HTML5 son atractivas para los desarrolladores que dirigen sus creaciones a los usuarios de dispositivos móviles.

    Ventajas y desventajas de las herramientas de desarrollo de aplicaciones móviles multiplataforma HTML5

    Ventajas:

    Escribir código HTML5 es relativamente fácil de aprender en comparación con la mayoría de las tecnologías mencionadas arriba, y a eso se suma la facilidad de uso. Las empresas ahorran dinero si escriben aplicaciones que funcionan en todos los sistemas operativos en lugar de tener que modificarlas para cada uno. Además, se puede usar el código como referencia para proyectos basados exclusivamente en Android, Windows o iOS.

    Otras ventajas son:

    • Permite desarrollar aplicaciones que se adaptan fácilmente a distintas resoluciones, tamaños de pantallas, relaciones de aspecto y orientaciones.
    • Permite potenciar las funcionalidades avanzadas, tales como el GPS, la cámara y el acelerómetro, en dispositivos modernos y brindar una experiencia de usuario adaptada al contexto en una amplia variedad de dispositivos, incluidos los smartphones y las tabletas electrónicas.
    • Las aplicaciones se pueden implementar como aplicaciones web locales y también se pueden ver en los navegadores.
    • Las aplicaciones móviles pueden usar los mismos canales de monetización y distribución que las aplicaciones nativas.
    • Las aplicaciones no están restringidas por los marcos de las ventanas de los navegadores y se pueden ejecutar en modo de pantalla completa.
    • Los usuarios tienen el control completo de los dispositivos y el uso del espacio de la pantalla.
    • El código centralizado se puede modificar para que se interconecte con varios dispositivos.
    • JavaScript*, HTML e CSS son la columna vertebral de la Internet y las aplicaciones web; por lo tanto, la migración de herramientas de desarrollo a dispositivos móviles es más sencilla.
    • Escribir una única vez código de integración permite a las aplicaciones móviles funcionar de manera similar en todas las plataformas, independientemente del dispositivo.

    Desventajas:

    Siempre que se produce un cambio o se agrega una característica en iOS, Android, o Windows, la herramienta de desarrollo tiene que reflejar o tener en cuenta el cambio y hacer los ajustes necesarios en el código. Esto significa que las herramientas de desarrollo de aplicaciones móviles multiplataforma siempre irán detrás de los SDK oficiales.

    Otras posibles desventajas son:

    • A veces, lleva tiempo tener listas las aplicaciones móviles debido a que los desarrolladores tienen que escribir código para cada plataforma.
    • Los desarrolladores trabajan en lenguajes que no son nativos para las plataformas; por eso, la eficacia del código depende del motor de traducción. Sucede a menudo que las técnicas de codificación son ineficientes o que el código es redundante.
    • La diferencia de tiempos de ejecución de las plataformas a menudo causa complicaciones en el desarrollo de aplicaciones móviles multiplataforma.
    • El estándar HTML5 evolucionó en un período relativamente corto y ello produjo discrepancias en la implementación de atributos CSS, etiquetas HTML y API de JavaScript. A veces, estas características se comportan de manera diferente en plataformas distintas. Sin embargo, hay herramientas disponibles para resolver estas discrepancias.

    Estas son algunas de las ventajas y desventajas de las herramientas de desarrollo de aplicaciones móviles multiplataforma basadas en HTML5.

    Es evidente que las ventajas superan con amplitud a las desventajas. HTML5 continuará siendo “la” tendencia en el mundo del desarrollo de aplicaciones. Con esto en mente, Intel ha lanzado un Entorno de Desarrollo HTML5 con el fin de ayudar a los desarrolladores a crear aplicaciones móviles fabulosas para todos los dispositivos de destino, en especial los dispositivos basados en procesadores Intel® que funcionan con Android.

    Ventajas y desventajas de las herramientas HTML5 para desarrollar aplicaciones móviles multiplataforma Android dirigidas a dispositivos basados en procesadores Intel

    Con respecto a los dispositivos basados en procesadores Intel con sistema operativo Android, el entorno de desarrollo multiplataforma HTML5 ofrece todas las ventajas mencionadas más arriba, pero hay varias desventajas importantes para señalar.

    Desventajas:

    • La herramienta HTML5 de desarrollo de aplicaciones móviles multiplataforma sigue el modelo de una misma solución para todos los casos. Después de cierto tiempo, los usuarios necesitan cambios, y cuando esto ocurre, la solución óptima sería desarrollar aplicaciones nativas puras que deriven en una excelente experiencia del usuario y gran fidelidad al dispositivo. Esto solo es posible con una plataforma nativa.
    • No es posible obtener aplicaciones que sean las mejores en su género con estas herramientas de desarrollo multiplataforma. Las aplicaciones que se desarrollan con estas herramientas son en esencia sitios web personalizados que se ven y sienten como aplicaciones hechas a medida.

    Incluso con las limitaciones señaladas arriba, las herramientas HTML5 para aplicaciones móviles multiplataforma Android dirigidas a dispositivos con procesadores Intel ayudan a los desarrolladores a adaptarse a este nuevo enfoque multiplataforma de modo tal que puedan implementar sus aplicaciones y juegos en casi todas las plataformas informáticas modernas. Por esta razón, sin duda vale la pena probar estas herramientas.

    HTML5 es una tendencia a futuro en el mundo del desarrollo de aplicaciones. Intel cree que es importante ayudar a los desarrolladores experimentados a hacer la transición a este enfoque multiplataforma y a los desarrolladores nuevos a ponerse rápidamente en ritmo con esta táctica que tanto entusiasmo despierta, para que así puedan desarrollar sus aplicaciones y juegos en casi todas las plataformas informáticas modernas. En las páginas Intel HTML5 e Intel Android podrá obtener más recursos para sus proyectos. Intel y el logotipo de Intel son marcas registradas de Intel Corporation en los EE. UU. y otros países.

    Copyright © 2013 Intel Corporation. Todos los derechos reservados.

    *Es posible que la propiedad de otros nombres y marcas corresponda a terceros.

  • Developers
  • Android*
  • Android*
  • HTML5
  • URL
  • Theme Zone: 

    Android

    Installing Intel MDK on Dell Venue8, error in process

    Viewing all 523 articles
    Browse latest View live