Last active
March 5, 2017 07:38
-
-
Save jesvs/6d530a5f5e589d5f5984df6dda2317fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<application | |
android:name=".ParseApplication" | |
/> | |
<uses-permission android:name="android.permission.INTERNET" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile 'com.parse:parse-android:1.13.1' | |
compile 'com.parse.bolts:bolts-tasks:1.4.0' | |
compile 'com.parse.bolts:bolts-applinks:1.4.0' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.appname; | |
import android.app.Application; | |
import com.parse.Parse; | |
import com.parse.ParseACL; | |
import com.parse.ParseUser; | |
public class ParseApplication extends Application { | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
Parse.enableLocalDatastore(this); | |
Parse.initialize(new Parse.Configuration.Builder(getApplicationContext()) | |
.applicationId("APP_ID") | |
.clientKey("MASTER_KEY") | |
.server("https://example.com/parse/") | |
.build() | |
); | |
ParseUser.enableAutomaticUser(); | |
ParseACL defaultACL = new ParseACL(); | |
defaultACL.setPublicReadAccess(true); | |
defaultACL.setPublicWriteAccess(true); | |
ParseACL.setDefaultACL(defaultACL, true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment