0

No onDeviceFound() in AnnouncementHandler?

asked 2014-11-11 16:46:53 -0700

germanviscuso gravatar image

Hi.

I'm working with AllJoyn for Java and I saw that the interface AnnouncementHandler implements onAnnouncement() and onDeviceLost() but there's no onDeviceFound(). How am I supposed to get an announcement for a found device? Is it just coming through onAnnouncement()? I need some guidance on how to implement the code for a found device (because I must add them to a list when added and remove them from the same list when lost).

Thanks a lot!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-11-12 10:48:41 -0700

congngale gravatar image

updated 2014-11-12 10:53:25 -0700

Currently, the function onAnnouncement is work as an advance signal handler when it received a sessionless signal from daemon which is exactly onDeviceFound(as your thought) then forward it to all callback functions that have been registered to listen this signal.

I guess you want to know the existence of devices more sooner then you should read function Announce in AboutServiceImpl.java that is the first function will be called. But i think function announcement is enough soon to know a new device is existed and you can update your device list when you received an announcement.

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

Question Tools

Follow
1 follower

Stats

Asked: 2014-11-11 16:46:53 -0700

Seen: 69 times

Last updated: Nov 12 '14