Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. private void getUserImages(final String selectedUserName) {
  2.  
  3. ParseQuery<ParseObject> query = ParseQuery.getQuery("Image");
  4.  
  5. query.whereEqualTo("username", selectedUserName);
  6.  
  7. query.findInBackground(new FindCallback<ParseObject>() {
  8. @Override
  9. public void done(List<ParseObject> objects, ParseException e) {
  10. if (e == null) {
  11. if (objects.size() > 0){
  12. //Do something
  13. }
  14. }
  15. }
  16. });
  17. }
  18.  
  19. public void onCreate() {
  20. super.onCreate();
  21.  
  22. Parse.enableLocalDatastore(this);
  23.  
  24. Parse.initialize(new Parse.Configuration.Builder(this)
  25. .applicationId("202ac01cxxxxxxxxxxa41d1136bc8a86213328b4")
  26. .clientKey("76b883b596xxxxxxxxxf60f9352fdb926dde46e")
  27. .server("http://ec2-xx-xx-xxx-59.us-east-2.compute.amazonaws.com:80/parse/")
  28. .build());
  29.  
  30. ParseACL defaultACL = new ParseACL();
  31.  
  32. defaultACL.setPublicReadAccess(true);
  33. ParseACL.setDefaultACL(defaultACL, true);
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement