本文整理汇总了Java中cn.bmob.v3.BmobInstallation.getQuery方法的典型用法代码示例。如果您正苦于以下问题:Java BmobInstallation.getQuery方法的具体用法?Java BmobInstallation.getQuery怎么用?Java BmobInstallation.getQuery使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cn.bmob.v3.BmobInstallation
的用法示例。
在下文中一共展示了BmobInstallation.getQuery方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sendReply
import cn.bmob.v3.BmobInstallation; //导入方法依赖的package包/类
private void sendReply(String installId) {
String installationId =installId;
BmobPushManager bmobPush = new BmobPushManager(CommentActivity.this);
BmobQuery<BmobInstallation> query = BmobInstallation.getQuery();
query.addWhereEqualTo("installationId", installationId);
bmobPush.setQuery(query);
PushMessage pm=new PushMessage(comment.getObjectId(),1);
JSONObject jsonObject=new JSONObject();
try {
jsonObject.put("alert",pm.alert);
jsonObject.put("tag",pm.tag);
jsonObject.put("type",pm.type);
bmobPush.pushMessage(jsonObject);
} catch (JSONException e) {
e.printStackTrace();
}
}
示例2: sendMessage
import cn.bmob.v3.BmobInstallation; //导入方法依赖的package包/类
/**
* 发送反馈信息给开发者
* @param message 反馈信息
*/
private void sendMessage(String message)
{
BmobPushManager bmobPush = new BmobPushManager(this);
BmobQuery<BmobInstallation> query = BmobInstallation.getQuery();
query.addWhereEqualTo("isDeveloper", true);
bmobPush.setQuery(query);
bmobPush.pushMessage(message);
saveFeedbackMsg(message);
}
示例3: push
import cn.bmob.v3.BmobInstallation; //导入方法依赖的package包/类
@OnClick(R.id.btn_push)
public void push() {
// BmobPushManager bmobPushManager = new BmobPushManager();
// bmobPushManager.pushMessageAll("HowieTian", new PushListener() {
// @Override
// public void done(BmobException e) {
// if (e==null){
// showToast("推送成功!");
// }else {
// showToast("异常:" + e.getMessage());
// }
// }
// });
String installationId = BmobInstallation.getInstallationId(this);
BmobPushManager bmobPushManager = new BmobPushManager();
BmobQuery<BmobInstallation> query = BmobInstallation.getQuery();
query.addWhereEqualTo("installationId", installationId);
bmobPushManager.setQuery(query);
bmobPushManager.pushMessage("推送检测成功!", new PushListener() {
@Override
public void done(BmobException e) {
if (e == null) {
showToast("推送成功!");
} else {
showToast("异常:" + e.getMessage());
}
}
});
}
示例4: pushCommit
import cn.bmob.v3.BmobInstallation; //导入方法依赖的package包/类
private void pushCommit(List<String> receivers) {
BmobPushManager bmobPush = new BmobPushManager(CommentActivity.this);
BmobQuery<BmobInstallation> query = BmobInstallation.getQuery();
query.addWhereContainedIn("installationId",receivers);
bmobPush.setQuery(query);
bmobPush.pushMessage(comment.getObjectId());
}