Skip to content

Instantly share code, notes, and snippets.

@jesvs
Last active March 5, 2017 07:38
Show Gist options
  • Save jesvs/6d530a5f5e589d5f5984df6dda2317fe to your computer and use it in GitHub Desktop.
Save jesvs/6d530a5f5e589d5f5984df6dda2317fe to your computer and use it in GitHub Desktop.
<application
android:name=".ParseApplication"
/>
<uses-permission android:name="android.permission.INTERNET" />
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'
}
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