Wednesday, May 16, 2012

Share It With Your Friends


Chen added one of the cooler features we had in a while: the Share button. Those of you who aren't familiar with the amazing power of this button to propagate the popularity of your application should really take notice! Its a huge deal!

The Codename One share button uses the Android specific Intent when running on the Android family of devices and falls back to reasonable defaults on other platforms. It allows your users to tell their friends about your application or activity within the application with zero effort from your part. Essentially your users become your sales people!

On Android it supports all the native sharing intents SMS, twitter, facebook, email etc. For other platforms we currently support Facebook, SMS & email. We might add twitter but we have some legal concerns due to their use of the "problematic" OAuth 1.x standard rather than 2.x.

The code for the demo above can be activated with just a few lines and is a part of the updated Kitchen Sink demo:
        ShareButton s = new ShareButton();
        s.setText("Share");
        s.setTextToShare("Codename One is so COOL!!!");

0 comments:

Post a Comment