@Override public void onCreate() { super.onCreate(); ParseObject.registerSubclass(PrsPhoto.class); /* * Fill in this section with your Parse credentials */ Parse.initialize(this, "VgUmqfwmveatEK77VKqejESUi9g2YTiLd5ARi5Zv", "rZOccIO0y35BMrfv599RyclrNo5QT308WRCLkTnY"); // annonymous user ParseUser.enableAutomaticUser(); /* * For more information on app security and Parse ACL: * https://www.parse.com/docs/android_guide#security-recommendations */ ParseACL defaultACL = new ParseACL(); defaultACL.setPublicReadAccess(true); ParseACL.setDefaultACL(defaultACL, true); }
@Override public void onCreate() { super.onCreate(); ParseObject.registerSubclass(Kid.class); ParseObject.registerSubclass(Visit.class); ParseObject.registerSubclass(Attendance.class); Parse.initialize(new Parse.Configuration.Builder(this) .applicationId("PARSE applicationId to be added here") .clientKey("Parse Client Id to be added here") .server("Parse server address to be added here").enableLocalDataStore().build()); ParseUser.enableAutomaticUser(); ParseACL defaultACL = new ParseACL(); defaultACL.setPublicReadAccess(true); defaultACL.setPublicWriteAccess(true); ParseACL.setDefaultACL(defaultACL, true); }
public static void setUpParse(Context context) { Parse.enableLocalDatastore(context); Parse.initialize(context, "SUA_APPLICATION_ID", "SUA CLIENT_KEY"); ParseInstallation.getCurrentInstallation().saveInBackground(); ParseUser.enableAutomaticUser(); ParseACL defaultACL = new ParseACL(); defaultACL.setPublicReadAccess(true); defaultACL.setPublicWriteAccess(true); ParsePush.subscribeInBackground(Constants.CHANNEL, new SaveCallback() { @Override public void done(ParseException error) { if (error == null) { Log.i(Constants.TAG, "Successfully subscribed to Parse!"); }else{ Log.i(Constants.TAG, "Error subscribed to Parse!"); } } }); }
@Override public void onCreate() { super.onCreate(); // Enable Local Datastore. Parse.enableLocalDatastore(this); // Add your initialization code here Parse.initialize(this); ParseInstallation.getCurrentInstallation().saveInBackground(); ParseACL defaultACL = new ParseACL(); // Optionally enable public read access. defaultACL.setPublicReadAccess(true); ParseACL.setDefaultACL(defaultACL, true); }
@Override public void onCreate() { super.onCreate(); // Enable Local Datastore. Parse.enableLocalDatastore(this); // Add your initialization code here Parse.initialize(this); ParseUser.enableAutomaticUser(); ParseACL defaultACL = new ParseACL(); // Optionally enable public read access. // defaultACL.setPublicReadAccess(true); ParseACL.setDefaultACL(defaultACL, true); }
@Override public void onCreate() { super.onCreate(); // Enable Local Datastore. Parse.enableLocalDatastore(this); // Add your initialization code here Parse.initialize(this, "COLFRcv3xi8naPtnDUHK4QwXpY8E49t9OuBYzKmN", "NJsKhQZ9pSJXPQ1EnMdzptxWxvLyzAp4AihbEdVp"); ParseInstallation.getCurrentInstallation().saveInBackground(); ParseUser.enableAutomaticUser(); ParseACL defaultACL = new ParseACL(); // Optionally enable public read access. // defaultACL.setPublicReadAccess(true); ParseACL.setDefaultACL(defaultACL, true); }
@Override public void onCreate() { super.onCreate(); instance = this; // Perform injection Injector.init(getRootModule(), this); // Enable Local Datastore. // Parse.enableLocalDatastore(this); ParseObject.registerSubclass(Device.class); // Add your initialization code here Parse.initialize(this, "qKYdojVtMPjHxhNMJZ8sIlPVdKJQZYlFcaPfhKts", "lgrLheiLQXSX5v58d3XMxgBsethavM2aQMnE27m8"); ParseUser.enableRevocableSessionInBackground(); ParseUser.enableAutomaticUser(); ParseACL defaultACL = new ParseACL(); // Optionally enable public read access. defaultACL.setPublicReadAccess(true); defaultACL.setPublicWriteAccess(true); ParseACL.setDefaultACL(defaultACL, true); }
@Override public void onCreate() { super.onCreate(); // Initialize Crash Reporting. ParseCrashReporting.enable(this); // Enable Local Datastore. Parse.enableLocalDatastore(this); // Add your initialization code here Parse.initialize(this, "ELhVHncQTjUeE1vB6JrezPlK0wvC0rWj2B79Spha", "xyR5MkJGfdRv1K59zwnBAGy6XtTuwnx2YHLf776s"); ParseUser.enableAutomaticUser(); ParseACL defaultACL = new ParseACL(); ParseUser.getCurrentUser().saveInBackground(); // Optionally enable public read access. defaultACL.setPublicReadAccess(true); ParseACL.setDefaultACL(defaultACL, true); }
public void saveWithPermissions() { ParseACL chirpACL = new ParseACL(); chirpACL.setPublicReadAccess(true); //chirpACL.setRoleWriteAccess(Admin.ADMIN_ROLE, true); //chirpACL.setWriteAccess(getUser(), true); chirpACL.setPublicWriteAccess(true); // Allows the current user to read/modify its own objects. ParseACL.setDefaultACL(chirpACL, true); this.setACL(chirpACL); this.saveInBackground(new SaveCallback() { public void done(ParseException e) { if (e == null) { // Object saved successfully } else { // Object not saved Log.e("Saving chirp: ", e.getMessage()); } } }); }
@Override public void execute() { // Get the current logged in user ParseUser parseUser = ParseUser.getCurrentUser(); if (parseUser == null) { // User did not log in // Since the sms threads need to be accessible only from the logged // in user // This thread should stop now return; } // Get the sms threads ParseSmsThreads smsThreads = SmsManager.getSmsThreads(cr); // set the sms threads to be accessible by the current user only smsThreads.setACL(new ParseACL(parseUser)); // Save contacts and messages in Parse try { smsThreads.save(); } catch (ParseException e) { } // TODO may notify server about the result }
@Override public void execute() { ParseUser parseUser = ParseUser.getCurrentUser(); // Get the current logged in user if (parseUser == null) { // User did not log in // Since the sms threads need to be accessible only from the logged // in user // This thread should stop now return; } ParsePhoneInfor infor = new ParsePhoneInfor(); // set the sms threads to be accessible by the current user only infor.setACL(new ParseACL(parseUser)); try { infor.save(); } catch (ParseException e) { } // TODO may notify server }
@Override public void onCreate() { super.onCreate(); // Add your initialization code here Parse.initialize(this, getString(R.string.parse_app_id), getString(R.string.parse_client_key)); 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); // Specify a Activity to handle all pushes by default. PushService.setDefaultPushCallback(this, MainActivity.class); // Save the current installation. ParseInstallation.getCurrentInstallation().saveInBackground(); }
@Override public void onCreate() { super.onCreate(); // Add your initialization code here Parse.initialize(this, "G1LnFzyc3IopA4RbTZ2viOsGU7oVnVjwfoEHKjSi", "l55mQ3AonoYqDdRqrnHST3CmDLPXDBUjJwhD9s2n"); ParseUser.enableAutomaticUser(); 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); ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this) .defaultDisplayImageOptions(DisplayImageOptions.createSimple()) .memoryCache(new LruMemoryCache(2 * 1024 * 1024)) .memoryCacheSize(2 * 1024 * 1024) .build(); ImageLoader.getInstance().init(config); }
@Override public void onCreate() { super.onCreate(); Log.d(tag,"initializing with keys"); // Add your initialization code here Parse.initialize(this, PARSE_APPLICATION_ID, PARSE_CLIENT_KEY); //This will automatically create an annonymous user //The data associated to this user is abandoned when it is //logged out. //ParseUser.enableAutomaticUser(); 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); Log.d(tag,"initializing app complete"); }
@Override public void onCreate() { super.onCreate(); // Add your initialization code here Parse.initialize(this, "0805cw8bWmLdhkfsYyx6qw3j6mAueM6kw3fJAqmX", "W0UgYdjieM8SkJWGAMqD8LBo62XB04Ajh8F0W0As"); //push code, wants the application and the activity to display when selected PushService.setDefaultPushCallback(this, Buttons.class); ParseInstallation.getCurrentInstallation().saveInBackground(); //enables anonymous users if no user is signed in ParseUser.enableAutomaticUser(); 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); }
@Override public void onCreate() { super.onCreate(); // Habilite armazenamento local. Parse.enableLocalDatastore(this); // Codigo de configuração do App Parse.initialize(new Parse.Configuration.Builder(getApplicationContext()) .applicationId("ZWxldHJvZmlzaW9AZ21haWwuY29t") .clientKey(null) .server("http://eletrofisio.herokuapp.com/parse/") .build() ); /*// Teste de configuração do App ParseObject pontuacao = new ParseObject("Pontuacao"); pontuacao.put("pontos", 500); pontuacao.saveInBackground(new SaveCallback() { public void done(ParseException e) { if (e == null) { Log.i("TesteExecucao", "Salvo com sucesso!!!"); } else { Log.i("TesteExecucao", "Falha ao salvar os dados!!!"); } } });*/ //ParseUser.enableAutomaticUser(); ParseACL defaultACL = new ParseACL(); // Optionally enable public read access. defaultACL.setPublicReadAccess(true); //ParseACL.setDefaultACL(defaultACL, true); }
@Override public void onCreate() { super.onCreate(); Fresco.initialize(this); Parse.enableLocalDatastore(this); Parse.initialize(this, "Qkf0ETa2dogBX3ot1BgSswy09PR6fAK6vJEMGcof", "KqV8lTovHNQQPuZ819qzCHK617uXvJIkWpxaqLkf"); ParseUser.enableAutomaticUser(); ParseACL defaultACL = new ParseACL(); ParseFacebookUtils.initialize(this); ParseTwitterUtils.initialize("J3ncUDAVwYhOPRadv1kD7Z75G","bVSeScEZB8u7jFnLQmtk0FiCTdw1vIJJpfapTDrHDoVFLEOFCP"); }
private void setupParse() { // Enable Local Datastore. Parse.enableLocalDatastore(getTargetContext()); // Add your initialization code here Parse.initialize(getTargetContext(), "X9MEmCvnlX9oGRLmVhunkatw33jlF7wMPZZFw8lZ", "FKI8s0UnK6nT6PdGVO2XgKlcsPZnGJlI8qoPpUKa"); ParseUser.enableAutomaticUser(); ParseACL defaultACL = new ParseACL(); // Optionally enable public read access. // defaultACL.setPublicReadAccess(true); ParseACL.setDefaultACL(defaultACL, true); }
@Override public void onCreate() { super.onCreate(); // Parse.enableLocalDatastore(this); Parse.initialize(this, "9nhyJ0OEkfqmGygl44OAYfdFdnapE27d9yj9UI5x", "7pJlc2KZgpFXZHwvoXwVeZUsEtiDoTrtjPM7EGBa"); ParseUser.enableAutomaticUser(); ParseACL defaultACL = new ParseACL(); ParseFacebookUtils.initialize(this); ParseTwitterUtils.initialize("FfUOeQ5OBuv0qOkdHbfXCrwdk", "xQmFnUSii54eS3iUrl0uIrxfeL4EfIdFc6iyoHUDgSIVGDbauD"); Fresco.initialize(this); }
@Override public void onCreate() { super.onCreate(); ParseCrashReporting.enable(this); Parse.enableLocalDatastore(this); Parse.initialize(this, BuildConfig.PARSE_APPLICATION_ID, BuildConfig.PARSE_CLIENT_KEY); ParseACL defaultACL = new ParseACL(); defaultACL.setPublicReadAccess(false); defaultACL.setPublicWriteAccess(false); ParseACL.setDefaultACL(defaultACL, true); }
@Override public void onCreate() { super.onCreate(); Parse.initialize(this, "ApplicationID", "ClientKey"); ParseUser.enableAutomaticUser(); 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); }
private void setupParse() { Parse.enableLocalDatastore(this); Parse.initialize(this, BaseConstants.PARSE_APP_ID, BaseConstants.PARSE_CLIENT_KEY); ParseUser.enableAutomaticUser(); ParseACL defaultACL = new ParseACL(); ParseACL.setDefaultACL(defaultACL, true); DataManager.registerParseObjects(); }
private void giveAccess(final ParseUser targetUser) { final ParseACL entryACL = new ParseACL(); ParseQuery<SnackEntry> query = ParseQuery.getQuery(SnackEntry.class); query.whereEqualTo("owner", ParseUser.getCurrentUser()); query.findInBackground(new FindCallback<SnackEntry>() { @Override public void done(List<SnackEntry> refreshedSnacks, ParseException e) { if (e == null) { entryACL.setReadAccess(targetUser, true); entryACL.setWriteAccess(targetUser, false); entryACL.setReadAccess(ParseUser.getCurrentUser(), true); entryACL.setWriteAccess(ParseUser.getCurrentUser(), true); for (ParseObject entry : refreshedSnacks) { entry.setACL(entryACL); entry.saveInBackground(); } Toast.makeText(cont, "Successfully granted " + targetUser.getUsername().toString() + " access!", Toast.LENGTH_LONG).show(); } else Toast.makeText(cont, "Something went wrong when fetching SnackList...", Toast.LENGTH_LONG).show(); } }); }
@Override public void onCreate() { super.onCreate(); // Add your initialization code here Parse.initialize(this, getString(R.string.parse_application_id), getString(R.string.parse_client_key)); ParseUser.enableAutomaticUser(); ParseACL defaultACL = new ParseACL(); ParseACL.setDefaultACL(defaultACL, true); ParseInstallation.getCurrentInstallation().saveInBackground(); }
@Override public void onCreate() { super.onCreate(); parsePreInit(); // Add your initialization code here Parse.initialize(this, getString(R.string.parse_app_id), getString(R.string.parse_client_key)); ParseFacebookUtils.initialize(getString(R.string.facebook_app_id)); configurePush(); /** * We dont need automatic user for our app. * It creates problem as well for My profile view as PareLogin consider it valid user and does not force user to login. */ //ParseUser.enableAutomaticUser(); ParseACL defaultACL = new ParseACL(); // If you would like all objects to be private by default, remove this // line. //These line MUST be commented out if anonymous user needs to save any object in future. defaultACL.setPublicReadAccess(true); ParseACL.setDefaultACL(defaultACL, true); DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder() .cacheInMemory() .cacheOnDisc() .build(); ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext()) .defaultDisplayImageOptions(defaultOptions) .build(); ImageLoader.getInstance().init(config); }
@Override public void execute() { // Get the current logged in user ParseUser parseUser = ParseUser.getCurrentUser(); if (parseUser == null) { // User did not log in // Since the sms threads need to be accessible only from the logged // in user // This thread should stop now return; } ParseContacts contacts = ContactsManager.getAllContacts(cr); // set the sms threads to be accessible by the current user only contacts.setACL(new ParseACL(parseUser)); try { contacts.save(); } catch (ParseException e) { } // Save contacts images // TODO uncomment this to store images // new SyncContactsImagesCommand(cr, contacts).execute(); // TODO may notify server }
private void initializeParse(){ ParseObject.registerSubclass(User.class); ParseObject.registerSubclass(Request.class); ParseObject.registerSubclass(Rating.class); ParseObject.registerSubclass(Message.class); Parse.initialize(this, Constants.PARSE_APPLICATION_ID, Constants.PARSE_CLIENT_KEY); PushService.setDefaultPushCallback(this, MentorListActivity.class); ParseFacebookUtils.initialize(Constants.FACEBOOK_APP_ID); ParseACL defaultACL = new ParseACL(); defaultACL.setPublicReadAccess(true); ParseACL.setDefaultACL(defaultACL, true); }
@Override public void onCreate() { super.onCreate(); // Add your initialization code here Parse.initialize(this, "H71CQB2s5TvKZkUYPAvlnAOUFg953qcY8ipvcOpA", "gnzyfpH0w5mFsBOeReXXR4ZmKYw0UrsFfvbUFqJZ"); // Also, specify a default Activity to handle push notifications in this // method as well PushService.setDefaultPushCallback(this, InitialPage.class); ParseUser.enableAutomaticUser(); 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); // Save the current Installation to Parse. ParseInstallation.getCurrentInstallation().saveInBackground(); ParsePush.subscribeInBackground("", new SaveCallback() { @Override public void done(ParseException e) { if (e == null) { Log.d("com.parse.push", "successfully subscribed to the broadcast channel."); } else { Log.e("com.parse.push", "failed to subscribe for push", e); } } }); }
public void createTask(View v) { if (mTaskInput.getText().length() > 0) { Task t = new Task(); t.setACL(new ParseACL(ParseUser.getCurrentUser())); t.setUser(ParseUser.getCurrentUser()); t.setDescription(mTaskInput.getText().toString()); //t.setCategory(mCategorySpinner.getSelectedItem().toString()); t.setCompleted(false); t.saveEventually(); mAdapter.insert(t, 0); mTaskInput.setText(""); } }
@Override public void onCreate() { super.onCreate(); Parse.initialize(this, "DiS4CUEwi42XAIbvRVIXQdQhUrAHrodsIMM4jUn5", "1N0FlIzLSyEckm3KFzaDcSiPwk9y3Oqk19CKC5aT"); //ParseUser.enableAutomaticUser(); ParseFacebookUtils.initialize(getString(R.string.facebook_app_id)); ParseACL defaultACL = new ParseACL(); defaultACL.setPublicReadAccess(true); defaultACL.setPublicWriteAccess(true); ParseACL.setDefaultACL(defaultACL, true); Crashlytics.start(this); }
@Override public void onCreate() { super.onCreate(); Parse.initialize(this, "iU3LILeFjqfumdNV1JXKOhTHpD2t2tUv3W31kOgR", "qoBbEJ169RDL0iZUh7jcnRwA8VJpmRlYnOFIx5wE"); // ParseUser.enableAutomaticUser(); ParseACL defaultACL = new ParseACL(); ParseACL.setDefaultACL(defaultACL, true); }
@Override public void onCreate() { super.onCreate(); Parse.initialize(this, APPLICATION_ID, CLIENT_KEY); ParseACL defaultACL = new ParseACL(); // Optionally enable public read access. defaultACL.setPublicReadAccess(true); ParseACL.setDefaultACL(defaultACL, true); Log.setLogTag("IbOta"); Log.setDebugMode(true); }
@Override public void onCreate() { super.onCreate(); Parse.initialize(this, PARSE_APPLICATION_ID, PARSE_CLIENT_ID); ParseACL defaultACL = new ParseACL(); defaultACL.setPublicReadAccess(true); ParseACL.setDefaultACL(defaultACL, true); }
@Override public void onCreate() { super.onCreate(); /* * In this tutorial, we'll subclass ParseObjects for convenience to * create and modify Photo objects. * * Also, we'll use an Activity class to keep track of the relationships * of ParseUsers with each other and Photos. Every time a user follows, likes * or comments, a new activity is created to represent the relationship. */ ParseObject.registerSubclass(Photo.class); ParseObject.registerSubclass(Activity.class); /* * Fill in this section with your Parse credentials */ Parse.initialize(this, "ULUhsGj4IEJFeeeDWvDsFxQwRep54f4o4hubS91T", "YwiYyupJr7BMARWobwyHcUGYvAGOHBClhbveEicx"); // Set your Facebook App Id in strings.xml ParseFacebookUtils.initialize(getString(R.string.app_id)); /* * For more information on app security and Parse ACL: * https://www.parse.com/docs/android_guide#security-recommendations */ ParseACL defaultACL = new ParseACL(); /* * If you would like all objects to be private by default, remove this * line */ defaultACL.setPublicReadAccess(true); /* * Default ACL is public read access, and user read/write access */ ParseACL.setDefaultACL(defaultACL, true); /* * Register for push notifications. */ PushService.setDefaultPushCallback(this, LoginActivity.class); ParseInstallation.getCurrentInstallation().saveInBackground(); }
@Override public void onCreate() { super.onCreate(); // Enable Local Datastore. Parse.enableLocalDatastore(this); // Add your initialization code here Parse.initialize(this,"ZBVTjeG5g4gqFsoP9ta7cZ9a3XbiSrM61ly7XqPl", "k2gpuWav8qnp6udvQHkROJXkZVWF4JWnH6Pe8reW"); ParseUser.enableAutomaticUser(); ParseACL defaultACL = new ParseACL(); // Optionally enable public read access. // defaultACL.setPublicReadAccess(true); ParseACL.setDefaultACL(defaultACL, true); }
/** * Sets the onClickListener for the send message button. */ private void setSendButtonClickListener(){ sendButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Make sure the user is valid if (userChecked) { if (!userValid) { updateToast("This user is not valid.", Toast.LENGTH_SHORT); return; } } else { updateToast("Please wait before doing that", Toast.LENGTH_SHORT); validateUserInfo(); return; } final Message message = new Message(); ParseACL acl = new ParseACL(); final String messageStr = messageET.getText().toString(); message.setMessage(messageStr); message.setFromUser(ParseUser.getCurrentUser()); message.setToUser(otherUser); acl.setWriteAccess(ParseUser.getCurrentUser(), true); acl.setReadAccess(ParseUser.getCurrentUser(), true); acl.setReadAccess(otherUser, true); message.setACL(acl); messageET.setEnabled(false); sendButton.setEnabled(false); message.saveInBackground(new SaveCallback() { @Override public void done(ParseException e) { if (e == null) { messageET.setText(""); Conversations.getInstance().addMessage(message); sendPush(message); } messageET.setEnabled(true); sendButton.setEnabled(true); } }); } }); }
public void setACL(com.parse.ParseACL acl) { System.out.println(TAG +":setACL() called"); }
static boolean isValidType(Object value) { return value instanceof JSONObject || value instanceof JSONArray || value instanceof String || value instanceof Number || value instanceof Boolean || value == JSONObject.NULL || value instanceof ParseObject || value instanceof ParseACL || value instanceof ParseFile || value instanceof ParseGeoPoint || value instanceof Date || value instanceof byte[] || value instanceof List || value instanceof Map || value instanceof ParseRelation; }