0
我試圖從Parse中檢索字符串對象。我能夠獲取對象 - 但只能在「完成」方法內。我希望將我檢索的數據發送到另一個函數\ class。我試圖在同一個類中使用一些不同的公共函數來完成此任務,或者甚至將該字符串保存在公共字段中,但是在回調完成的時候,數據保持空白。解析| findInBackground完成後無法保存檢索到的對象
我能做些什麼來保持檢索的數據?
這是我的代碼:
public void done(List<ParseObject> parseObjects, com.parse.ParseException e) {
if (e == null) {
'myFieldArray' = new String[parseObjects.size()][3];
String text = "";
int index =0;
for(ParseObject po : parseObjects){
text = po.getString("Fact");
Toast.makeText(context,theFact, Toast.LENGTH_SHORT).show();
'myFieldArray'[index][0] = text;
index++;
}
}