Video Chat for Android in 30 Lines of Code

Video Chat for Android in 30 Lines of Code

Here is a simple Video Chat application I built with Flex 4 and deployed on AIR for Android. The Application is just 30 lines of code and allows multiple users to join a chat room and “video chat”.

Video streaming is powered by LiveCycle Collaboration Services, a set of hosted Flash Services that enable developers to easily add real-time collaboration and social capabilities to their applications.

This application is obviously a bare-bones proof of concept. However, it is fully operational, and the same code can run on different runtime environments: AIR for Android, AIR on the Desktop, and Flash Player in the Browser. Users can participate in the same collaboration session regardless of the runtime environment they use.

Watch the video:

The 30 lines of code:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:cs="AfcsNameSpace" currentState="logon" fontSize="28">

	<fx:Script>
		[Bindable] private var roomURL:String = "http://connectnow.acrobat.com/YOUR_ROOM_NAME";

		protected function connect():void {
			auth.userName = userName.text;
			currentState = "default";
			session.login();
		}
	</fx:Script>

	<s:states>
		<s:State name="default"/>
		<s:State name="logon"/>
	</s:states>

	<fx:Declarations>
		<cs:AdobeHSAuthenticator id="auth"/>
	</fx:Declarations>

	<s:TextInput id="userName" includeIn="logon" top="200" horizontalCenter="0"/>
	<s:Button label="Connect" click="connect()" includeIn="logon" top="250" horizontalCenter="0" height="50" width="150"/>

	<cs:ConnectSessionContainer id="session" roomURL="{roomURL}" authenticator="{auth}" autoLogin="false" width="100%" height="100%" includeIn="default">
		<cs:WebCamera top="10" left="10" bottom="10" right="10"/>
	</cs:ConnectSessionContainer>

</s:Application>
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • LinkedIn
  • StumbleUpon
  • Twitter
This entry was posted in Air, Android, Flex, Froyo. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

11 Comments

  1. Posted July 23, 2010 at 6:08 pm | Permalink

    Nice!!!

  2. Posted July 23, 2010 at 8:48 pm | Permalink

    Super cool!

  3. Lee
    Posted July 24, 2010 at 6:03 am | Permalink

    30 lines of configuration does not add up to 30 lines of code.

    All the heavy lifting is done by AIR and LiveCycle.

  4. Posted July 25, 2010 at 7:43 pm | Permalink

    Well done! Facetime for Android.

  5. Posted July 27, 2010 at 11:26 am | Permalink

    Thank you for sharing this great tutorial! this is fantastic!

  6. Posted July 28, 2010 at 6:46 am | Permalink

    Good stuff.Thank you!

  7. Tahir Alvi
    Posted July 29, 2010 at 9:48 am | Permalink

    Hi,
    You do an excellent job.

    But i try to run this code in Desktop but it has following line errors

    Where we get this refrence classes.

    Thanks

  8. Posted August 15, 2010 at 12:15 am | Permalink

    video chat goot

  9. Posted August 17, 2010 at 7:28 am | Permalink

    Well done! Facetime for Android.
    Carton Machine

  10. Posted August 20, 2010 at 11:20 pm | Permalink

    Well done! Super.. Thanks…

  11. Posted August 20, 2010 at 11:22 pm | Permalink

    Thank you for sharing this great tutorial…

39 Trackbacks

  1. [...] Direct Link [...]

  2. [...] An interesting post from Adobe evangelist, Christophe Coenraets, where he creates a video chat application for Android in just 30 lines of configuration code, leveraging Adobe LiveCycle Collaboration Service. Grab the code and read more on his blog here. [...]

  3. [...] Video Chat for Android in 30 Lines of Code [...]

  4. By Webfavorites on July 24, 2010 at 11:16 am

    Supercooled water | video…

    I found your entry interesting, and I’ve added a Trackback to it on my weblog :) Thank You!…

  5. [...] when you can see one in action. Which is why Adobe Technical Evangelist Christophe Coenraets has put together a demo showing off what AIR can do when it’s used to deploy the same application across both [...]

  6. [...] man eine in Aktion zu sehen. Welches ist, warum Adobe Technical Evangelist Christophe Coenraets hat zusammen eine Demo zeigen, was AIR tun können, wenn es genutzt wird, um die gleiche Anwendung auf beiden [...]

  7. [...] when you can see one in action. Which is why Adobe Technical Evangelist Christophe Coenraets has put together a demo showing off what AIR can do when it’s used to deploy the same application across both [...]

  8. [...] bad it’s only a proof-of-concept.. for [...]

  9. [...] when you can see one in action. Which is why Adobe Technical Evangelist Christophe Coenraets has put together a demo showing off what AIR can do when it’s used to deploy the same application across both [...]

  10. [...] bad it’s only a proof-of-concept.. for [...]

  11. [...] when you can see one in action. Which is why Adobe Technical Evangelist Christophe Coenraets has put together a demo showing off what AIR can do when it’s used to deploy the same application across both [...]

  12. [...] bad it’s only a proof-of-concept.. for [...]

  13. [...] when you can see one in action. Which is why Adobe Technical Evangelist Christophe Coenraets has put together a demo showing off what AIR can do when it’s used to deploy the same application across both [...]

  14. [...] when you can see one in action. Which is why Adobe Technical Evangelist Christophe Coenraets has put together a demo showing off what AIR can do when it’s used to deploy the same application across both [...]

  15. [...] when you can see one in action. Which is why Adobe Technical Evangelist Christophe Coenraets has put together a demo showing off what AIR can do when it’s used to deploy the same application across both [...]

  16. By sarkem.org on July 24, 2010 at 8:03 pm

    Executive netbook – the beginning…

    I found your entry interesting thus I’ve added a Trackback to it on my weblog :)…

  17. [...] Video Chat for Android in 30 Lines of Code [...]

  18. [...] when you can see one in action. Which is why Adobe Technical Evangelist Christophe Coenraets has put together a demo showing off what AIR can do when it’s used to deploy the same application across both [...]

  19. By Siskatec on July 25, 2010 at 9:10 am

    fVisiOn NTIC te hace ver conejos no significativas…

    I found your entry interesting thus I’ve added a Trackback to it on my weblog :)…

  20. By Webfavorites on July 25, 2010 at 10:17 am

    How to fold | video…

    I found your entry interesting, and I’ve added a Trackback to it on my weblog :) Thank You!…

  21. By Webfavorites on July 25, 2010 at 10:17 am

    How to fold | video…

    I found your entry interesting, and I’ve added a Trackback to it on my weblog :) Thank You!…

  22. [...] [Source] Loading google.load('search', '1'); google.setOnLoadCallback(function(){ new google.search.CustomSearchControl('012240321471511227919:cz4ngqat5fa').draw('cse'); }, true); [...]

  23. By Webfavorites on July 25, 2010 at 11:16 am

    Amazing ping pong skills | video…

    I found your entry interesting, and I’ve added a Trackback to it on my weblog :) Thank You!…

  24. By Anonymous on July 25, 2010 at 4:06 pm

    [...] [...]

  25. [...] when you can see one in action. Which is why Adobe Technical Evangelist Christophe Coenraets has put together a demo showing off what AIR can do when it’s used to deploy the same application across both [...]

  26. By Webfavorites on July 25, 2010 at 5:05 pm

    When Flash goes bad | video…

    I found your entry interesting, and I’ve added a Trackback to it on my weblog :) Thank You!…

  27. By Webfavorites on July 25, 2010 at 5:44 pm

    Funny commertial | video…

    I found your entry interesting, and I’ve added a Trackback to it on my weblog :) Thank You!…

  28. [...] when you can see one in action. Which is why Adobe Technical Evangelist Christophe Coenraets has put together a demo showing off what AIR can do when it’s used to deploy the same application across both [...]

  29. By Practice of Madness on July 26, 2010 at 12:19 am

    Bipolar Darkness Chapter 1 by youtube poster vigilante114…

    I found your entry interesting thus I’ve added a Trackback to it on my weblog :)…

  30. [...] when you can see one in action. Which is why Adobe Technical Evangelist Christophe Coenraets has put together a demo showing off what AIR can do when it’s used to deploy the same application across both [...]

  31. [...] bad it’s only a proof-of-concept.. for [...]

  32. [...] bad it’s only a proof-of-concept.. for [...]

  33. [...] bad it’s only a proof-of-concept.. for now. Tweet ThisSHARETHIS.addEntry({ title: "Video: Flash-based video conferencing for [...]

  34. [...] Video chat for Android using LiveCycle Collaboration Service and AIR [...]

  35. [...] •        AIR2.5 StageWebView演示 •        AIR里的地理定位 •        关于使用LiveCycle Collaboration Service和AIR的Android的视频图表 •        使用P2P连接桌面apps的Android apps:这儿和这儿 •        [...]

  36. [...]       AIR2.5 StageWebView演示 •        AIR里的地理定位•        关于使用LiveCycle Collaboration Service和AIR的Android的视频图表•        使用P2P连接桌面apps的Android apps:这儿和这儿•      [...]

  37. [...] when you can see one in action. Which is why Adobe Technical Evangelist Christophe Coenraets has put together a demo showing off what AIR can do when it’s used to deploy the same application across both [...]

  38. By Multi-User Google Map Collaboration on Android on August 27, 2010 at 8:26 am

    [...] is just another example of “built-in” collaboration (go here and here for more). The point is really how easy it is to add these collaboration features to any [...]

  39. [...] des applications collaboratives basées sur LCCS (LiveCycle Collaboration Service). Après la vidéo-conférence et le morpion, un peu de cartographie cette [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>