Skip to content

Commit ea430fc

Browse files
addisonElliottrogerhu
authored andcommitted
Add additional getting started info to README (#706)
* Update README.md Begin working on README fix * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md
1 parent 28fd9e1 commit ea430fc

File tree

1 file changed

+91
-20
lines changed

1 file changed

+91
-20
lines changed

README.md

Lines changed: 91 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,97 @@
66

77
[![Join Chat](https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg)](https://gitter.im/ParsePlatform/Chat)
88

9-
109
A library that gives you access to the powerful Parse cloud platform from your Android app.
11-
For more information about Parse and its features, see [the website][parseplatform.org] and [getting started][guide].
12-
13-
## Download
14-
Add the dependency in Gradle:
15-
16-
```groovy
17-
dependencies {
18-
compile 'com.parse:parse-android:1.15.8'
19-
}
20-
```
21-
22-
Snapshots of the development version are available in [jFrog's `snapshots` repository][snap].
10+
For more information about Parse and its features, see [the website][parseplatform.org], [blog][blog] and [getting started][guide].
11+
12+
## Getting Started
13+
### Installation
14+
- **Option 1:** Gradle
15+
16+
Add dependency to the application level `build.gradle` file.
17+
18+
```groovy
19+
dependencies {
20+
compile 'com.parse:parse-android:1.15.8'
21+
}
22+
```
23+
24+
Snapshots of the development version are available in [jFrog's `snapshots` repository][snap].
25+
26+
- **Option 2:** Compiling for yourself into AAR file
27+
28+
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:
29+
30+
```
31+
./gradlew clean jarRelease
32+
```
33+
Output file can be found in `Parse/build/outputs/` with extension .aar
34+
35+
You can link to your project to your AAR file as you please.
36+
37+
### Setup
38+
- **Option 1:** Setup in the Manifest
39+
40+
You may define `com.parse.SERVER_URL` and `com.parse.APPLICATION_ID` meta-data in your `AndroidManifest.xml`:
41+
42+
```
43+
<application ...>
44+
<meta-data
45+
android:name="com.parse.SERVER_URL"
46+
android:value="@string/parse_server_url" />
47+
<meta-data
48+
android:name="com.parse.APPLICATION_ID"
49+
android:value="@string/parse_app_id" />
50+
...
51+
</application>
52+
```
53+
54+
Initialize Parse in a custom class that extends `Application`:
55+
```
56+
import com.parse.Parse;
57+
import android.app.Application;
58+
59+
public class App extends Application {
60+
@Override
61+
public void onCreate() {
62+
super.onCreate();
63+
Parse.initialize(this);
64+
}
65+
}
66+
```
67+
68+
- **Option 2:** Setup in the Application
69+
70+
Initialize Parse in a custom class that extends `Application`:
71+
```
72+
import com.parse.Parse;
73+
import android.app.Application;
74+
75+
public class App extends Application {
76+
@Override
77+
public void onCreate() {
78+
super.onCreate();
79+
Parse.initialize(new Parse.Configuration.Builder(this)
80+
.applicationId("YOUR_APP_ID")
81+
.server("http://localhost:1337/parse/")
82+
.build()
83+
);
84+
}
85+
}
86+
```
87+
88+
For either option, the custom `Application` class must be registered in `AndroidManifest.xml`:
89+
```
90+
<application
91+
android:name=".App"
92+
...>
93+
...
94+
</application>
95+
```
2396

2497
## Usage
2598
Everything can done through the supplied gradle wrapper:
2699

27-
### Compile a JAR
28-
```
29-
./gradlew clean jarRelease
30-
```
31-
Outputs can be found in `Parse/build/libs/`
32-
33100
### Run the Tests
34101
```
35102
./gradlew clean testDebug
@@ -43,7 +110,7 @@ Results can be found in `Parse/build/reports/`
43110
Results can be found in `Parse/build/reports/`
44111

45112
## How Do I Contribute?
46-
We want to make contributing to this project as easy and transparent as possible. Please refer to the [Contribution Guidelines](CONTRIBUTING.md).
113+
We want to make contributing to this project as easy and transparent as possible. Please refer to the [Contribution Guidelines][contributing].
47114

48115
## Other Parse Projects
49116

@@ -65,6 +132,7 @@ We want to make contributing to this project as easy and transparent as possible
65132
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.
66133

67134
[parseplatform.org]: http://parseplatform.org/
135+
[blog]: http://blog.parse.com/
68136
[guide]: http://docs.parseplatform.org/android/guide/
69137

70138
[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
84152

85153
[license-svg]: https://img.shields.io/badge/license-BSD-lightgrey.svg
86154
[license-link]: https://github.com/parse-community/Parse-SDK-Android/blob/master/LICENSE
155+
156+
[releases]: https://github.com/parse-community/Parse-SDK-Android/releases
157+
[contributing]: CONTRIBUTING.md

0 commit comments

Comments
 (0)