Jump to content


Photo

Simple third party send text


    4 replies to this topic

    #1 Rominet

    Rominet

      Newbie

    • Members
    • Pip
    • 1 posts

      Posted 22 February 2014 - 08:58 PM

      Hi,

       

      I would like to create a simple third party program that can send texts to windower so it would execute commands.

       

      Preferably in Java since i want to develop this communicating tool on Android.

       

      Is it possible ? and if so, would you happen to have an example or a project using this method of sending texts.

       

      Thank you in advance.


      • Wargasmic likes this

      #2 Wargasmic

      Wargasmic

        Newbie

      • Members
      • Pip
      • 3 posts

        Posted 02 June 2015 - 04:38 PM

        This would be a nice thing to have when ur not in game to be able to talk to ppl in a ls or something from the phone. 



        #3 Iryoku

        Iryoku

          Advanced Member

        • Windower Staff
        • 488 posts

          Posted 02 June 2015 - 09:41 PM

          This is possible. You would need to have something running on the PC with the game. Either an addon using the LuaSocket library, or an external tool using WindowerHelper. You're not going to find any examples though. Communication between your Android app and the addon/tool is outside the scope of our APIs, so you're on your own for that. Once you have that part worked out, actually sending a command to the game is trivial though.



          #4 gilles

          gilles

            Advanced Member

          • Members
          • PipPipPip
          • 35 posts
          • LocationCerberus

          Posted 03 June 2015 - 11:11 AM

          google provide a free way to do this : google developper console

           

          your third party app send a curl to android servers and your android app will receive a notification

          you need to use a TCP communication between your phone and your third party app to respond

           

           

          a good start here

           

          i got this working for FF14 but i'm stuck with decrypting dictionnary words ({Hello}...)

           

          i can push my work but you need to adapt for FF11



          #5 gilles

          gilles

            Advanced Member

          • Members
          • PipPipPip
          • 35 posts
          • LocationCerberus

          Posted 03 June 2015 - 10:54 PM



          just so you understand :
          - your app (apk) use google cloud messaging (gcm) and need to be registred, it's the api key (server key) and project id
          in google developper console, there is an expiration date but mine is still working 6 months after this expiration, this is why i think it's free to use, at leat for small use
          - each android device which has the apk register itself with google : it's the registration id (reg id) and is unique for each device
          your third party app need to send a notification with the server key and reg id to google servers
          google servers relay it to your android device and not another one
          (there is a way to send a notification to all devices with an app installed)
          getting the reg id of your android device is a big problem...

          let me talk of what is inside the archive :

          1/
          third party app to read chatlog (remember it's for FF14 and it's still unfinished)
          when a tell or a say is parsed, it use a curl command to send it to google servers (with your key and your reg id).
          of course, you need to change them in the code

          2/
          apk will get a notification

          to send a response, you can't use gcm because a third party app is still not "gcm friendly" : your apk need to send your response directly to your third party app
          so you need to use port forwarding in your router and make the third party app listen on this port
          in the code i provide, there are 2 ip adresses where i can choose to send response (because i can play in 2 places)
          of course, you need to change google project id and ip addresses in the code

          Look at the example i provide :
          1 : from game, i made a /say
              it's send to my phone
          2 : from game, i made a /tell to myself
              it's send to my phone
          3 : from my phone, i send to myself "ok"
              my phone send the message to third party app
              third party app send the message
          4 : since i send a message to myself, i receive a new /tell, and it's send again to my phone
           

           

          gcm.jpg


          It's just a proof of concept.
          I made this in 2 weeks from start : learning eclipse, java and i use a lot of code from google site.
          It's really a small job to make it work with FF11 and add others fonctionnalities (linkshell...)
           

          http://gilles.boulon...r/ff/14/gcm.rar

           

          i'm not working anymore on this but i can talk about it and the code.






          1 user(s) are reading this topic

          0 members, 1 guests, 0 anonymous users