Archive

Posts Tagged ‘ndk’

Collabora and Fluendo Release GStreamer SDK for Android

December 3rd, 2012 No comments

Collabora and Fluendo have recently announced the availability of GStreamer’s Software Development Kit for Android, which allows developers to create multimedia playback applications for Android smartphones and tablets using Gstreamer and the Android NDK..

The GStreamer SDK for Android targets Android 2.3.1 Gingerbread or higher (API Level 9 or greater). However, due to some of the restrictions of previous versions of Android, some features such as hardware acceleration are only available on Android 4.1 Jelly Bean (API Level 16 up).

Normally, you’d need the GStreamer SDK which can be installed on Linux (Ubuntu, Fedora and Debian), Windows (XP/Vista/7/8) and Mac OS X (10.6 to 10.8). But for developing Android applications using Gstreamer, you don’t. What you do need first is a typical Android development environment with the latest Android SDK, the latest Android NDK, and optionally, but recommended, the Eclipse IDE with Android ADT and NDK plugins. Once everything is setup correctly, and you have made sure you can build NDK apps, you can download and install GStreamer SDK for Android (ARM only).

I’ve tried the instructions in Eclipse 4.2.1 with Android NDK 8b and Android Tools SDK 21 following the the instructions to install GStreamer for Android development. In Eclipse IDE, make sure the Android SDK and NDK paths are correctly setup (Window->Preferences->Android->NDK), and set  GSTREAMER_SDK_ROOT_ANDROID to the folder where you unzipped the SDK, by going to Window->Preferences->C/C++->Build->Build Variables and defining GSTREAMER_SDK_ROOT_ANDROID.

There are 5 tutorials provided in the GStreamer SDK for Android:

  • Tutorial 1: Link against GStreamer
  • Tutorial 2: A running pipeline
  • Tutorial 3: Video
  • Tutorial 4: A basic media player
  • Tutorial 5: A Complete media player

Eventually, it will be possible to add GStreamer code to Java apps, but language bindings for the GStreamer API are not complete yet. The tutorial are written in both C and Java code with Java used for the User Interface, and C for the GStreamer code, with both parts interacting through JNI.

To import a tutorial into the Eclipse workspace, click on File->New->Project… ->Android->Android Project from Existing Code, and select the folder android-tutorial-1 in GSTREAMER_SDK_ROOT_ANDROID/share/gst-sdk/tutorials.

At this stage, Eclipse might complain about missing files, but this is normal, and we need to add native development support by right-clicking on the project tutorial1 and selecting Android tools->Add Native Support… The NDK plugin should ask for a library name, just keep the default (libTutorial1.so) and accept. Click on Project->Build Project in the top menu. Once the build is complete, run the project: Run->Run, and after a little while, the demo should appear in the emulator or your Android device.

You should be able to reproduce the same steps with tutorial 2 to 5. Details are available on GStreamer’s Android tutorials page.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Android NDK Revision 8 Adds MIPS Architecture Support

May 2nd, 2012 No comments

Google has just released Android Native Development Kit Revision 8, the Android SDK that allows developers to reuse C/C++ code. This version adds support for MIPS architecture and fixes a few bugs.

Here’s the changelog of the new features and most important bug fixes:

  • Added support for the MIPS ABI, which allows you to generate machine code that runs on compatible MIPS-based Android devices. Major features for MIPS include MIPS-specific toolchains, system headers, libraries and debugging support. For more details regarding MIPS support, see docs/CPU-MIPS.htmlin the NDK package.
  • Fixed a typo in GAbi++ implementation.
  • Fixed an issue in which make-standalone-toolchain.sh fails to copy libsupc++.*.

You can download Android NDK version 8 to develop native apps for MIPS or take advantage of the new bug fixes.

Previously, MIPS provided the Android NDK on their own website, but this version might be phased out, as MIPS support is now part of  the official Android NDK.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Categories: Android Tags: Android, mips, ndk, sdk

Android Developers Conference 2012 (AnDevCon III) Schedule

January 20th, 2012 No comments

The full schedule for AnDevCon III (14-17 May 2012)  has finally been released with 42 different classes and several workshops.

The sessions will be organized into five subject area:

  • Developer Essentials: These technical classes and workshops are for all Android developers and cover all programming topics.
  • Android Enterprise: These technical sessions cover topics specific to building and managing apps for employees, business customers and partners, such as back-end integration corporate data center communications, ERP or CRM systems.
  • Android Business: These classes and workshops are for entrepreneurial developers who want to learn the most effective ways of distributing and selling Android apps, including how to maximize profit through the Android Market.
  • Android Tablets and beyond: These classes and workshops are specific to commercial devices beyond smartphones, including tablets, Google TV, and other platforms.
  • Embedded Android: These classes and workshops are for developers working close to the hardware, such as on custom devices, or diving deep into the internals of this flavor of embedded Linux.

I’ve gone thru the list and selected 10 classes that I think could be particularly interesting with sessions related to Embedded Android (Sensors, Android Accessories) and relatively recent features/standards such as Google TV, NFC and HTML5,  one session about graphics development (OpenGL, NDK), one about Android testing  as well as the only Android Business session:

  1. Android Sensors: Virtual Sensors, Embedded Level Implementation and Future Directions  by James Steele

    More and more sensors are being included in Android devices. Android provides a common API to access sensors, but effective use of sensor data is more complicated. Performance can vary greatly from platform to platform, and there is no standard sensor suite. Methods to optimize performance and provide a more relevant result are presented. Examples will include using the NDK on commercial devices and creating sensor drivers for a custom embedded Android device.

  2. Talk to Your Toaster: Developing Android Accessories by Dave Smith

    In the last year, the opportunity for Android applications to connect with other devices has exploded. Honeycomb and ICS have brought technologies such as USB, wi-fi Direct and Bluetooth into the SDK as viable modes through which an application can communicate with the outside world.

    This session will address the APIs available in Android to connect with external hardware and the basics developers need to get up and running with each. The USB framework will be explored, including host mode and the Open Accessory protocol. Attendees will also learn about communicating via RFCOMM and device profiles over Bluetooth.

    Although this session is not directly hands-on, sample code for both the Android and firmware side will be provided. Experience and familiarity with embedded development platforms such as Arduino is helpful, as we will be exploring some accessory firmware. An understanding of the basics of USB and/or Bluetooth technology is also a plus.

  3. Protecting Your Android Source Code by Godfrey Nolan

    Due to the design of the Java Virtual Machine (JVM), it is relatively trivial to reverse-engineer Java code from Java jar and class files. While this hasn’t been an issue in the past since most Java files are hidden on the server, it is an issue on Android phones where the client-side Android APK files are easily obtained and just as easy to decompile back into source.

    Come to this session to learn the how and why this is possible by unraveling the APK into DEX files and the tools that are currently available to decompile your APKs back into Java or JavaScript source code with the right click of a mouse. The session will also show some of the security issues that this raises, such as inadvertently allowing people to gain access to credit card information or back-end systems when someone has complete access to your source.

    Open-source and commercial obfuscation tools will be shown as well as other techniques you should be using, such as C++ coding, watermarking and more to stop people gaining access to your Android code.

  4. Android in the Stratosphere: Advanced Development for Near-Space Exploration by Craig Isakson

    Have you ever wondered what the world would look like at 100,000 feet above sea level? Wonder no more. The instructor took a weather balloon, an Android phone and a sense of adventure, and launched Android into near-space.

    This class will explain advanced programming techniques used in Android to perform GPS tracking and data recording, as well as automated camera capturing to document and record flight information. Other topics covered in this class will be utilizing the Google Maps API with custom drawing, SQLite database creation and manipulation, and creating services.

  5. Automating Functional Testing for Android Applications by Stu Stern

    Automated functional testing is crucial to the development of all Android applications. A core suite of automated functional tests provides a solid foundation for rapidly iterating product releases by ensuring that the introduction of each new feature does not inadvertently break pre-existing functionality.

    In this class, we will explore how to use FoneMonkey, a free and open-source tool that automates functional testing of Android applications, to record, edit, playback and verify application functionality on Android emulators and devices. Attendees also will have the opportunity to see how FoneMonkey scripts can be extended with Java or JavaScript to create domain-specific testing libraries that handle arbitrarily complex application usage scenarios. The class will conclude with a look at how FoneMonkey test suites can be run using Eclipse and JUnit, and how FoneMonkey can be run from continuous integration tools.

  6. Advanced Graphical Applications using NDK and OpenGL by Robert Green

    Consumers are expecting more out of their Android devices every day, especially in the realm of graphics. Most modern Android devices carry very powerful GPUs that can produce beautiful graphical animations, provided developers know how to really utilize it.Android ships with Java bindings for OpenGL, but many applications can benefit from the addition of native (C++) high-performance components, and this class will demonstrate a general solution for integrating said components into an Android application. The demo will show an interactive 3D animated character built for Android using mostly off-the-shelf software, but the same techniques can be used to provide an array of modern graphical effects that will be sure to give an application the edge in a competitive market, or provide the foundational knowledge for any highly graphical interactive application on Android.

  7. Ready for the Big Screen – Implementing on Google TV by Jim McKeeth

    Google TV isn’t just a bigger version of an Android phone; it has different inputs, hardware and rules for your application showing up in the Android Marketplace. This session provides the specifics of what your application needs to look great and work on Google TV. It also includes specific examples of implementing applications on Google TV hardware, as well as using handheld Android devices as extensions to Google TV applications.

    This session will show code and applications running on Google TV hardware (Provided an HDTV is available for this session).
    Attendees must have Android application development experience.
    After completing this session, students will have a checklist of what is necessary to build Google TV applications, and details on deploying and debugging applications during development. They will also have specific example code ready for use in their applications.

  8. Building NFC-Enabled Android Applications by Jason Weiss

    Android’s support for Near Field Communications (NFC) offers developers a powerful new metaphor for mobile phone interaction: Physical Touch. NFC supports far more than secure financial transactions. Popular games like “Angry Birds Magic” have already incorporated NFC (you have to touch your phone to another NFC-enabled phone to unlock game levels) to expand the social interaction of mobile gaming, and a new breed of enterprise applications that tout proof of presence for remote workers already exists. Industry research has demonstrated that NFC provides a more efficient and friendlier user experience than QR codes.

    This advanced session will introduce developers to the nuts and bolts of NFC development on the Android platform. Attendees will learn the basics of NFC, including the types of RFID tags that the technology supports, as well as a primer on security concerns and tag storage limitations. Code examples will be provided to demonstrate how programmers can leverage the NFC Data Exchange Format open standard inside their applications for reading/writing data to/from RFID tags. Attendees will also be introduced to the NFC Tag Event open standard for back-office integration.

    Attendees are not required to have an NFC-enabled phone, but they are strongly encouraged to attend with an NFC-enabled handset, such as the Google Nexus S (3G), HTC Amaze (4G), or Samsung Galaxy Nexus (4G), since the Android emulator does not support NFC emulation.

  9. Building HTML5 Apps for Phone or Tablet by Joe Stagner

    HTML5 is truly a cross-platform development platform with its new functionality that can be used to build applications that run when a user is or isn’t online. Doing so, however, requires a change in your design thought process. In this session, we’ll discuss not only the new technologies, but review patterns that will let you write one application to run on devices of different form factors, with or without an active Internet connection.

  10. Android Business Essentials by Nathan Mellor

    Are you an aspiring entrepreneur eager to build a sustainable business based on Android Apps? Learn how to maximize your chances of success without inviting too much stress. Learn some specific things you can do to promote your app and how to do them. The focus is on tools and techniques that will work for a small business or individual, even if you are just one person working out of your home office like the presenter. Learn about:

    • A mindset that could be your biggest obstacle to success (and how to change it)
    • Coming up with ideas and target markets
    • Using tools and people power to get more work done
    • Where to find resources at a low business price
    • Installing and using analytics and tracking to increase profits
    • How to do keyword research to increase profits
    • Maximizing app exposure within the Android Market
    • Specific ways to promote your app outside the market through Web marketing, video marketing and more
    • Communicating with customers through HelpDesk and e-mail newsletters

Beyond the classes, there is also the Embedded Android Workshop (Full Day) by Karim Yaghmour, Opersys:

This one-day workshop is aimed at embedded developers wanting to build touch-based embedded systems using Android. It will cover Android from the ground up, enabling developers to get a firm hold on the components that make up Android and how they need to be adapted to an embedded system.

Specifically, we will start by introducing Android’s overall architecture, and then proceed to peel Android’s layer one-by-one. First, we will cover the Android Open Source Project, the open-source project under which Android’s source code is released. We will then dig into the native Android user space and Android’s power tools, and cover how hardware support is implemented in Android. Given that Android is built on top of Linux, we will also go over some embedded Linux tricks and see how the kernel is modified to support the Android user space. In addition, we will look at the System Server, the Android Framework and core Android applications, and how to customize them.

You can access the full list of classes and workshops on AnDevConv website.

If you are interested in attending AnDevConv III, you can check my previous blog post “AnDevCon III: Android Developer Conference – 14-17 May 2012” for pass information and pricing or go directly to AnDevCon III Registration page.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

MIPS Releases Android NDK 7m

January 4th, 2012 No comments

MIPS has just announced the release of the Android Native Development Kit version 7. It has the same APIs as the Android NDK revision 7 released in November 2011 (for Android 4.0), but adds support for MIPS architecture and the MIPS ABI . The NDK is available for Windows, Linux and MacOS.

The NDK allows developers to use C/C++ code either to reuse existing C/C++ code or to improve the performance over code developed with Java. Note that MIPS states that “using native code does not result in an automatic performance increase, but always increases application complexity. If you have not run into any limitations using the Android framework APIs, you probably do not need the NDK.”

The NDK can be downloaded for:

You’ll also have to download the Android MIPS SDK, if you want to use the NDK. Strangely, the Mac SDK is not available for download yet, although the NDK is.

Instruction to install the NDK, getting started and samples are available on MIPS Android NDK page.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

ARM Releases Free DS-5 Community Edition For Android Developers

November 29th, 2011 No comments

ARM announced a free version of its Eclipse-based  DS-5 tools for small development firms (with 10 or fewer developers) and individuals who publish applications for Android. The ARM Development Studio 5 (DS-5) Community Edition (CE) helps create performance- and power-optimized native software by integrating a graphical debugger for code generated for the Android Native Development Kit (NDK) and a basic version of the ARM Streamline performance analysis tool.

Eclipse Android Debuger for ARM

ARM DS-5 Android Debugger

DS-5 CE is designed to work with Android Virtual Devices ( AVDs), development boards and devices that run Android 2.2 and API 8 or higher. ARM Development Studio 5 (DS-5) Community Edition is distributed as plug-in for Eclipse and completes the app developer toolkit with a C, C++ and Assembly graphical debugger that builds on the Android Debug Bridge (ADB), a software performance profiler and system analyzer (ARM Streamline).

ARM Profiling Report with Eclipse

ARM Streamline Report

To get started, you’ll need Eclipse IDE, the Android SDK and the Android NDK installed. Then you can install DS-5 CE from Eclipse.

ARM explains that native code optimized for ARM cores performs up to 4 times faster than Java code, native code is easier to reuse for other platforms and most smartphones are based on ARM processors.

Companies with more than 10 developers can get the fully featured version of DS-5 which includes an ARM Compiler, an OS-aware debugger that supports a range of debug operations from bare-metal debug to Linux kernel debug and SMP debug, system-wide performance analyzer and real-time system simulator.

More details on Developer Studio 5 Community Edition can be found on DS-5 CE page.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Categories: Android, Programming Tags: Android, C/C++, arm, eclipse, ndk

Android NDK Revision 7 for Android 4.0 (ICS)

November 12th, 2011 No comments

Google has just released Android Native Development Kit Revision 7, the Android SDK that allows developers to reuse C/C++ code. This version adds new native APIs available in Android 4.0.

Here’s the changelog of the most important new features and bug fixes:

  • NDK APIs for Android 4.0 (API level 14):

    • Low-level streaming multimedia: A new API based on Khronos OpenMAX AL 1.0.1 provides a direct, efficient path for low-level streaming multimedia. The new path is ideal for applications that need to maintain complete control over media data before passing it to the platform for presentation.
    • Audio decoding into PCM: Extensions to the existing native audio API based on Khronos OpenSL ES let native apps decode compressed audio assets to PCM format.
  • CCache support to allow faster rebuilds.
  • Added support for setting APP_ABI to all to indicate that you want to build your NDK modules for all the ABIs supported by your given NDK release.
  • Imported shared libraries are now installed by default to the target installation location (libs/<abi>), if APP_MODULES is not defined in your Application.mk.
  • ndk-gdb now works correctly for activities with multiple categories in their MAIN intent filters.
  • Static library imports are now properly transitive. For example, if a top-level module foo imports static library bar that imports static library zoo, the libfoo.so will now be linked against both libbar.a and libzoo.a.

You can download Android NDK version 7 to take advantage of the latest API and bug fixes.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Categories: Android Tags: Android, ics, ndk, openmax, sdk

Embedded Android Workshop at Android Open 2011

October 20th, 2011 No comments

The first Android Open Conference took place about 10 days ago. Karim Yaghmour of OperSys published the presentation slides he used during his Android presentations.

See Embedded Android Workshop presentation slides below.

Those 159 slides cover the following:

  1. Android Basics
  2. Android History
  3. Android Ecosystem
  4. Legal Framework for Android
  5. Platform and Hardware requirements
  6. Development Tools
  7. Concepts and Internals:
    1. Android Concepts
    2. Framework Intro
    3. Native Development
    4. Overall Architecture
    5. System startup
    6. Linux Kernel
    7. Hardware Support
    8. Native User-Space
    9. Dalvik
    10. JNI
    11. System Server
    12. Calling on Services
    13. Activity Manager
    14. Binder
    15. Stock AOSP Apps
  8. Android Open Source Projects
    1. Tools and location
    2. Content
    3. Building
    4. Build system
    5. Adding new applications
    6. Images
    7. Using adb
  9. System Server
    1. Services run by System Server
    2. Observing the System Server
    3. Calling on system services
    4. Inside a few system services
    5. Creating your own system service
  10. Hardware Abstraction Layer
  11. Android Framework
    1. Location and components
    2. Android
    3. Customization
  12. Custom Toolchains and Dev Kits
    1. Rationale
    2. SDK generation
    3. NDK generation
    4. Creating a cross-dev toolchain
  13. Compatibility Test Suite
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter