{"id":133,"date":"2009-11-20T10:34:27","date_gmt":"2009-11-20T09:34:27","guid":{"rendered":"http:\/\/relivethefuture.com\/choronzon\/?p=133"},"modified":"2009-11-20T10:34:27","modified_gmt":"2009-11-20T09:34:27","slug":"osc-on-android","status":"publish","type":"post","link":"https:\/\/relivethefuture.com\/choronzon\/osc-on-android\/","title":{"rendered":"OSC on Android"},"content":{"rendered":"<p>I just bought myself a <a href=\"http:\/\/www.htc.com\/www\/product\/hero\/overview.html\">HTC Hero<\/a> so im starting to learn all the <a href=\"http:\/\/developer.android.com\/index.html\">Android development<\/a> stuff.<\/p>\n<p>So the first thing i&#8217;ve tried is to see how easy it is to get my <a href=\"https:\/\/www.assembla.com\/wiki\/show\/osclib\">OSCLib<\/a> stuff working. There isnt a lot to the actual library itself as most of the hard work is handled by <a href=\"http:\/\/mina.apache.org\/\">Apache Mina<\/a>. I started a new Android project in eclipse and just tried to send a simple OSC message to a test server on my local machine. It didnt work, the dalvik VM told me I had a verify error. I eventually narrowed this down to the <a href=\"http:\/\/www.slf4j.org\/\">SLF4J<\/a> library. At this stage I had no clue about how to fix it so back to google to see if someone else had done the hardwork. \ud83d\ude42<\/p>\n<p>I found <a href=\"http:\/\/old.nabble.com\/SLF4J-on-the-Google-Android-Platform-td26011148.html#a26011148\">this thread<\/a> where Thorsten M\u00f6ller says he actually has a version of slf4j but its not on the main site yet, just in his git repo. So after a clone of that and a run of maven I had a shiny new slf4j-android.jar which I&#8217;ve upload to my site <a href=\"http:\/\/relivethefuture.com\/dev\/slf4j-android-1.5.8.jar\">here<\/a>.<\/p>\n<p>I added that jar to the dependencies of my OscAndroDemo test project and it worked. Easy. \ud83d\ude42<\/p>\n<p>All the source is available from the <a href=\"https:\/\/www.assembla.com\/wiki\/show\/osclib\">OSCLib assembla project<\/a>. The main library is in <a href=\"http:\/\/svn2.assembla.com\/svn\/osclib\/trunk\/java\/\">\/trunk\/java<\/a>, its an eclipse project and in there you can run the OSCServer class for testing. It&#8217;ll spit out some info to stdout when it receives a message. The android project is in <a href=\"http:\/\/svn2.assembla.com\/svn\/osclib\/trunk\/android\/AndrOscDemo\/\">\/trunk\/android\/AndrOscDemo<\/a> which you can check out from SVN directly into eclipse.<\/p>\n<p>The demo just connects to 10.0.2.2:10000 and sends a single message. The next stage is to try and do some interesting stuff with the various sensors like the accelerometer and see if any issues arrive once I start sending lots of messages.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just bought myself a HTC Hero so im starting to learn all the Android development stuff. So the first thing i&#8217;ve tried is to see how easy it is to get my OSCLib stuff working. There isnt a lot to the actual library itself as most of the hard work is handled by Apache &hellip; <a href=\"https:\/\/relivethefuture.com\/choronzon\/osc-on-android\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">OSC on Android<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,3,10],"tags":[26,47,62,72,74,84],"class_list":["post-133","post","type-post","status-publish","format-standard","hentry","category-android","category-development","category-osc","tag-android","tag-htc-hero","tag-mina","tag-open-sound-control","tag-osc","tag-slf4j"],"_links":{"self":[{"href":"https:\/\/relivethefuture.com\/choronzon\/wp-json\/wp\/v2\/posts\/133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/relivethefuture.com\/choronzon\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/relivethefuture.com\/choronzon\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/relivethefuture.com\/choronzon\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/relivethefuture.com\/choronzon\/wp-json\/wp\/v2\/comments?post=133"}],"version-history":[{"count":0,"href":"https:\/\/relivethefuture.com\/choronzon\/wp-json\/wp\/v2\/posts\/133\/revisions"}],"wp:attachment":[{"href":"https:\/\/relivethefuture.com\/choronzon\/wp-json\/wp\/v2\/media?parent=133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/relivethefuture.com\/choronzon\/wp-json\/wp\/v2\/categories?post=133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/relivethefuture.com\/choronzon\/wp-json\/wp\/v2\/tags?post=133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}