Socialize SDK Android


Source link: https://github.com/socialize/socialize-sdk-android

Socialize SDK Android

Integrating Socialize into your App

Check out the full documentation to learn how to integrate Socialize into your app:

http://socialize.github.io/socialize-sdk-android/

Building Socialize from Source

Note: This is not required if you simply want to integrate Socialize into your app

Prerequisites

Make sure you have the following installed on your local machine:

Also make sure you have the following versions of the Android SDK installed:

  • Android 2.2 (API 8)
  • Android 4.4 (API 19)

These are installed using the Android SDK manager:

http://developer.android.com/tools/help/sdk-manager.html

Building Socialize

First clone this repo:

git clone [email protected]:socialize/socialize-sdk-android.git 

Socialize depends on 3 external library projects:

git clone [email protected]:socialize/android-ioc.git git clone [email protected]:socialize/loopy-sdk-android.git git clone [email protected]:facebook/facebook-android-sdk.git 

Setup the Facebook SDK for Build

Switch to the verified (tested) version of Facebook:

cd facebook-android-sdk git checkout sdk-version-3.17.2 cd ../ 

This version of the Facebook SDK (3.17.2) has some compilation warnings which are treated as errors by facebook. To override this, we need to change the compiler arguments in the facebook ant.properties:

vim facebook-android-sdk/facebook/ant.properties 

Replace the following line:

java.compilerargs=-Xlint -Werror 

With:

java.compilerargs=-Xlint 

Now you can build the SDK distribution:

cd socialize-sdk-android/sdk ant -Dsdk.dir=/usr/local/android clean build 

Make sure you replace /usr/local/android with your local path to the Android SDK

Building the Demo App

To build and test the demo app from the command line:

cd socialize-sdk-android/demo ant -Dsdk.dir=/usr/local/android clean release 

Make sure you replace /usr/local/android with your local path to the Android SDK

Now you can install the demo app:

/usr/local/android/platform-tools/adb uninstall com.socialize.demo /usr/local/android/platform-tools/adb install bin/socialize-demo-release.apk 

The demo app is called, Socialize Demos

Building the Documentation

Note: Sphinx 1.2.2 is required to generate docs:

sudo pip install sphinx 

To build the html version of the documentation:

cd socialize-sdk-android/sdk ant -Dsdk.dir=/usr/local/android doc 

Make sure you replace /usr/local/android with your local path to the Android SDK

Now you can browse the documentation:

open build/docs/user_guide/index.html 

Running the Tests

In order to run the tests you need either an Android 4.4 device or emulator. We recommend using the Genymotion Android virtualization platform available here: http://www.genymotion.com/

Ensure the device/emulator is connected and available:

/usr/local/android/platform-tools/adb devices 

If you do not see any devices listed, try restarting the adb server:

/usr/local/android/platform-tools/adb kill-server /usr/local/android/platform-tools/adb start-server 

Prior to running the tests you MUST run an sdk cleanup so that the stage server has its state reset. This is a python script located in the test folder:

cd socialize-sdk-android/test  python sdk-cleanup.py <consumer-key> <consumer-secret> \ <http://stage.api.socialize.com/v1> \ [facebook_user_id] [facebook_token] 

To run the tests:

ant -propertyfile ant.global.properties -Dsdk.dir=/usr/local/android test-with-results 

Make sure you replace /usr/local/android with your local path to the Android SDK

Now you can browse the coverage results:

open coverage-results/coverage.html 

Building the Distro

To build the distributable SDK (zip):

cd socialize-sdk-android/sdk ant -Dsdk.dir=/usr/local/android clean build 

Make sure you replace /usr/local/android with your local path to the Android SDK

Resources

An Adapter that allows a RecyclerView to be split into Sections with headers and/or footers.

A common RecyclerView.Adapter implementation which supports any kind of items and has useful data operating APIs such as remove, add, etc.

EasyForm makes a form creation and field validation easy.

SegmentedControlView is unswipable button style control view. Inspired by iOS's UISegmentedControl, buttons are evenly spaced in width. Simple usage! Just specify the highlight colors and unselected text colors are calculated automatically.

Cool ImageVeiw effects.

A layout that you can swipe/slide to show another layout.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes