Move massive data between Android and Node.js

I am currently working on an Android photo-taking app developed in React Native that needs to be paired with a React Electron gallery-type app on the user's computer. There is a requirement for transferring a large number of photos directly to the computer without using the Internet as an intermediary. Dealing with thousands of uncompressed and uncropped images poses a challenge. I have explored several options, but none seem to provide a satisfactory solution.

Past Attempted Solutions:

Node USB: Although Node USB seems suitable, its dependency on installing a driver on the user's computer creates accessibility issues with Windows USB drivers. Perhaps a method can be devised to switch drivers dynamically during the data transfer process?

ADB: While ADB performs the required functions, it necessitates enabling Dev Mode on the phone and exhibits compatibility problems with certain devices like the LG V20. Ideally, an alternative to ADB without these limitations would be ideal.

Alternative Approaches Considered:

  • WiFi Routing: Requires manual setup and relies on users having WiFi access at home, potentially causing network slowdowns during large file transfers.
  • Tether Routing: Restricted to phones with SIM cards and leads to all computer traffic being routed through the phone, impacting data caps.
  • Bluetooth: Offers slow data transfer rates compared to WiFi.
  • WiFi Direct: Promises high speeds but lacks necessary modules for implementation.
  • SD Card: Simple yet limited by client device compatibility.
  • Manual Transfer: Current method plagued by various issues requiring replacement.

Despite two months of research, a definitive solution has not been found. The complexities of USB communication between Android and PC highlight the need for a seamless, out-of-the-box solution. If you have encountered similar challenges or have innovative ideas to address this problem, your insights would be greatly appreciated.

Answer №1

For optimal performance when downloading large files on Android, it is advisable to utilize the Download Manager. This tool offers various built-in functionalities such as a progress bar and notifications, resulting in more efficient handling of download tasks by the operating system.

The React Native Fetch Blob library also provides support for this feature.

Answer №2

There is no need to route the data through the internet. Instead, you can simply exchange meta data online: Enhance your desktop app with folder-import capability (Connect your phone via USB, navigate to the folder, and import). During this process, have it inform a webservice (possibly push notifications?) about which files the desktop app has imported from which device (IDs, filenames, etc.), allowing the phone to receive this meta data and continue its operations!

Of course, the ideal solution would be a communication channel via USB. In the meantime, you could implement this temporary method.

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

Failure to acknowledge the incoming request

I'm currently working on developing a new app that involves logging in and authenticating users. I have experience with another app called "doctors" where I successfully utilized Mongoose, Passport, and Passport-Local modules to achieve the desired fu ...

"An issue with exceljs encountered while attempting to read a CSV file uploaded from a

There is an issue that occurs when attempting to parse a CSV file generated by Windows using exceljs. The error message that appears is: message: "Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/js ...

What is the best way to handle rejecting an invalid JSON body when working with Express or Body-Parser?

I'm currently developing an application that strictly accepts a JSON body type. I am utilizing body-parsers and express for this purpose. However, the recurring issue I encounter is that when an invalid JSON body is sent, my program throws back an und ...

Difficulty in Retrieving Value in Node.js

I am encountering a problem with returning a value. Below is the function that I'm using to return a value: async function createOrderId(bizId) { const CustomerOrderModel = require('../models/CustomerOrder'); try { var biz_ ...

The container process could not be initiated because the executable file "npm run start" was not found in the $PATH

I've successfully containerized an application, complete with its own Dockerfile: FROM front-end-base:latest COPY ... /app/... ... EXPOSE 5000 RUN cd /app CMD ["npm run start"] The front-end-base image includes Node, NPM, Yarn, and a few ot ...

I'm curious if the response order will mirror the URL order in my situation

QUERY: Upon reviewing the following link: Promise.all: Order of resolved values I am doubtful about its relevance to my specific scenario. Can I always expect responses to be in the same order as urls? EXAMPLE: var urls = []; for (var i = 0; i < d ...

Is the javascript function I created not recognized as "a function"?

A small .js file containing 3 functions for easy in-site cookie management was created. Below is the source code: // Create Cookie function Bake(name,value) { var oDate = new Date(); oDate.setYear(oDate.getFullYear()+1); var oCookie = encodeURIComponent(n ...

I'm facing the challenge of trying to work on an Angular project without access to the node_modules folder, and unfortunately, I

Error report regarding npm resolution While resolving: [email protected] Found: @angular/[email protected] node_modules/@angular/common @angular/common@"^14.2.12" from the root project Could not resolve dependency: peer @angular/commo ...

The error message "E/Web Console(8272): Uncaught ReferenceError: functionName is not defined:1" popped up when trying to load web views within a

I'm working on incorporating webviews into a view pager. public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = null; v = inflater.inflate(R.layout.webview_l ...

Is it necessary to run npm install when a package does not have any dependencies?

If I have an npm package that contains all its dependencies bundled into one file using webpack, and I unpack it into the directory ./my-awesome-package/, should I still run npm install ./my-awesome-package/? I am aware of being able to specify preinstall ...

Module '../../third_party/github.com/chalk/supports-color' not found in the directory

Within my tutoring-frontend-main project folder There is a file named package.json { "name": "app-frontend", "version": "0.0.0", "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build --prod", "test": "n ...

A guide to understanding and working with signed cookies in Express

Sending a front-end cookie through express: // generating the token static generateToken(user: PartialUser): Cookie { return jwt.sign({ _id: user._id }, process.env.JWT_TOKEN_KEY, { expiresIn: "14d", }); // sending the cookie ...

Error Message: Undefined Constructor for Firebase Google Authentication

Hey there! I've been working on integrating Firebase google authentication into my project. Unfortunately, I encountered an error while testing it out. Here's the error message that appeared in the console: Uncaught (in promise) TypeError: Cannot ...

sending a collection of image data arrays wrapped in FormField objects from Angular to Express

I am facing a challenge while trying to upload two FormField objects along with form data to express. I am having trouble using the multer library in express to extract this data from the request. While I can access the form data, the FormField objects re ...

Tips for uploading a file in LimeSurvey

Recently, I have been utilizing the Limesurvey API to develop a survey mobile application. One issue that I have encountered is that while I am able to successfully use all APIs, I consistently face difficulties when attempting to upload a file as it alway ...

Error message appears when attempting to submit a form with empty values in NodeJs

I need help troubleshooting a display error that occurs when setting empty values in form fields. When I delete the row with res.redirect('/') and then attempt to register, if I refresh the page later, an error appears. However, if I keep this re ...

After retrieving parameters from the URL, the prior URL remains when I use res.render to load the page

When the task is to retrieve a product based on its product_id, for example hitting localhost:8080/products/44566 should respond with the product page for the specific product with the id 44566. In the Home page where products are displayed and clicking o ...

React Navigation error: The variable `isSelectionModeEnabled` cannot be found

I integrated React Navigation in my react-native application and followed the guidelines provided at https://reactnavigation.org/docs/custom-android-back-button-handling/ to customize the behavior of the Android back button. This is the snippet I used for ...

The command 'nvm' is not recognized

After attempting to install nvm using the command wget or curl on OS X El Capitan 10.11.4, the console displayed the following: -bash: nvm: command not found

...

AngularYelp: Node Integration for Enhanced Functionality

Embarking on a new learning journey here, so please bear with me... Discovered node-yelp while browsing Yelp's API docs. Check it out here. // Request API access: http://www.yelp.com/developers/getting_started/api_access var Yelp = require('yel ...