I want to retrieve objects from parse that will be turned into an array. the Strings in the array will then go to a listview of dialog. I have been having problem getting the objects. Please help me out here.
Thank you very much.
This is the updated code:
    AlertDialog.Builder builderSingle = new AlertDialog.Builder(
                    AddSocialActivity.this);
            //builderSingle.setIcon(R.drawable.ic_launcher);
            builderSingle.setTitle("Select One Name:-");
            ParseUser currentUser = ParseUser.getCurrentUser();
            ParseQuery<ParseObject> query = new ParseQuery<ParseObject>("MyProfile");
            final String currentUserUsername = currentUser.getUsername();
            final ArrayList<String> myProfile = new ArrayList<String>();
            //query.whereContainsAll(currentUserUsername, myProfile);
            query.whereEqualTo("user", currentUserUsername);
            final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(
                    AddSocialActivity.this,
                    R.layout.select_dialog_singleitem, myProfile);
            //String profileName = ParseObject.getString("profileName");
            query.getFirstInBackground(new GetCallback<ParseObject>() {
                public void done(ParseObject object, ParseException e) {
                    if (object == null) {
                        //Log.d("score", "The getFirst request failed.");
                    } else {
                        arrayAdapter.add(object.getString("profileName"));
                    }
                }
            });
 
    