The key to libraries is defining them in such as way that they are nested objects and in what are called 'namespaces' using reverse domain naming.
com.lrmassoc.SqueezeLib
com.lrmassoc.YahooWeatherRss
at the top level, you declare a variable named 'com'.
var weather = new com.lrmassoc.YahoWeatherRSS.Weather(); var squeeze = new com.lrmassoc.SqueezeLib.SqueezeComet();
Now, you have 2 different instances of objects in a single activity named with 2 unique variable names. Reusing common variable names such as 'socket' outside of the library only asks for conflicts.