setp1.
android的code
//做全域宣告
android的code
//做全域宣告
final ParseObject PurchaseHistoryTable = new ParseObject(
"PurchaseHistoryTable");
//設定要上傳的東西
PurchaseHistoryTable.put("PurchaseType", PurchaseType);
PurchaseHistoryTable.put("Quantity", Quantity);
....很多資料
//設定Progress
//由下面的progress可以得知是否上傳成功 以及拿到對應的udid
PurchaseHistoryTable.saveInBackground(new SaveCallback() {
public void done(ParseException e){
if (e == null){
Log.d("ParseFileTransfer", "Saved file successfully");
Log.d("id:"+PurchaseHistoryTable.getObjectId(), "Saved file successfully");
}
else{
Log.d("ParseFileTransfer"+e, "Could not save file");
}
}
});