本文整理汇总了Java中com.parse.ParsePush.setMessage方法的典型用法代码示例。如果您正苦于以下问题:Java ParsePush.setMessage方法的具体用法?Java ParsePush.setMessage怎么用?Java ParsePush.setMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.parse.ParsePush
的用法示例。
在下文中一共展示了ParsePush.setMessage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removeEventStatus
import com.parse.ParsePush; //导入方法依赖的package包/类
@Subscribe
public void removeEventStatus(String status) {
Util.dismissLoadingDialog();
if (status.equals(DataExchange.STATUS_REMOVE_SUCCESS)) {
Toast.makeText(getApplicationContext(), getResources().getString(R.string.remove_success), Toast.LENGTH_LONG).show();
PushService.unsubscribe(getApplicationContext(), DataExchange.PREFIX_FOR_CHANNEL_NAME + currentEvent.getHash());
ParsePush push = new ParsePush();
ParseQuery pushQuery = ParseInstallation.getQuery();
pushQuery.whereNotEqualTo("installationId", ParseInstallation.getCurrentInstallation().getInstallationId());
pushQuery.whereEqualTo("channels", DataExchange.PREFIX_FOR_CHANNEL_NAME + currentEvent.getHash());
push.setQuery(pushQuery);
push.setMessage(getString(R.string.author_deleted_event, android.text.format.DateFormat.format("dd.MM.yy hh:mm", currentEvent.getDate())));
push.sendInBackground();
Intent intent = new Intent(this, MapsActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
} else if (status.equals(DataExchange.STATUS_REMOVE_FAIL)) {
isRemovingProcess = false;
Toast.makeText(getApplicationContext(), getResources().getString(R.string.some_error), Toast.LENGTH_LONG).show();
}
}
示例2: sendPushNotifications
import com.parse.ParsePush; //导入方法依赖的package包/类
protected void sendPushNotifications() {
ParseQuery<ParseInstallation> query = ParseInstallation.getQuery();
query.whereContainedIn(ParseConstants.KEY_USER_ID, getRecipientIds());
// send push notification
ParsePush push = new ParsePush();
push.setQuery(query);
push.setMessage(getString(R.string.push_message,
ParseUser.getCurrentUser().getUsername()));
push.sendInBackground();
}
示例3: sendPushNotifications
import com.parse.ParsePush; //导入方法依赖的package包/类
protected void sendPushNotifications(){
//Parse installation object is used to associate users and send pushes only to intended users.
ParseQuery<ParseInstallation> query = ParseInstallation.getQuery();
query.whereContainedIn(ParseConstants.KEY_USER_ID, getRecipientIds());
//send the push notification
ParsePush push = new ParsePush();
push.setQuery(query);
push.setMessage(getString(R.string.push_message,
ParseUser.getCurrentUser().getUsername()));
push.sendInBackground();
}
示例4: sendPushNotifications
import com.parse.ParsePush; //导入方法依赖的package包/类
public void sendPushNotifications()
{
ParseQuery<ParseInstallation> pushQuery = ParseInstallation.getQuery();
pushQuery.whereContainedIn(Constants.USER_ID, getRecipientIds());
ParsePush push = new ParsePush();
push.setQuery(pushQuery);
push.setMessage(getString(R.string.message_notification,ParseUser.getCurrentUser().getUsername()));
push.sendInBackground();
}