<div dir="ltr">Hello all again, <div><br></div><div>I've just restored the old implementation and also keep the bonjour service available for Mac OSX as an extra. </div><div><br></div><div>I've done several tests today and I've found that the old implementation indeed works under certain conditions, so I've restored it. However, it only seems to work when the LibreOffice instance is already launched on the PC and only then, when we start the android app, we can see that. And when we close the LibO instance, it doesn't disappear either. Anyway, I think it would be great to make android app compatible with the avahi/bonjour service (not really sure if that's possible) so that we can get it to work more reliably not the other way around... </div>


<div><br></div><div>Also, I've had some troubles compiling DiscoveryService.cxx with avahi in it, it seems that I need to pass in some flags for this to work. I've tried to put this in the sd/Library_sd.mk</div><div>

<br></div><div>    sd/source/ui/remotecontrol/DiscoveryService, \</div><div>    -lavahi-common \</div><div>    -lavahi-client \</div><div>    -fpermissive \</div><div><br></div><div style>but it doesn't seem to work ... any helps on how to pass flags in .mk files? </div>

<div style><br></div><div style><br></div><div style>Cheers, </div><div style>Siqi </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/7/20 Siqi Liu <span dir="ltr"><<a href="mailto:me@siqi.fr" target="_blank">me@siqi.fr</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello all,<div><br></div><div><span></span>Sorry if I've broken something unexpectedly :P Actually I've commented the current implementation out since it doesn't seem to work during my tests with the android app... I mean, the auto discovery for Bluetooth connections works well but the one with WiFi doesn't seem to work for me (correct me here since I've done the tests before the gsoc actually, maybe I've missed something :-P). Also need confirmation from Ahunt (I've cc Ahunt also), since he has implemented this part I guess. Do let me know if it works in your tests, in that case I will try to put them back to keep it compatible with older implementation.  </div>


<div><br></div><div>Concerning the backward compatibility, it doesn't seem to be an issue for now because I've basically replaced some code that doesn't seem to work (for me) with a new version backed by Bonjour/Avahi service, but in case it prevents some functionalities to work, please let me know ^^. <div>


<br></div><div>On the server end, what I've done for now is: </div><div><br></div><div>    1. Bonjour service publishing for Mac OSX</div><div>    2. I've add some code to handle pointer feature, which follow the protocol like this:</div>


<div>                     pointer_coordination\nx\ny\n\n, where x and y are in percentage (0-1), taking upper left corner as the origin. </div><div>    3. Try to correct the bug which gives the remote control false currentSlideIndex in the "presentation_started" message</div>


<div><br></div><div>What I'm doing now: </div><div>    1. Implement Avahi service publish for Linux and Bonjour for Windows build. Still need a lot of research here :-P</div><div><br></div><div>
What I've wanted to do but failed:</div><div>    1. Draw a point on the running slideshow (like the pen feature), based on the "pointer_coordination x y" command. I've tried to find out how to do some drawing on the canvas but I didn't really understand the code there... not sure if we can add a small red rectangle and move that to the position corresponding to the "pointer_coordination", for now it just prints out the coordination received. </div>


<div>    2. The problem with currentSlideIndex seems to take place whenever we connect the PC to an external display and we start a presentation for middle. The remote app will always receive 0 instead of the real "currentSlideIndex". The reasons, as far as I know, is related to the UpdateCurrentSlide(0); in sdext/source/presenter/PresenterController.cxx. Actually every time we launch the presentation, the thread which initiate the presenter will reset currentSlide to 0 due to some reasons (don't know why we need to UpdatecurrentSlide(0);) and the thread which sends "presentation_started" to the remote will ask for the currentSlideIndex after that, so it gets 0. </div>


<div>What would be great to improve on the server-end: </div><div>    1. Add some version information during the hand-shake phase. </div><div>    2. Add some screen size information (or just small, medium, big flags) during the handshake, so that we can modify the preview size in the ImagePreparer.cxx accordingly. In case when I build the iPad version of the app, we will have some beautiful previews pictures instead of an over-enlarged one...</div>


<div><br></div><div>On the android end, it seems that it's also possible to benefit from the Bonjour Service discovery <a href="http://developer.android.com/training/connect-devices-wirelessly/nsd-wifi-direct.html" target="_blank">http://developer.android.com/training/connect-devices-wirelessly/nsd-wifi-direct.html</a> maybe this can help ^^ But if the old implementation of WiFi auto-discovery works already on your device, I will try to restore it so that we don't need to change anything on the android app. </div>


<div><br></div><div>All the best! and Happy Coding!</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Siqi</div></font></span><div><div class="h5"><div><br>On Saturday, July 20, 2013, Michael Meeks  wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

Hi guys,<br>
<br>
On Sat, 2013-07-20 at 03:11 +0300, Artur Dryomov wrote:Hi guys,<br>
> I noticed your commit which comments the current discovery service and<br>
> replaces it with the Bonjour calls. Probably it is not a great idea —<br>
> I mean commenting the current version — because it will break all<br>
> Android applications which expect to get responses from server.<br>
<br>
        First - Siqi - just to say I've been really impressed with your<br>
work :-) it's great to see the iOS remote looking so nice & making good<br>
progress.<br>
<br>
>  Or I just don’t understand the idea? I thought Bonjour could work for<br>
> OS X as an addition and not as a replacement.<br>
<br>
        I guess we would want to add Bonjour support for all platforms (perhaps<br>
via some cleanish platform abstraction ?) since the iOS remote really<br>
has to use WiFi / Bonjour IIRC to work.<br>
<br>
        Siqi - clearly we want to keep back-wards compatibility; though my<br>
greatest concern is only one-directional: IMHO it is trivial for people<br>
to update their remote on their mobile: it's a tiny app and updates in a<br>
few tens of seconds, also I think we can expect them to test that before<br>
they present (at least after a LibreOffice upgrade). So - we should put<br>
most effort into making sure that newer remotes talk to older<br>
libreoffice's - rather than the other way around :-)<br>
<br>
> It would be great to hear Michael’s thoughts. Should we CC the devs<br>
> list ?<br>
<br>
        Yes of course; I've added that :-)<br>
<br>
>  I also thought to place all protocol-related changes to Gerrit and<br>
> discuss them there because it is really easy to break things. Does it<br>
> sound reasonable?<br>
<br>
        Well - I'd hate to slow Siqi down - it's great to see the native code<br>
progressing there - but I guess agreeing the compatibility rules before<br>
we get going is prolly a good idea.<br>
<br>
        HTH,<br>
<br>
                Michael.<br>
<br>
--<br>
<a>michael.meeks@suse.com</a>  <><, Pseudo Engineer, itinerant idiot<br>
<br>
</blockquote></div>
</div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>--------</div><div><br></div><div>Cordialement,</div>Siqi LIU<div><br><div>Étudiant Ingérieur, Université de Technologie de Compiègne<br><div>

Vice-Président de l'association robotique UTCoupe</div></div><div>Responsable d'atelier de ClubChine</div></div><div><br></div><div>------</div><div>  Tel. +33 7 61 16 95 83<br></div><div>  email: <a href="mailto:me@siqi.fr" target="_blank">me@siqi.fr</a></div>

<div>------</div></div>
</div>