OpenDialog Can "See" The Pics on My Android Phone But Can't "Access" Them

I sent Don a new plugin to try.
We got a new class for items: OpenDialogItemMBS

I’ll later upload documentation.

Can’t find any option for mass storage. Interestingly enough, besides the setting to allow “File Transfer Protocol” (FTP), there is another option there for “Picture Transfer Protocol” (PTP). I tried it and it made things worse … couldn’t even access the camera folder with the pics anymore.

PTP is more restrictive subset of MTP

Well … well … well … Someone give that man a cigar!!! He’s 100% correct!

After some more trial and error, it appears that Xojo 2019 r3 has fixed the problem!

Here’s what I tried ….
Xojo 2016 r1.1 with Windows 7 …… DID NOT WORK
Xojo 2016 r1.1 with Windows 10 … DID NOT WORK
Xojo 2019 r3 with Windows 7 ……… DID WORK
Xojo 2019 r3 with Windows 10 ……… DID WORK

Not too tough to figure out the common denominator there, eh?

Not sure what Xojo did (not even sure they know what they did :smiley: ) but somewhere between 2016 r1.1 and 2019 r3, somehow they have enabled MTP operation and access of pictures from an Android phone using standard FolderItem code. Apparently, you CAN do it with Xojo … just gotta have the right version, I guess.

The following code (which is where I started this thread) works flawlessly!

[code]// get image from phone
Dim jpegType As New FileType
jpegType.Name = “image/jpeg”
jpegType.Extensions = “jpg;jpeg”

Dim f As FolderItem = GetOpenFolderItem(jpegType)
If f is Nil Then
//user cancelled
Return
End if

Canvas1.Backdrop = Picture.Open(f)
If Canvas1.Backdrop Is Nil Then
MsgBox “Nil”
End if[/code]

… and so the bottom line is that … You CAN do it with Xojo!!! … You just have to have the right version.

[quote=470482:@Christian Schmitz]I sent Don a new plugin to try.
We got a new class for items: OpenDialogItemMBS [/quote]
Once again, Christian reacts to a need with the speed of light and comes through to save the day. His modified OpenDialogItemMBS class allows accessing the Android phone pictures, using older Xojo versions (e.g., like 2016 r1.1 that I’m using) with Windows 7, and getting the JPEG String data of the picture which can then be reassembled into the image that goes to the canvas backdrop.

My hat’s off and I’m bowing to the East (at least that’s the general direction of Germany from South Carolina :smiley: ) to you, Mr. Schmitz … VIELEN DANK, Mein Herr!

[quote=470540:@Don Lyttle]Once again, Christian reacts to a need with the speed of light and comes through to save the day. His modified OpenDialogItemMBS class allows accessing the Android phone pictures, using older Xojo versions (e.g., like 2016 r1.1 that I’m using) with Windows 7, and getting the JPEG String data of the picture which can then be reassembled into the image that goes to the canvas backdrop.

My hat’s off and I’m bowing to the East (at least that’s the general direction of Germany from South Carolina :smiley: ) to you, Mr. Schmitz … VIELEN DANK, Mein Herr![/quote]

That should be safer to use. I have 2019r2, and is not working there, I didnt remember anyting about folderitem in the release notes of r3 so, it is more likely the “not even sure they know what they did”.

Agreed! And thanks for all your input throughout this thread, Ivan. Without your lead on the MTP part of the conversation, Christian may have not had the reason to work his magic with the modified plug-in and I would be down to the one option of going with R3. I dreaded that thought since when I opened up my program (that I’m demoing next week) in the trial version of R3, I got 50 Bazillion errors and a whole bunch of indications that I would need updated plugins. Now, I can spend all that time on something far more productive and less stressful (the idea of fixing all that stuff was about as attractive to me as going to the dentist to have a root canal :smiley: ). And of course, I’m running out of time with next week’s customer meeting looming. So, your input, and that of the others here, shaped a solution that probably saved my derriere! Thanks!