diff --git a/README.md b/README.md index e04b60984..e30a8d547 100644 --- a/README.md +++ b/README.md @@ -6,30 +6,97 @@ [![Join Chat](https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg)](https://gitter.im/ParsePlatform/Chat) - A library that gives you access to the powerful Parse cloud platform from your Android app. -For more information about Parse and its features, see [the website][parseplatform.org] and [getting started][guide]. - -## Download -Add the dependency in Gradle: - -```groovy -dependencies { - compile 'com.parse:parse-android:1.15.8' -} -``` - -Snapshots of the development version are available in [jFrog's `snapshots` repository][snap]. +For more information about Parse and its features, see [the website][parseplatform.org], [blog][blog] and [getting started][guide]. + +## Getting Started +### Installation +- **Option 1:** Gradle + + Add dependency to the application level `build.gradle` file. + + ```groovy + dependencies { + compile 'com.parse:parse-android:1.15.8' + } + ``` + + Snapshots of the development version are available in [jFrog's `snapshots` repository][snap]. + +- **Option 2:** Compiling for yourself into AAR file + + If you want to manually compile the SDK, begin by cloning the repository locally or retrieving the source code for a particular [release][releases]. Open the project in Android Studio and run the following commands in the Terminal of Android Studio: + + ``` + ./gradlew clean jarRelease + ``` + Output file can be found in `Parse/build/outputs/` with extension .aar + + You can link to your project to your AAR file as you please. + + ### Setup +- **Option 1:** Setup in the Manifest + + You may define `com.parse.SERVER_URL` and `com.parse.APPLICATION_ID` meta-data in your `AndroidManifest.xml`: + + ``` + + + + ... + + ``` + + Initialize Parse in a custom class that extends `Application`: + ``` + import com.parse.Parse; + import android.app.Application; + + public class App extends Application { + @Override + public void onCreate() { + super.onCreate(); + Parse.initialize(this); + } + } + ``` + +- **Option 2:** Setup in the Application + + Initialize Parse in a custom class that extends `Application`: + ``` + import com.parse.Parse; + import android.app.Application; + + public class App extends Application { + @Override + public void onCreate() { + super.onCreate(); + Parse.initialize(new Parse.Configuration.Builder(this) + .applicationId("YOUR_APP_ID") + .server("http://localhost:1337/parse/") + .build() + ); + } + } + ``` + + For either option, the custom `Application` class must be registered in `AndroidManifest.xml`: + ``` + + ... + + ``` ## Usage Everything can done through the supplied gradle wrapper: -### Compile a JAR -``` -./gradlew clean jarRelease -``` -Outputs can be found in `Parse/build/libs/` - ### Run the Tests ``` ./gradlew clean testDebug @@ -43,7 +110,7 @@ Results can be found in `Parse/build/reports/` Results can be found in `Parse/build/reports/` ## How Do I Contribute? -We want to make contributing to this project as easy and transparent as possible. Please refer to the [Contribution Guidelines](CONTRIBUTING.md). +We want to make contributing to this project as easy and transparent as possible. Please refer to the [Contribution Guidelines][contributing]. ## Other Parse Projects @@ -65,6 +132,7 @@ We want to make contributing to this project as easy and transparent as possible As of April 5, 2017, Parse, LLC has transferred this code to the parse-community organization, and will no longer be contributing to or distributing this code. [parseplatform.org]: http://parseplatform.org/ + [blog]: http://blog.parse.com/ [guide]: http://docs.parseplatform.org/android/guide/ [latest]: https://search.maven.org/remote_content?g=com.parse&a=parse-android&v=LATEST @@ -84,3 +152,6 @@ As of April 5, 2017, Parse, LLC has transferred this code to the parse-community [license-svg]: https://img.shields.io/badge/license-BSD-lightgrey.svg [license-link]: https://github.com/parse-community/Parse-SDK-Android/blob/master/LICENSE + + [releases]: https://github.com/parse-community/Parse-SDK-Android/releases + [contributing]: CONTRIBUTING.md