Delphi Android file open failure with API 26
Delphi Android file open failure with API 26 I can open files on Android with the Delphi code shown below. But when I compile it at API 26, it gives the error I added in the picture below. How can I solve this problem? ExtFile := AnsiLowerCase(StringReplace(TPath.GetExtension(yol), '.', '',)); mime := TJMimeTypeMap.JavaClass.getSingleton(); ExtToMime := mime.getMimeTypeFromExtension(StringToJString(ExtFile)); Intent := TJIntent.Create; Intent.setAction(TJIntent.JavaClass.ACTION_VIEW); Intent.setDataAndType(StrToJURI('file:' + yol), ExtToMime); SharedActivity.startActivity(Intent); Thank you so much for your help. I'm glad that I finally came across this kind of understanding person on this platform. I tried the .pas file you sent. but I see a different error window. I share my codes and the error. thank you so much. var ExtFile,yol,deger,id:string; mime: JMimeTypeMap; ExtToMime: JString; Intent: JIntent; javafile:JFile; begin yol:='/sdcard/SkyWiFiDownloa...
0
意見
張貼留言