Saturday, July 14, 2012

ADK 2012 for Android

Despite the popularity of the IOIO board for Android (a tool for adding external hardware to Android devices), which has the largest developer/hacker community, Google does not abandon its Accessory Development Kit (ADK). At Google I/O 2012, the team made another demo of ADK, using another board different from what we saw (or used) last year.



ADK 2011:



This time, you get some serious design:

ADK 2012:


The new Audio dock API and HID API seem to be the main interests of this ADK 2.0, which are very easy to implement.


The entire project is open-source as usual. If you want to make your own ADK 2012 board, please get the schematics and source code here:
http://developer.android.com/tools/adk/adk2.html#src-download

Once you get your ADK board, you can play with it using the official application available in the play store:


ADK 2012: https://play.google.com/store/apps/details?id=com.google.android.apps.adk2
ADK 2011: https://play.google.com/store/apps/details?id=com.diyphonegadgets.DemoKit


For example, for those of you who want to make an external audio dock for Android that is able to play audio over a USB connection, simply grab a device running Android 4.1 (API Level 16) or higher (e.g., Galaxy Nexus), prepare your ADK 2012 board, open your favorite Arduino IDE, and start your pleasant development now.

The ADK 2012 provides a reference implementation of this functionality for accessory developers. No software application is required to be installed on the connected Android device, accessory developers only need to support AOA v2. This implementation demonstrates audio output of 16bit, 44.1kHz stereo PCM source data compressed into a single channel due to the audio hardware available on the accessory.

Using the audio output features provided by the ADK library requires only a few function calls. The first few calls are in the accessory setup() routine, which prepare the accessory for USB connections and audio output, as summarized in the code example below:

ADK L;
void setup() {
  L.audioInit();
  L.usbh_init()
  L.usbStart();
}

For more information about the ADK::audioInit() function, see the libraries/ADK/Audio.c library file. For more information about the ADK::usbh_init() function, see the libraries/ADK/Usbh.c library file.

After completing this setup, the loop() function calls ADK::adkEventProcess() to handle audio output and other ADK functions:

void loop(void)
{
  ...
  L.adkEventProcess(); //let the adk framework do its thing
  ...
}

This call executes task queuing for the ADK and as part of the execution process, the task queue executes usbh_work() inlibraries/ADK/Usbh.c, which handles audio output requests. Review the implementation of this function for details. For additional implementation details on audio output, see the libraries/ADK/accessory.c library file.

Enjoy the official presentation here:


21 comments:

  1. very nice post I just enjoy reading it
    thanks for sharing it here

    ReplyDelete
  2. I am very interested in your post. The information in your post is very benefitable for me. Thanks for share this post.

    ReplyDelete
  3. wow just got this app DIY and loving the possibilities..makes me want to become a developer!

    ReplyDelete
  4. Looking at the images in this post it seems that this would be completely different and interesting design from Android this time. Hope I will be one of the luckiest developers to get this kit.

    ReplyDelete
  5. I want this ADK board and i want to run my official application . Thank you for give me a chance to get technology reviewsthis useful product. I am really thankful to you.

    ReplyDelete
  6. This sort of article is fascinating and enjoyable to peruse. I cherish perusing and I am continually hunting down useful data Visit Website

    ReplyDelete
  7. Let be honest, pretty much every phone call that we get is an interference. When we are occupied with a transaction, this can be a genuine bother.free-lookup.net

    ReplyDelete
  8. steam cleaners can clean lots of dirty clothes in a very short period of time that is why i always prefer to use them., wholesale custom phone cases

    ReplyDelete
  9. The blog is great. Basically love the way how all the composed function has been put.
    telephone lookup

    ReplyDelete
  10. The quality of your blogs and conjointly the articles and price appreciating.www.whichandroid-phone.info

    ReplyDelete
  11. Thanks for the post. Visit Kanhasoft - Android App Development Company if you want to develop Android app at affordable rates. For more visit our site.

    ReplyDelete
  12. Development of Android applications has unlimited benefits to your business or organization. And with developers being specialized in the most current operating systems, they will make sure your app is up to par with the rest, taking in all of your suggestions.appmirror

    ReplyDelete
  13. Apps like Latitude allow you to share your exact whereabouts with family and friends.
    traceur de telephone

    ReplyDelete
  14. There are some interesting points in time in this article but I don?t know if I see all of them center to heart. There is some validity but I will take hold opinion until I look into it further. Good article , thanks and we want more
    how to use kingroot

    ReplyDelete
  15. Your website is really cool and this is a great inspiring article. Showbox APK 5.14

    ReplyDelete
  16. Cool article it's really. Friend on mine has long been awaiting just for this content. showbox apk

    ReplyDelete
  17. It is interesting to read your blog post and I am going to share it with my friends.aybabg

    ReplyDelete
  18. great guy awesome article spotify premium apks info you can use this site also to download latest app spotify for free with all premium tracks

    ReplyDelete

Disqus for DIY Phone Gadgets