![]() |
Android Get real path
Hello to everybody,
I need to get a real path to the file as ParamStr (1). Now I get the file path as follows: /external/file/11608 I need to get the file path: /external/documents/mytext.txt My code:
Delphi-Quellcode:
Thank you
procedure TfrmMain.FormCreate(Sender: TObject);
var intent: JIntent; param_intent: Jnet_Uri; param_str: String; begin intent := SharedActivity.getIntent; if intent <> nil then begin if TJIntent.JavaClass.ACTION_VIEW.equals(intent.getAction) then begin param_intent:= intent.getData; param_str:= JStringToString(param_intent.getEncodedPath.toString); Label4.Text := param_str; end; end; end; |
AW: Android Get real path
Thats not an easy one... here ist some example in Java, how to get the real filename:
![]() But you also might need to get the content through a stream, as the real path might be unreachable for your app. |
AW: Android Get real path
Thank you.
Everything is always so complicated. I don't understand why Delphi contains features and procedures that don't do anything? I do not access the system folders and need to process the file. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:49 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz