Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

PusherEvent push data in fragment twice

Đang mở
#272 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
22/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
android, java
Lĩnh vực
mobile, networking

Hướng nghiên cứu

The report is a user question about a Pusher client snippet inside an Android Fragment, not a described code change, and it has been silent for about six years. Start by checking whether connect(), subscribe() and bind() run more than once per event, for example on every onCreateView or onResume, and whether the earlier listener is ever unbound. Done would mean a reproduction that explains the duplicate log line, plus a maintainer or reporter confirmation of the cause.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

question

Below here my code inside fragment:

`options = new PusherOptions();
options.setCluster(cluster_pusher);

    pusher = new Pusher(key_pusher, options);

    pusher.connect(new ConnectionEventListener() {
        @Override
        public void onConnectionStateChange(ConnectionStateChange change) {
            Log.i("Pusher", "State changed from " + change.getPreviousState() +
                    " to " + change.getCurrentState());
        }

        @Override
        public void onError(String message, String code, Exception e) {
            Log.i("Pusher", "There was a problem connecting! " +
                    "\ncode: " + code +
                    "\nmessage: " + message +
                    "\nException: " + e
            );
        }
    }, ConnectionState.ALL);

    channel = pusher.subscribe(Config.TOPIC_GLOBAL);
    
      channel.bind(Config.PUSHER_EVENT, new SubscriptionEventListener() {
        @Override
        public void onEvent(PusherEvent event) {
            Log.i("Pusher", "Received event with data: " + event.getData());

}
});`

why?

Ngôn ngữ chính
Java
Star
315
Fork
140
Merge trung bình
11 ngày 5 giờ
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pusher/pusher-websocket-java

Tất cả issue của pusher/pusher-websocket-java

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.