Why I always get NULL when using this BusSignal?

asked 2014-10-01 05:33:32 -0700

letingoo gravatar image

updated 2014-10-01 05:35:47 -0700

Code like that:

SignalEmitter emitter = new SignalEmitter(chatService, sessionID.value, SignalEmitter.GlobalBroadcast.On);
mClientInterface = emitter.getInterface(ChatInterface.class);

During the dubug,the mClientInterface always reads NULL.Why?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-10-01 16:05:47 -0700

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

My best guess is that the chatService object you are using has not implemented any Interfaces, IE it has no Proxy Object: https://git.allseenalliance.org/cgit/core/alljoyn.git/tree/alljoyn_java/src/org/alljoyn/bus/SignalEmitter.java

Without posting more code snippets it would be difficult to triage. I would start by looking at how you create and implement the chatService object.

Separate note, you are setting GlobalBroadcast.On AND using a sessionId. This should not be done, when using GlobalBroadcast the sessionId value should be set to 0. Further I would encourage you not to use a GlobalBroadcast.On as this will travel to all connected AllJoyn Routers. Either use a valid sessionId so that the signal travels to those on the same session OR use a sessionless signal and remove the logic of needing to join/bind from your application logic.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-10-01 05:33:32 -0700

Seen: 39 times

Last updated: Oct 01 '14