Forum: Cross-Platform-Entwicklung
by philipp.hofmann,
18. Dez 2020
Für Android steht dort das folgende:
{$IFDEF ANDROID}
appPath:=TFileUtils.adjustDir(System.IOUtils.TPath.GetPublicPath());
{$ELSE}
appPath:=TFileUtils.adjustDir(ExtractFilePath(ParamStr(0)));
{$ENDIF}
Forum: Cross-Platform-Entwicklung
by philipp.hofmann,
22. Mai 2019
Der Vollständigkeithalber der angepasste Code:
uses Androidapi.JNI.Support;
...
var fileuri: JNet_Uri;
TheFile: JFile;
Intent: JIntent;
begin
theFile := TJFile.JavaClass.init(StringToJString(appPath+'docs'), StringToJString('icTrainer.pdf'));
Forum: Cross-Platform-Entwicklung
by philipp.hofmann,
22. Mai 2019
Welches Verzeichnis nutzt du für deinen Output? Da du scheinbar in Gänze ohne Fileprovider-Definition arbeitest (sieht zumindest mal danach aus), scheint mir v.a. dies der Punkt bei dir zu sein, der hilft.
Wenn ich es mit TAndroidHelper.JFileToJURI probiere, bekomme ich die Fehlermeldung "Failed to find configured root that contains". Da habe ich also auch noch irgendeinen generellen...