当前位置: 首页>>代码示例>>Java>>正文


Java ParsePush.setMessage方法代码示例

本文整理汇总了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();
    }
}
 
开发者ID:chechulinYuri,项目名称:stepout,代码行数:26,代码来源:ViewEventAsAuthorActivity.java

示例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();
}
 
开发者ID:NagabhushanS,项目名称:AmazingFriends,代码行数:12,代码来源:RecipientsActivity.java

示例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();
}
 
开发者ID:ldimitrov,项目名称:BurnMessenger,代码行数:13,代码来源:RecipientsActivity.java

示例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();
}
 
开发者ID:Shivam101,项目名称:ChitChat,代码行数:10,代码来源:RecipientsActivity.java


注:本文中的com.parse.ParsePush.setMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。