Offline communication between Android and JavaScript web applications

I'm a newcomer to this whole scenario - I have a JavaScript web app up and running on a Windows 7 machine using Google Chrome, as well as an Android app. I'd like to establish an offline connection between the two to exchange data, keeping in mind that they'll both be connected to the same router or switch.

Unfortunately, changing the Windows 7 OS is not an option.

The burning question here is: what's the best web server for me to install in this case so that my web app (running on Chrome) and the Android app can communicate effectively?

Potentially workable solution:

  1. I'll go ahead and set up a Node.js server on the Windows machine, creating an event listener that will monitor a specific port within the local network for incoming or outgoing data.
  2. The Android app can then send new data directly to the designated port of the Node.js server, which will subsequently store the information.
  3. And lastly, my JavaScript web app in the Chrome browser can periodically query the local server operated by Node.js to check for any new data stored within it.

Answer №2

One way to easily share wifi connection between your Android phone and computer is by using wifi sharing apps. These applications facilitate the connection between the two devices via http protocol or by setting up an ftp server on either the PC or Android device.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Order a set of date strings in an array using JavaScript

Despite my attempts with underscorejs, I found that the min and max methods cannot handle strings as they return infinite. Is there a way around this limitation? Here is a sample array: dateData = ["26/06/2016", "04/06/2016", "13/05/2016", "20/07/2016"] ...

Problem with npm cache causing failure to rebuild the project

While working with Laravel 5.4 and Vue.js, I encountered a syntax error between the 'created' and 'methods' sections in my code. Although I initially fixed this error, it continued to persist. Even after restarting Apache, the error re ...

Retrieve the server code periodically and automatically refresh the form elements

Let's kick things off by explaining how the application functions: (please note there are multiple users on the page such as Patient M, Patient E, and so forth) 1) Check In: Next to Patient X's name, you will find a button labeled Check In. This ...

Determine the global upward direction of an object along any given axis in ThreeJS

I'm struggling to determine the exact rotation of my object around any given axis. Thus far, I've managed to find the relative rotation of my object using a specific method. To achieve this, I positioned a plane behind the object aligned with th ...

Decide on the javascript/jquery libraries you want to include

My app is experiencing slow loading times on the home screen and students using it from school district computers are running into ERR_CONNECTION_RESET errors due to strict firewalls. The excessive loading of javascript and jquery libraries in the head of ...

A technique to execute multiple Ajax calls simultaneously without having to wait for each one to finish in an onClick event

<html> <head></head> <body> <button onclick="ajaxcall()">Run the function</button> </body> <script> function ajaxcall() { $.ajax({ url: 'insertdata.php', ...

Prevent duplicate submissions by disabling the ASP.NET Forms button after it has been clicked

How can I disable an ASP.NET button after it's clicked to prevent double-clicking, and then enable it again after the submission is complete? I need some assistance with this. ...

Is it possible to have nullable foreign keys using objectionjs/knex?

It seems like I'm facing a simple issue, but I can't quite figure out what mistake I'm making here. I have a table that displays all the different states: static get jsonSchema() { return { type: 'object', propert ...

Troubleshooting AngularJS stateProvider functionality issues

I am new to angularjs. I am not getting any errors or results in my testing project below. index.html <html ng-app="UserAuth"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> ...

jQuery failing to trigger onClick event for a specific group of buttons

Javascript: <script> $(document).ready(function(){//Implementing AJAX functionality $(".acceptorbutton").on('click', function(){ var whichClicked = this.attr('name'); ...

Is the Facebook AJAX Permissions Dialog displayed outside of a Pop-Up?

I have conducted extensive research but have failed to find a clear answer to my query. Although there is plentiful information on Facebook API AJAX/PHP communication, I am unable to locate an example where the Permission Dialog for an app (showPermissionD ...

When using Node.js with Express and ssh2, my data structures remain intact without any resets when loading web pages

To display jobs sent by users to a cluster, the code below is used (simplified): var split = require('split'); var Client = require('ssh2').Client; var conn = new Client(); var globalRes; var table = [["Head_1","Head_2"]]; module.exp ...

Is your window.location.hash malfunctioning?

I am facing an issue with changing the background color of a <div id="services> when a specific link (index.html#services) is clicked. I have attempted to use the latest jQuery along with the jQuery Color plugin from jQuery Color. The code snippet I ...

The implementation of Async/Await in ASP.NET Core Controller Actions is not functioning as intended

Hello, I've encountered an issue with the code in my controller: [HttpGet] [Route("/Test")] public async Task<IActionResult> Test() { Console.WriteLine("foo"); await Task.Delay(2000); Console.WriteLine("bar"); return Ok(); } I ...

Creating a button that allows updates without refreshing the page can be achieved by implementing

Here are the items I have: <table> <tr> <th> id </th> <th> name </th> <th> update </th> </tr> <tr> ...

The specified package, [email protected], fails to meet the peerDependencies criteria set by its sibling modules

Encountering errors when attempting to run npm install. I'm puzzled why it's not working despite using the most recent version of React. npm ERR! peerinvalid The package <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail ...

Locked first row and first column in HTML table

I'm struggling with freezing the first row and column in an HTML file exported from Microsoft Excel. When attempting to add position:fixed; to achieve this, I noticed that it changes the size and alignment of the headers. Can someone please advise me ...

Guide to selecting a specific year on a calendar using Selenium with JavaScript

While attempting to create a Selenium test using JavaScript, I encountered an issue with filling in calendar data through a dropdown menu: const {Builder, By, Key} = require('selenium-webdriver') const test2 = async () => { let driver = awa ...

React - while the get request successfully retrieves the desired object, the corresponding value is appearing as undefined when integrated into the React component

While working on a practice problem, I encountered a puzzling situation. When I console log the response body of my GET request, it shows that I am successfully fetching the correct object. However, when I log the object in the component where the GET requ ...

Nextjs - resolving the issue of shopping carts displaying incorrect total amounts

I am currently facing an issue with the total cart amount while building a shopping cart. The problem arises when I visit the cart page as it only displays the amount of the last item added to the cart. state = { cart: { items: [], total: 0 }, }; ad ...