Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to detect phone plugged in #6

Closed
kimlimjustin opened this issue May 7, 2021 · 6 comments
Closed

Unable to detect phone plugged in #6

kimlimjustin opened this issue May 7, 2021 · 6 comments
Labels
All platform Issues on all platform bug Something isn't working help wanted Extra attention is needed

Comments

@kimlimjustin
Copy link
Owner

Currently, technology to detect USB Drives plugged in is by:

  1. Windows
    wmic logicaldisk get Caption,FreeSpace,Size,VolumeName,Description  /format:list
    
  2. Linux and Mac
    df -P | awk 'NR > 1'
    

However, those commands are unable to detect the phone when plugged in, and we need to find a new way to detect drives, using any programing language that can be plugged into node.js. Any comments will be appreciated :)

@kimlimjustin kimlimjustin added All platform Issues on all platform bug Something isn't working labels May 7, 2021
@kimlimjustin kimlimjustin added the help wanted Extra attention is needed label May 16, 2021
@rohanvh7
Copy link

Usb detection in browsers is considered security issue.What are your thoughts?

@kimlimjustin
Copy link
Owner Author

Usb detection in browsers is considered security issue.What are your thoughts?

Don't forget that you can also run native code on it. You can import c++ code using node_api. Indeed, there is already a feature on Xplorer implemented using c++, you can take a look at the code here.

In addition, Electron is not all about browser applications on the desktop. If it does, there will be no Xplorer at all, since you won't able to read files on the browser. Please differentiate between the node process and the browser process.

@rohanvh7
Copy link

Yes my bad! Thanks kim

@ctwhome
Copy link

ctwhome commented Dec 13, 2021

Usb detection in browsers is considered security issue.What are your thoughts?

Don't forget that you can also run native code on it. You can import c++ code using node_api. Indeed, there is already a feature on Xplorer implemented using c++, you can take a look at the code here.

In addition, Electron is not all about browser applications on the desktop. If it does, there will be no Xplorer at all, since you won't able to read files on the browser. Please differentiate between the node process and the browser process.

Hi, I am intrigued by the project. You mention that the browser can't read the files, but do you think the new File System Access API can change that? And maybe removing eventually the need to use any backend task to read/write files?

@kimlimjustin
Copy link
Owner Author

Hi, I am intrigued by the project. You mention that the browser can't read the files, but do you think the new File System Access API can change that? And maybe removing eventually the need to use any backend task to read/write files?

The simple answer is No. Besides writing and reading files, Xplorer also takes care of reading drives, disks, networks (in the future), and many others which File System Access API does not allow to afaik, besides, it's bad for UX when you download and app and it still asking you for those permissions.

@kimlimjustin
Copy link
Owner Author

Just an update, the technology to reading USB has changed as #173 get merged, but the issue still remains, I'll open another issue later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
All platform Issues on all platform bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants