[英]I Want to Use “Parse Notification” in my Android App
我在Google Play商店中發布了一個Android應用,我想添加“推送”通知。 我嘗試了Parse.com,並實現了本指南中提到的代碼。 當我嘗試發送測試推送時,Parse.com說:`沒有客戶訂閱廣播推送頻道。 請仔細檢查您是否已正確設置SDK。
另外,當我去解析雲時
控制台->推送通知->發送推送
解析說: Your application does not have any registered devices to which it can send notifications.
我確定我已經正確實現了所有代碼!
我認為您忘記了(因為錯誤消息告訴您)注冊了該設備!
ParseUser user = new ParseUser();
user.setUsername("jondoe");
user.setPassword("123456");
user.setEmail("jon@gmail.com");
user.signUpInBackground(new SignUpCallback() {
public void done(ParseException e) {
if (e == null) {
// Hooray! Let them use the app now.
} else {
// Sign up didn't succeed. Look at the ParseException
// to figure out what went wrong
}
}
@Override
public void done(com.parse.ParseException arg0) {
// TODO Auto-generated method stub
}
});
設備注冊完成后,系統知道向誰發送通知! 另外,在Parse.com儀表板的“數據瀏覽器”選項卡中,如果單擊左側的“安裝”,則必須看到一行。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.