ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 IEFolderMView for devices
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

jrpcguru

USA
266 Posts

Posted - Mar 24 2022 :  19:48:56  Show Profile  Reply
With the new 10.3.5 I am now able to navigate folders on my Android phone. There are still some issues in both my program and the demo program:

On the installed microSD card, I have a folder, the 4th folder deep, with a five PDF files. It takes well over 30 sec to display that folder. The program just seems to hang. Other folders that contain many JPG files open promptly. Performance is modestly faster on the internal storage.

CopySelectedFilesToClipboard does not work. Nothing ends up on the clipboard.

CopySelectedFilesToFolder does work.

Is there a way to test to see if a folder is a device so I can disable the copy to clipboard feature?
"if IEFolderMView.Folder = IEF_Connected_Devices then" did not work.

J.R.

xequte

38610 Posts

Posted - Mar 24 2022 :  23:59:02  Show Profile  Reply
Hi JR

The slowness will be due to it reading the PDF files to create thumbnails for them.

You might want to specify a custom icon to use:

// Use TImageEnMView.OnGetLoadFilename to specify an icon to use for PDF files on removable devices (to improve performance)
procedure TForm1.IEFolderMViewGetLoadFilename(Sender: TObject; Index: Integer;
    var Filename: string);
begin
  if FileIsWPDItem( Filename ) and
     ( Uppercase( ExtractFileExt( Filename )) = '.PDF' ) then
    Filename := IncludeTrailingPathDelimiter( ExtractFilePath( Application.ExeName )) + 'MyPDFIcon.ico';
end;

Or set Filename to '' in OnGetLoadFilename to just use the default PDF icon (no thumbnail loading).

CopySelectedFilesToClipboard, CopySelectedFilesToFolder, etc. do not work with devices. This is documented behavior.

Use FileIsWPDItem() to determine WPD paths:

https://www.imageen.com/help/FileIsWPDItem.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

jrpcguru

USA
266 Posts

Posted - Mar 27 2022 :  14:03:26  Show Profile  Reply
FileIsWPDItem works nicely to identify folders on my phone.Thank you. However I do not find it indexed in the help file.

I have now noticed several more issues:
My sample folder on my phone is on the microSD card. It has many folders inside, along with 4 PDF files and one JPG. The icons for these files are not displayed and the file extensions are not displayed in column view. And preview does not work.

When I step through the code,

attach/jrpcguru/2022327134849_ImageEn error messages.pdf

Since it is trying to combine program folder with the target folder, I have tried setting:
ImageEnView1.Blank;
ImageEnView1.IO.Params.Filename := '';
ImageEnView1.Update;
In IEFolderMViewFolderChanging and several other locations but that did not fix the problem.

I note that ImageEn fills the edtFolder field with: WPD:moto x4\MICROSD32\Download\
File Explorer lists the folder as: This PC\moto x4\MICROSD32\Download

Since I haven't figured out how to get rid of the erroneous extra folder info that is being added, I haven't been able to test which is correct.

I added IEFolderMView.ShowDevices := true;
to the Explorer demo. It also fails to show PDF icons, probably because it does not implement PDFium. It does show the JPG icon, but still doesn't preview even the JPG file, because of that combining of the program folder with the actual folder. If I add:
IEFolderMView.IOOptionsEx := IEFolderMView.IOOptionsEx + [ieixWantParams];
it does not cause the error messages that my program has. Perhaps again because it doesn't implement PDFium?

J.R.
Go to Top of Page

xequte

38610 Posts

Posted - Mar 29 2022 :  01:16:02  Show Profile  Reply
Hi JR

We have added device support to TIEFolderTree in the current beta. You can email us to test it.

We are looking into the other issue.


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

jrpcguru

USA
266 Posts

Posted - Mar 29 2022 :  09:48:00  Show Profile  Reply
While you are working on this issue, I'm hoping you can also add the ability to create new folders on the device. I think that is a documented issue but not being able to do so really cuts down on its utility.

J.R.
Go to Top of Page

xequte

38610 Posts

Posted - Apr 03 2022 :  22:55:55  Show Profile  Reply
Hi JR

We have added folder creation on WPD devices in the current beta.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: