本文整理汇总了Java中com.parse.ParseObject.deleteInBackground方法的典型用法代码示例。如果您正苦于以下问题:Java ParseObject.deleteInBackground方法的具体用法?Java ParseObject.deleteInBackground怎么用?Java ParseObject.deleteInBackground使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.parse.ParseObject
的用法示例。
在下文中一共展示了ParseObject.deleteInBackground方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onDialogClosed
import com.parse.ParseObject; //导入方法依赖的package包/类
@Override
protected void onDialogClosed(boolean positiveResult) {
super.onDialogClosed(positiveResult);
if(positiveResult){
try {
ParseQuery<ParseObject> query = ParseQuery.getQuery("Pings");
query.whereEqualTo("User", ParseUser.getCurrentUser());
List<ParseObject>pingsList = query.find();
for(ParseObject p : pingsList) p.deleteInBackground();
Toast.makeText(getContext(), R.string.PingsCleared, Toast.LENGTH_SHORT).show();
} catch (Exception e){
Toast.makeText(getContext(), R.string.UnableToClearPings,Toast.LENGTH_LONG).show();
}
}
}
示例2: deleteItem
import com.parse.ParseObject; //导入方法依赖的package包/类
private void deleteItem(ParseObject parseObject) {
parseObject.deleteInBackground(new DeleteCallback() {
@Override
public void done(ParseException e) {
if(e==null){
Toast.makeText(ActivityItemDetails.this, "Post Deleted!!", Toast.LENGTH_LONG).show();
deleted = true;
onBackPressed();
}
}
});
}
示例3: DeleteDataObject
import com.parse.ParseObject; //导入方法依赖的package包/类
public void DeleteDataObject(String className, String objectId, DeleteCallback callback) {
ParseObject object = ParseObject.createWithoutData(className, objectId);
object.deleteInBackground(callback);
}