parse.com을 사용하여 메시지 응용 프로그램을 개발하면 일부 데이터 센터 클래스가 파스 com에 있습니다.안드로이드 parse.com 연결 오류
사용자 정의 클래스 유형 인 경우 열의 데이터를 목록보기에 바인딩 할 수 있습니다. 클래스 유형 사용자 또는 설치, 내 데이터를 가져올 수 없습니다 및 listview 바인딩하십시오. 나는 이것에 대한 보안 규칙이 있다고 생각한다. 글쎄, 내가 어떻게 "사용자"및 "설치"클래스 유형에 대한 가치를 얻을 수 있습니까?
내 코드가 있는데 무엇을 추가 할 수 있습니까? 또한 당신은 당신의 자신의 설치 개체를 얻을 수 https://parse.com/questions/how-can-i-find-parse-users-that-are-facebook-friends-with-the-current-user
:
@Override
protected Void doInBackground(Void... params) {
// Locate the class table named "User" in Parse.com
ParseQuery<ParseObject> query = new ParseQuery<ParseObject>(
"User");
//query.orderByDescending("_created_at");
try {
ob = query.find();
} catch (ParseException e) {
Log.e("Error", e.getMessage());
e.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(Void result) {
// Locate the listview in listview_main.xml
listview = (ListView) findViewById(R.id.listview);
// Pass the results into an ArrayAdapter
adapter = new ArrayAdapter<String>(MainActivity.this,
R.layout.listview_item);
// Retrieve object "name" from Parse.com database
for (ParseObject users : ob) {
adapter.add((String) users.get("username"));
}
// Binds the Adapter to the ListView
listview.setAdapter(adapter);
// Close the progressdialog
mProgressDialog.dismiss();
// Capture button clicks on ListView items
listview.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
// Send single item click data to SingleItemView Class
Intent i = new Intent(MainActivity.this,
SingleItemView.class);
// Pass data "username" followed by the position
i.putExtra("username", ob.get(position).getString("username")
.toString());
// Open SingleItemView.java Activity
startActivity(i);
}
});
}
좋아, 내가 어떻게이 방법을 구현할 수 있습니다
다음 내가 할 새 프로필을 만들려면 : 여기
는 getProfiles에 대한 코드 (..)를인가? –