I have the following code placed in my application class of an Android app of mine:
// Register ParseObject subclasses
ParseObject.registerSubclass(Results.c
delete the app from device, and install again. it should work.
here is my setup
//Parser App Crash Report
ParseCrashReporting.enable(this); //THIS is to test only => throw new RuntimeException("Test Exception!");
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
// Initialise
Parse.initialize(this, PARSE_APP_ID, PARSE_CLIENT_KEY);
ParseUser.enableAutomaticUser();
ParseUser.getCurrentUser().saveInBackground();
ParseACL defaultACL = new ParseACL();
// If you would like all objects to be private by default, remove this line.
defaultACL.setPublicReadAccess(true);
ParseACL.setDefaultACL(defaultACL, true);
then test with :
ParseObject testObject = new ParseObject("TestObject");
testObject.put("foo", "bar");
testObject.put("2", "2");
testObject.put("3", "3");
testObject.saveInBackground();
You need to make sure to save the current user.
// Register ParseObject subclasses
ParseObject.registerSubclass(Results.class);
// Set up Parse
Parse.enableLocalDatastore(MyApplication.this);
Parse.initialize(MyApplication.this, PARSE_APP_KEY, PARSE_CLIENT_KEY);
ParseUser.enableAutomaticUser();
ParseUser.getCurrentUser().saveInBackground(); // <--- This Line
ParseACL defaultACL = new ParseACL();
ParseACL.setDefaultACL(defaultACL, true);
Not entirely sure about my syntax, I've only done it in Swift.