Off-Top-App / off-top-flutter

Repository for our mobile client application.
0 stars 2 forks source link

OT-34 | FE - Open a Websocket connection from Flutter.io to Java Spring #3

Closed frlzjosh closed 4 years ago

frlzjosh commented 4 years ago

What I Did: Established communication between Spring-Boot server and Flutter through a WebSocket.

How To Test:

  1. Go to off-top-flutter in your terminal and run flutter packages get to make sure you have all packages
  2. if everything goes well run flutter run and wait until the emulator loads Off-Top
  3. Now you will need to make sure your spring-boot server is running on OT-34 before proceeding.
  4. You will see a button that says to test the Go To WebSocket, click on it, and you will redirected to a new page in mobile app where you can now on "Send Data to Weboskcet" to see that data has been received. It should like the photo in Figure 1
  5. If you get the errors saying you're unable to connect to the websocket like the one in Figure 2 you will need to change line 15 to ws://10.0.2.2:8080/name

    Figure 1

    Screen Shot 2020-03-05 at 2 10 08 AM

Figure 2

port error

auhbz commented 4 years ago

What I Did: Established communication between Spring-Boot server and Flutter through a WebSocket.

How To Test:

  1. Go to off-top-flutter in your terminal and run flutter get packages to make sure you have all packages

**Should be flutter packages get (I think flutter pub get might also work)

auhbz commented 4 years ago

I might be missing something, let me know

auhbz commented 4 years ago

It works, looks good

frlzjosh commented 4 years ago

looks fine just add the websocket to a new page

I have made requested changes