Skip to main content
Known Participant
October 30, 2023
Question

LocalConnection between desktop app and android app

  • October 30, 2023
  • 2 replies
  • 269 views

I'm trying to do a LocalConnection between an application (.exe) file and an android application, I've tried almost every domain and I keep getting errors. What should I do?

    This topic has been closed for replies.

    2 replies

    kglad
    Community Expert
    Community Expert
    October 30, 2023

    localconnection is not supported on mobiles.

    JoãoCésar17023019
    Community Expert
    Community Expert
    October 30, 2023

    Hi.

     

    Can you provide details about the code you are using?

     

    Regards,

    JC

    Known Participant
    October 30, 2023

    Of course.

     

    SWF or Desktop Application:

    var test:LocalConnection = new LocalConnection;
     
    show_btn.addEventListener(MouseEvent.CLICK, showtest);
     
    function showtest(event:MouseEvent):void
    {
    test.send("_myConnection","game");
    }
     
    AIR:
    var test:LocalConnection = new LocalConnection;
    test.client=this;
    test.allowDomain("app#screen");
    test.connect("_myConnection");
     
    function game():void{
    test_txt.text="THIS IS A TEST."
    }
    kglad
    Community Expert
    Community Expert
    October 30, 2023

    again, localconnection is not supported on mobiles. ie, read the api.