Java And Python Communication With Sockets -- Android studio and Eclipse to Python

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024

Комментарии • 73

  • @gratiel-ionutgradinarustud9994
    @gratiel-ionutgradinarustud9994 4 года назад +2

    Hello, i just finished my thesis, and in the thesis project i used a lot of info from this video, Thank you very much

  • @WER01O
    @WER01O 5 лет назад +7

    Hello! Thank you for your video. Is there a way to send a string from python and received it in android studio?

  • @timehrhardt8410
    @timehrhardt8410 3 года назад +1

    Hello, this is by far the most clear instruction and explanation of how to set up the sockets, so for that thank you! I am curious if there is an easy path to adding a receive message feature and displaying it on a TextView for example. I have tried and I have failed. Any help or direction would be great!

  • @zafirislam8178
    @zafirislam8178 3 года назад +1

    Very good tutorial, I love you thanks man svaed ma life

  • @jeffbourguignon
    @jeffbourguignon 3 года назад

    I was looking for that exactly! thank you so much ; )

  • @klimm.2935
    @klimm.2935 2 года назад

    Thanks so much!

  • @icarob-eng
    @icarob-eng 3 года назад

    I was hoping that video finally teaches me to receive packages in a Java client from a Python socket :(
    Everything I try don't work
    Anyways, is s good video :)

  • @israelsantandermendoza2145
    @israelsantandermendoza2145 5 лет назад

    this video helped me a lot thanks a bunch, i love you ,you are the best :D!

  • @viveksark
    @viveksark 5 лет назад +1

    Hello, this is a really good tutorial. Could you please tell me how to stream data from android (like sensor data) instead of sending a single message? Thanks again for the wonderful video.

    • @limeparallelogram7221
      @limeparallelogram7221  5 лет назад

      In theory, you should be able to keep on sending messages across indefinitely before your socket.close command. This is how I achieved something similar on my remote control boat project. How this helps and thanks again for your comment. 😁

    • @limeparallelogram7221
      @limeparallelogram7221  5 лет назад +2

      If you are still unsure, you should have a setup something like this.
      s = new Socket("tutorialspi",8000);
      while (message != "end") {
      //message = get sensor data
      pw = new PrintWriter(s.getOutputStream());
      pw.write(message);
      pw.flush();
      }
      pw.close();
      s.close();

    • @viveksark
      @viveksark 5 лет назад +1

      Thank you! Your earlier message solved it for me..! Thanks again.!

    • @viveksark
      @viveksark 5 лет назад +1

      Hello, could you do a tutorial on streaming video from raspberry pi to an android phone using image view in android please..?

  • @andrew.de.luca1236
    @andrew.de.luca1236 8 месяцев назад

    hey idk why but my sever get endless of empty msg from the java client even tho i dont have a code that send to the server msg. i also wrote a pyhton client and its ok its only the java. you know why maybe? i only wrote Socket s = new Socket(....)

  • @xbulletboi563
    @xbulletboi563 2 года назад

    Deprecated class AsyncTask unfortunately.

  • @ezazmiraj8869
    @ezazmiraj8869 3 года назад

    hello,is it possible to stream android camera feed to the python server?
    thanks in advance😁😁

  • @roeimegidish2642
    @roeimegidish2642 2 года назад

    Tjx

  • @alexluk9101
    @alexluk9101 5 лет назад +1

    Thanks. I have tried your code but it has this error: Caused by: android.system.ErrnoException: connect failed: ECONNREFUSED (Connection refused)
    Not sure if anyone is having the same issue.

    • @limeparallelogram7221
      @limeparallelogram7221  5 лет назад

      Thanks for your comment. First thing I would check is if you have added the correct lines to your manifest file.

    • @alexluk9101
      @alexluk9101 5 лет назад

      @@limeparallelogram7221 I have. And I have switched off mobile network to ensure only WiFi is used as well.

  • @vrabielucian2886
    @vrabielucian2886 3 года назад

    Hi, how can I sent a message from python server to java client?

  • @zivsion6345
    @zivsion6345 3 года назад

    I tried to press the buttons twice and I have an error "Cannot execute task: the task has already been executed (a task can be executed only once)"

    • @andrew.de.luca1236
      @andrew.de.luca1236 8 месяцев назад

      its been 3 years but its bc asynctask can only run 1 time the function doinbackground. so if you create an object of the class you will be able to eun in 1 time. thats wahy you want to do new MyClass().execute()

  • @danielramatladitebeila448
    @danielramatladitebeila448 6 лет назад

    Hi, is it possible to access the raspberry pi camera from the android client and view the live videos streams on the android?

    • @limeparallelogram7221
      @limeparallelogram7221  6 лет назад

      Thanks for your comment. In order to achieve any kind of reasonable frame rate, you would need to use the UDP protocol rater than through TCP. To achieve this, you could capture the image in python and send it over (without saving it) to the android. From there, you could set the image of an image view to the image that has just been received. Look at the code I have sent in reply to quốc huỳnh's comment if you are trying to send an image across. Hope this helps! 😊

  • @khizrumahmed4088
    @khizrumahmed4088 5 лет назад

    I'm trying to send my name from the app to the pc, but when I press send button nothing happens... Please help!

    • @limeparallelogram7221
      @limeparallelogram7221  5 лет назад

      Thanks again for your comment, did you dwnload the code from GitHub or copy it out, it sounds like you have not set the message variable to the editText.Text property. Hope this helps, If not could you send more details.

    • @khizrumahmed4088
      @khizrumahmed4088 5 лет назад

      @@limeparallelogram7221 I did both the approaches, I copied the code as well as download from GitHub, but I'm having the exact same issue

    • @limeparallelogram7221
      @limeparallelogram7221  5 лет назад

      Another thing may be the manifest file, check you have updated that with the following lines; can you confirm where the problem is (on the server or client)?

    • @khizrumahmed4088
      @khizrumahmed4088 5 лет назад

      I actually used another GitHub which worked, so I also tried to send data through your app to the server so prolly we have an issue there... On the working project the person used onclicklistener so I can share the link of the project that I used... Plus I wanna say my gratitude for responding to my queries :)

    • @limeparallelogram7221
      @limeparallelogram7221  5 лет назад

      OK, I am glad you solved your problem. The code in my video did use the onclicklistener but what matters is you got it working. 😆

  • @quochuynhag4094
    @quochuynhag4094 6 лет назад

    hello guy, can you send image from android to python?

    • @limeparallelogram7221
      @limeparallelogram7221  6 лет назад +1

      Thanks for your question. Yes that is possible, I will compile some code for you later today. I already have some code for python to python communication so adapting it for android shouldn't be too hard.😃

    • @quochuynhag4094
      @quochuynhag4094 6 лет назад

      can you share me your facebook or any social network to me can contact you?

    • @limeparallelogram7221
      @limeparallelogram7221  6 лет назад

      Sorry, I have no Facebook account but you can find me on twitter @LimeParallel1. I will share the code on RUclips comments so everyone can use it if necessary.😊

    • @quochuynhag4094
      @quochuynhag4094 6 лет назад

      could you share me your code? tks u

    • @limeparallelogram7221
      @limeparallelogram7221  6 лет назад

      I am very sorry, still working on it. I really hope to have something ready tonight but no promises. 😕

  • @ericandersonferreiradossan3925
    @ericandersonferreiradossan3925 2 года назад

    Thank U Verymuch!