Java 类com.parse.SendCallback 实例源码

项目:Oy    文件:OyUtils.java   
public static void sendOy(String username, SendCallback callback) {
    try {
        String message = "From " + ParseUser.getCurrentUser().getUsername().toLowerCase();
        JSONObject data = new JSONObject("{\"action\": \"mohammad.adib.oy.UPDATE_STATUS\",\"alert\": \"" + message + "\"}");
        // Send push notification to query
        ParsePush push = new ParsePush();
        push.setChannel(username);
        push.setData(data);
        push.sendInBackground(callback);
    } catch (Exception e) {

    }
}