New Android plugin - Wifi transfer

Support for Android version of Total Commander

Moderators: white, sheep, Hacker, Stefan2

User avatar
bgslvfmmto
New Member
New Member
Posts: 1
Joined: 2021-10-02, 09:04 UTC

Re: New Android plugin - Wifi transfer

Post by *bgslvfmmto »

Hello.

First of all I would like to thank you for your excellent software.

I noticed one little bug in "WiFi transfer" plugin. When accessing transferred files via a browser, the date/time format does not match the settings on the client side. Here are screenshots explaining the bug.
[img]https://i.ibb.co/dbYPgyy/Web-Tot-Wifi.jpg[/img]

Maybe there is a way for the browser to know the date and time format (and time zone) on the client side and then output the date/time of files and folders in that format? If there is no such way, is it possible to output the date/time in the format configured in Total Commander on the server side?

By the way, Total Commander on the client side shows the date/time of the transferred files correctly, according to Total Commander settings.
[img]https://i.ibb.co/vYXzK9H/Total-Wifi-Client.jpg[/img]

Thank you very much for your software.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 41712
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: New Android plugin - Wifi transfer

Post by *ghisler(Author) »

Unfortunately the server knows nothing about the locale on the client, so it sends the date and time using the language settings of the server. This is NOT the date format set by the user in Total Commander, it's the default date and time format for the language used in the WiFi transfer plugin user interface.
Author of Total Commander
http://www.ghisler.com
Bvo
Junior Member
Junior Member
Posts: 6
Joined: 2021-10-19, 17:27 UTC

Re: New Android plugin - Wifi transfer

Post by *Bvo »

Hi!
Thanks for great app, I have some questions about battery usage - from this point of view what's more efficient, Wi-Fi Direct server or Access Point?
And is there any difference what side should be made as server for upload/download, or both directions work equally for server on any side (from resourse usage perspective)?
Thanks.
User avatar
DrShark
Power Member
Power Member
Posts: 1869
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: New Android plugin - Wifi transfer

Post by *DrShark »

Bvo wrote: 2021-10-19, 18:02 UTCI have some questions about battery usage - from this point of view what's more efficient, Wi-Fi Direct server or Access Point?
My guess is that creation of WiFi Access Point should be more energy efficient because Wifi Direct server requies app to enable WiFi on device (which usually also makes device try to auto connect to saved WiFi hotspots).
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
Bvo
Junior Member
Junior Member
Posts: 6
Joined: 2021-10-19, 17:27 UTC

Re: New Android plugin - Wifi transfer

Post by *Bvo »

DrShark wrote: 2021-10-21, 14:15 UTC because Wifi Direct server requies app to enable WiFi on device (which usually also makes device try to auto connect to saved WiFi hotspots).
Without Wi-Fi turned on Access Point cannot work :-)
I'm not sure about initial scanning, but in any way I think it didn't eat much resources.
User avatar
DrShark
Power Member
Power Member
Posts: 1869
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: New Android plugin - Wifi transfer

Post by *DrShark »

Bvo wrote: 2021-10-21, 18:44 UTCWithout Wi-Fi turned on Access Point cannot work :-)
Technically WiFi is of course enabled when Accsess Point is created, and device gets so called "ap0" IP address, but in Android there is a difference in this case: normally you won't see "WiFi turned on" icon in Android Notification bar/drawer after access point creation. "WiFi turned on" icon in Android Notification bar/drawer usually means that the device is trying to or is connected to different access point which shares Internet, and gets so called "wlan0" IP address. On most of older Android devices "ap0" and "wlan0" addresses can't even co-exist.
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
User avatar
DrShark
Power Member
Power Member
Posts: 1869
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: New Android plugin - Wifi transfer

Post by *DrShark »

Wifi Transfer v.3.5 final has been submitted yesterday by Christian Ghisler to Google Play (where will be available there as soon as it will be approved, and it seems it is already available there). And and since today it is also available for direct download. Download links for both Google Play and direct download available on plugin page:
https://www.ghisler.com/androidplugins/wifi/

Important!
Google requires that since November 1, 2021 apps released/updated in Google Play must be compiled for Android API 30.
This has several restrictions. For example, apps compiled for API 30 cannot access /storage/emulated/0 any more unless they request a new permission: MANAGE_EXTERNAL_STORAGE. Only special types of apps like file managers or backup tools are allowed to use this permission.

The risk is high that Wifi Transfer plugin will not be accepted as an app that meets above categories.
It means that the last version of Wifi Transfer plugin released before November 1st, 2021 can be the last plugin version released in Google Play.

So if you'll encounter any plugin bugs, please try to report here or by Christian Ghisler's email mentioned on plugin page in Google Play before November
1st
(the risk is actually high also for other plugins and far from being zero even for Total Commander so reporting the bugs for them before mentioned date is appreciated as well).

Known issues:
1. Shared files/dirs count doesn't always reflect Started/Loaded/Unloaded state of server (note that STOP SERVER button doesn't unload the server completely but only disallows all new connections from the outside so currently active transfers can still finish. Switching away from plugin window turns off the server and stops all transfers).

2. Plugin doesn't create Home Screen shortcuts (while Total Commander does!) on Home screen of MIUI Desktop
(I can reproduce this with MIUI launcher 12.5.3 and Android 11 but Christian Ghisler cannot reproduce the problem on own devices, and logcat didn't help to find out the reason). Solution (only for devices with MIUI which have "Dual applications" feature, it also requires latest version 3.5 of WiFi Transfer plugin), step by step:
1) open Android Settings, Applications, Dual applications;
2) choose "Totalcmd-Wifi transfer";
3) in next dialog, if it will appear, confirm the creation of second space on device and cloning the app.
Now additional shortcut named "Totalcmd-Wifi Transfer" will appear on Home screen, it can have small overlay icon that indicates that it is an icon of cloned instance.
4) make a long tap on cloned "Totalcmd-Wifi Transfer" launcher icon, menu item named "DCIM: Send via WiFi" should appear.
5) make a tap on that "DCIM: Send via WiFi" menu item. This should open WiFi plugin server window which will share DCIM folder.
6) try to create the Home screen shortcut from plugin window now:
- press "Create link on desktop" button;
- Android's "create link on desktop" dialog should appear with deny and accept buttons, and deny on will have a timer.
Press the button which allows shortcut creation BEFORE timer will reach zero.
A shortcut with "DCIM" name and small overlay "cloned" status icon should appear on Home screen.
7) if Home Screen shortcut was successfully created in step 6, open original (not cloned) server instance of Wifi Transfer plugin
and try to create shortcut there: now this also should work fine.

Note that cloned instance currently doesn't work when started from original (not cloned) Total Commander, that's why in steps 4 and 5 we start server of the plugin's cloned instance from launcher.

Final build's
What's new:
• Support access points (both creation and connecting to) also on Android 8 and newer versions.

(complete What's new of v. 3.5 to 3.4 is now on plugin page)

More complete changelog of v. 3.5 final (changes from 3.5 beta 4):
Server side:
* Call wifiManager.startLocalOnlyHotspot on Android 8.0 or newer (API Version 26) to create WiFi Hotspot
* Added a menu item to the launcher icon to share the DCIM folder, the most common one to share (API 25 or newer)
* Stop button improvements (try to not disable it)
* Dialog improved which is shown when there is no WiFi connection:
  • it is shown in more cases where previously an app was just closed;
  • disabled "CONNECT TO WIFI NETWORK" button now reacts to device WiFi enabled->disabled or enabled->connected to SSID state;
  • prevent the dialog "No Wifi connection!" from opening multiple times on top of each other.
* Plugin no longer falls back to WiFi Direct Server creation after failed attempt to create an access point
* Droid Serif font is now used for password
* Taps outside of dialogs which appear on top of plugin window (except for progress dialogs) now treated as Cancel action
* Toast "Stopped" is now shown if to tap "Create link on desktop" or "URL" button when server is unloaded - they need it loaded to work
Client side:
* Use connectivityManager.requestNetwork on Android 10 (API 29) or newer to connect to access point
* Bind to local IP address of the network to which the hotspot is connected, this helps when we are connected to multiple networks at the same time
* Not only compare the SSIDs of the available networks, but also check whether we can reach the server IP address
* If we need to connect to a hotspot or wifi direct server, do this while still in the QR code scan dialog
* Request permissions for location and location+GPS (location services) when connecting to WiFi direct server
* Autofocus didn't work for camera wich supported it after a switch from camera which didn't support it
Other changes:
* When opened by Total Commander, plugin better picks up its theme (dark or light) (works best with Total Commander 3.24 final, which also has changes for this).
Last edited by DrShark on 2021-10-29, 13:30 UTC, edited 7 times in total.
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
Bvo
Junior Member
Junior Member
Posts: 6
Joined: 2021-10-19, 17:27 UTC

Re: New Android plugin - Wifi transfer

Post by *Bvo »

DrShark wrote: 2021-10-21, 20:07 UTC
So you think AP is more power efficient?
And any thoughts about server side? If I want to download files is there difference if source device is server or client?
User avatar
DrShark
Power Member
Power Member
Posts: 1869
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: New Android plugin - Wifi transfer

Post by *DrShark »

Found solution for issue with Home screen shortcuts not created by WiFi plugin on MIUI,
it is posted in updated post with announce of Wifi Transfer 3.5 final.

Bvo wrote: 2021-10-24, 08:35 UTCSo you think AP is more power efficient?
Yes, I think on many devices it should be.
Bvo wrote: 2021-10-24, 08:35 UTCIf I want to download files is there difference if source device is server or client?
Even if there is some (not sure about this), it shouldn't be significant as long as you'll stop server's or receiver's part after transfer operation:
* to stop server, press "STOP SERVER" button and then leave plugin window, server's plugin notification should disappear from notification bar and drawer;
* to stop client, on button bar of Total Commander find WiFi transfer plugin icon, tap it and choose "Disconnect", client's plugin notification should disappear from notification bar and drawer.
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
Post Reply