Skip to content

Add additional getting started info to README #706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 91 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:

```
<application ...>
<meta-data
android:name="com.parse.SERVER_URL"
android:value="@string/parse_server_url" />
<meta-data
android:name="com.parse.APPLICATION_ID"
android:value="@string/parse_app_id" />
...
</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(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`:
```
<application
android:name=".App"
...>
...
</application>
```

## 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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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