SMB Manager extension Version 2

4,472 views
Skip to first unread message

Jörg Hüneburg

unread,
Apr 16, 2017, 6:12:38 PM4/16/17
to mitappinv...@googlegroups.com
Since my last post got closed somehow, I will post the update to my extension in this new thread.

Version 2

  • added Download method
  • added Delete method
  • added FileSize method
  • added TestSpeed method (just for testing purposes which buffer size to use. You can leave it as it is.)

Please test and report back. It took some time to get a decent download speed, it's now nearly as fast as other file explorers with SMB on android.
I'll try to add Tim's suggestion next, opening files in the shared folder with the activity starter. If you have any other suggestions, feel free to ask:-)


Happy inventing!
com.melikeymedia.SMBManager.aix
Blocks_SMBManager.png

ENFANDROID

unread,
Apr 17, 2017, 2:42:34 AM4/17/17
to MIT App Inventor Forum
Thank you to plug your sample source. Thank yo

Jörg Hüneburg

unread,
Apr 17, 2017, 3:47:16 AM4/17/17
to MIT App Inventor Forum
Sorry, I don't understand. What do you mean with "plug source"?

Taifun

unread,
Apr 17, 2017, 10:13:59 AM4/17/17
to MIT App Inventor Forum
Since my last post got closed somehow, I will post the update to my extension in this new thread 
thank you Jörg...
threads automatically will close after a few days in case there is no activity anymore...
Taifun

Jörg Hüneburg

unread,
Apr 17, 2017, 11:09:59 AM4/17/17
to MIT App Inventor Forum
Thanks for adding the link in the old post😊

Taifun

unread,
Apr 17, 2017, 4:16:09 PM4/17/17
to MIT App Inventor Forum
are there any preconditions to be able to use this extension?
will it work for Windows 10? will it work in the companion app?


in the GotContent event I only receive the text "error"...

this is the logcat output


Taifun

Jörg Hüneburg

unread,
Apr 17, 2017, 4:24:19 PM4/17/17
to MIT App Inventor Forum
It should work on Windows 10, couldn't test though.
The only precondition is write access for the authorized user. Could be problematic if it's a public share with no user authorization.

Your URL is wrong, it should be in this format:
/SERVERIP/FOLDER/

The same for uploading, for downloading just add the filename.

Sorry, I thought I had added the used format in the description of the blocks. Maybe I missed it, I'll check later when I have computer access

Taifun

unread,
Apr 18, 2017, 4:30:35 PM4/18/17
to mitappinv...@googlegroups.com
thank you Jörg
meanwhile I was successful using this path

however let me suggest you to add some error handling and provide a better error message...
there can be an error like

or also


Taifun

Jörg Hüneburg

unread,
Apr 18, 2017, 4:35:09 PM4/18/17
to MIT App Inventor Forum
Thanks for testing, glad it worked😊.

I thought the same, I will add error message handling to this method and check the others too.

Thanks for the feedback, I need testers😊

Taifun

unread,
Apr 18, 2017, 4:57:16 PM4/18/17
to MIT App Inventor Forum
trying to upload an image taken by the camera results in error, see screenshot, an empty file is created in Windows

it seems to be, full paths are not accepted...
using path as shown in your screenshot results in no error, and an empty file in Windows, AfterUpload event does not fire...

Taifun

Jörg Hüneburg

unread,
Apr 18, 2017, 5:04:37 PM4/18/17
to MIT App Inventor Forum
OK, so to be better compatible with other components I should probably implement a check so full paths get accepted too.

Did I understand that right, uploading doesn't work with the right paths, it just creates an empty file?
I guess your user has write access to the shared folder? Is this Windows 10?

SteveJG

unread,
Apr 18, 2017, 5:05:54 PM4/18/17
to MIT App Inventor Forum
@Taifun    the path you used  192.168.0.106/Office  ; is that your IPv4 address plus a directory name or what?  

Thanks.

--Steve

Taifun

unread,
Apr 18, 2017, 5:06:08 PM4/18/17
to MIT App Inventor Forum
Did I understand that right, uploading doesn't work with the right paths, it just creates an empty file? 
correct

I guess your user has write access to the shared folder? Is this Windows 10?
yes and yes

Taifun

Jörg Hüneburg

unread,
Apr 18, 2017, 5:32:15 PM4/18/17
to MIT App Inventor Forum
I'll check into it. Do you have a logcat for upload too by any chance?

Taifun

unread,
Apr 18, 2017, 5:34:42 PM4/18/17
to mitappinv...@googlegroups.com
 the path you used  192.168.0.106/Office  ; is that your IPv4 address plus a directory name or what?  
this is the IP address of my Windows 10 computer in the local network followed by a shared folder name, this remote path worked fine to get a list of available directories of the remote computer...

Taifun

Taifun

unread,
Apr 18, 2017, 5:49:42 PM4/18/17
to mitappinv...@googlegroups.com
'll check into it. Do you have a logcat for upload too by any chance?
here is the logcat output
1) for the full filename

2) for the reduced filename (not much to see)

example project attached

Taifun


smb_joerg.aia

SteveJG

unread,
Apr 18, 2017, 5:50:37 PM4/18/17
to MIT App Inventor Forum
Thanks...that is what I though I was using.  So far it ist not working.   I will see if the folder is really shared.

--Steve

Taifun

unread,
Apr 18, 2017, 5:54:09 PM4/18/17
to MIT App Inventor Forum
Thanks...that is what I though I was using.  So far it ist not working.   I will see if the folder is really shared.
@Steve: it is important to add a slash in the end like this 


Taifun

Taifun

unread,
Apr 18, 2017, 6:02:11 PM4/18/17
to MIT App Inventor Forum
as already said, to get a directory list works fine
however in logcat there is also this System.err reported...


Taifun

SteveJG

unread,
Apr 18, 2017, 6:02:35 PM4/18/17
to MIT App Inventor Forum
@Taifun    OK... I got the slash at the end and I have my IP address and  a shared folder ...still not working.  Perhaps my firewall is blocking.
Appreciate your advice.   I will try to work this out later.  Thanks.

-Steve

Jörg Hüneburg

unread,
Apr 19, 2017, 5:29:49 AM4/19/17
to MIT App Inventor Forum
Thanks Taifun and Steve for testing.

The last one isn't an error, I had the log level set higher.

My mistake was doing most of the testing with a Linux smb share on which everything runs smoothly.

I guess download doesn't work either?

I'll do some testing in the next couple of days and publish a new testing version

SteveJG

unread,
Apr 19, 2017, 9:22:02 AM4/19/17
to MIT App Inventor Forum
@Jorg           Do I have to fill in the password and user name?    I used what should have worked if a password is required .  I entered the info using blocks  and also using the Designer Properties.  I still cannot connect to what Win10 says is a SHARED folder.   What I get is error.

I will put this away for the moment and wait for your next version.  This seems so simple.  Thanks.

-- Steve

Taifun

unread,
Apr 19, 2017, 9:56:43 AM4/19/17
to MIT App Inventor Forum
Do I have to fill in the password and user name?
try your Windows user login name and corresponding password

I guess download doesn't work either?
this is the result





Taifun

Jörg Hüneburg

unread,
Apr 19, 2017, 10:14:22 AM4/19/17
to MIT App Inventor Forum
@Steve usually you have to put in username and password of a user which exists on the remote pc and is authorized for that share.

@Taifun thanks, seems to be the same error as with uploading.


For now it seems my extension ONLY works with Linux systems🙁.
I'll try to fix it ASAP and get back to you for testing.

SteveJG

unread,
Apr 19, 2017, 10:38:38 AM4/19/17
to mitappinv...@googlegroups.com
Thanks guys. The extra guidance help a lot.  Got it.  Not the username I expected or the pass.   Finally.  :)  I can see the directory.  The words "user which exists on the remote pc"  let me solve it.

--Steve

Jörg Hüneburg

unread,
Apr 20, 2017, 8:53:39 AM4/20/17
to MIT App Inventor Forum
Alright, I'm pretty sure I found the error. It should work now on Windows Shares too.

Would be great if you guys could test again:-)

com.melikeymedia.SMBManager.aix

Taifun

unread,
Apr 22, 2017, 1:36:59 PM4/22/17
to MIT App Inventor Forum
thank you for the new version... I now get nice error messages! ;-)

ListContent
trying to use the ListContent method in a remote directory, which is completely empty does not trigger the GotContent event

Download
I think, I have write access (see screenshot)


but while downloading I receive the message "read-only file system"


Upload
trying to upload results in "write privileges missing"

probably someone else can test this in Windows 10?

Taifun

Jörg Hüneburg

unread,
Apr 22, 2017, 3:48:52 PM4/22/17
to MIT App Inventor Forum
Thanks again for testing, at least your suggestion to improve error handling is working now😊.

I'll add an error message if a directory is empty.

For downloading and uploading it seems to be an authentication problem, but I don't have a clue why you get "write privileges" error on downloading, makes no sense...
Do you have an '@' symbol in your username by any chance? If so, just use the part before the '@' as username.

I need more testers, doesn't matter which windows version, so I can narrow down the possible problems. It works for me with windows 7, anyone else too?


In the next test version I will implement a different way of authenticating (there are two different ones), hopefully this will fix it.

Taifun

unread,
Apr 22, 2017, 4:27:39 PM4/22/17
to MIT App Inventor Forum
I now asked for testers also in the Thunkable forum here...
Taifun

Jörg Hüneburg

unread,
Apr 22, 2017, 4:29:24 PM4/22/17
to MIT App Inventor Forum
Thanks a lot!!

Eric Payne

unread,
Apr 22, 2017, 10:00:39 PM4/22/17
to MIT App Inventor Forum
Bravo!
Brilliant!
Thank You!

ENFANDROID

unread,
Apr 23, 2017, 4:03:17 AM4/23/17
to MIT App Inventor Forum
I just finished fast tests and I can say that on windows 10 pro I can read and write on a shared folder. I go in and out of a android 6 "one plus one" device by entering Windows user name and password. The next test I will do will be to read and write to everyone's shared folder and without entering user name and password from android device. I will update you soon. Thanks to everyone, but especially to Jorg.

Jörg Hüneburg

unread,
Apr 23, 2017, 5:42:51 AM4/23/17
to MIT App Inventor Forum
Great, thanks for testing!
Message has been deleted
Message has been deleted

Joe Night Produzioni Video

unread,
Oct 24, 2019, 12:17:32 PM10/24/19
to MIT App Inventor Forum
NOW THE MESSAGE RESPONSE IN UPLOAD IS
no such file or directory, why?

Taifun

unread,
Oct 25, 2019, 1:06:28 PM10/25/19
to MIT App Inventor Forum
well, nobody is able to know, what you are doing...
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 


Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Taifun

unread,
Oct 31, 2019, 11:06:27 AM10/31/19
to MIT App Inventor Forum

Joe Night Produzioni Video

unread,
Nov 7, 2019, 4:15:52 AM11/7/19
to mitappinv...@googlegroups.com
Hi,
this is the error after upload with smb extension last version and the file is created in destination path (remote path), but is empty!!!!
Immagine.png
Reply all
Reply to author
Forward
0 new messages