Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

PusherEvent push data in fragment twice

Aperta
#272 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
22/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
android, java
Ambito
mobile, networking

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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?

Lingua principale
Java
Stelle
315
Fork
140
Merge medio
11g 5h
PR unite (30g)
4

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pusher/pusher-websocket-java

Tutte le issue di pusher/pusher-websocket-java

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.