box/box-android-apptoapp-sdk

Package library as jar

Opened this issue · 2 comments

With a couple of very small tweaks I believe that the sdk could be distributed as a pre-packaged JAR file, rather than an eclipse project. All it would take is the conversion of the (Very simple) single XML layout file into java code (below), and the source code could then be compiled into a JAR file.

LinearLayout layout = new LinearLayout(this);
layout.setOrientation(LinearLayout.VERTICAL);
layout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
mLoginWebView = new WebView(this);
mLoginWebView.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
layout.addView(mLoginWebView);
setContentView(layout);

plus the removal of the lines
mLoginWebView = (WebView)findViewById....
and
setContentView(R.layout....

Hey blacswann, we anticipate that we could have other layouts go into this library as we build out other features that we want developers to be able to take advantage of. As you say, the box_authentication layout is very simple and easy to replicate with Java code, but other layouts we add may not be.

As a follow up question to you though, is there a particular reason you wanted it as a jar? We've always found the library project mechanism to be a very convenient way to distribute our SDK, especially as Google continues to improve support for library projects with each ADT release.

I would also prefer to have the SDK as a JAR file. The main reason is ease of integration. It's much more convenient to add a JAR file to library path in just a few clicks. Now I first have to install the git plugin, than pull the source code, than ...