Hi, Chris
--------
String ls_filename, as_filename, ls_path, ls_appeon_path
//ls_filename = "file:///storage/emulated/0/Download/p2023121301_test.PDF"
ls_path = getcurrentdirectory()
ls_appeon_path = appeongetcachedir()
//messagebox('ls_path', ls_path)
//messagebox('ls_appeon_path', ls_appeon_path)
//appeonprint2pdf()
// ls_path = null
// ls_appeon_path = /storage/emulated/0/Android/data/com.cnssolution.badam/files/App_running$
//ls_filename = ls_appen_path + '/p2023121301_test.PDF'
//ls_filename = "file:///storage/emulated/0/Android/p2023121301_test.PDF"
ls_filename = "/storage/emulated/0/Download/p2023121301_test.PDF"
as_filename = ls_filename
dw_3.saveas(as_filename, PDF!,true)
-------------------
I tested with the above source code and no error occurred, but the p2023121301_test.PDF file is not created in the /storage/emulated/0/Download/ folder.
ls_appeon_path = appeongetcachedir()
When I check this, /storage/emulated/0/Android/data/com.cnssolution.badam/files/App_running$ appears as /storage/emulated/0/Download/ on my phone.
I'm trying to create a folder with the name p2023121301_test.PDF.
What part is wrong?
thank you
<fileserver>
<file-path value="E:\www_root" />
<session-timeout value="3600" />
<allowed-file-types value="txt;doc;jpg;mpeg;pdf" ignorecase="true" />
<max-file-size value="200" />
<users>
<user name="mus" password="*****" />
<user name="sj01" password="***!!" />
<user name="cns" password="****!" />
</users>
</fileserver>
appeonfileserver.xml files.
<allowed-file-types value="txt;doc;jpg;mpeg;pdf" ignorecase="true" />
<max-file-size value="200" />
Two part changed
1. add pdf
2. value = "70" -> "200"
Please try access pdf via URL on browser on Android, then download it.
For Android, you can also try the Run function, this will give control to Android, and Android will decide whether to prompt the user to select a program to open the PDF file. Please refer to the Run function chapter in PowerServer Help.
https://docs.appeon.com/ps2020/features_help_for_appeon_mobile/supported_functions.html#System_Functions_System___Environment_Functions
I conducted the test according to the method you suggested.
--------------------
eon_mobile_str_mailcontent lstr_content
string ls_recipient[], ls_cc[], ls_bcc[], ls_attachmentfile[], ls_file, ls_file2
integer li_re, li
ls_file = "F20230108_Purchase Order.pdf"
li = dw_3.saveas(ls_file, pdf!, True)
if appeongetclienttype()="MOBILE" then
eon_mobile_awsex lnv_aws
lnv_aws = create eon_mobile_awsex
lstr_content.s_subject = "[Sea Refrigerator]-F20230108_Order Form"
lstr_content.s_notetext = "[Sea Refrigerator]-F20230108_Order Form"
ls_recipient[1] = "jgshin1@naver.com"
ls_attachmentfile[1] = appeongetcachedir() + "/plugin/" + ls_file
messagebox(' ls_attachmentfile[1]', ls_attachmentfile[1])
li_re = lnv_aws.of_sendmail(lstr_content, ls_recipient, ls_cc, ls_bcc, ls_attachmentfile)
end if
destroy lnv_aws
---------------------
We modified and tested as above.
When you run it, a POP-UP will appear asking you to select the app from the app on your phone.
I chose Naver Mail.
I did that, but the subject and body of the email are sent well.
ls_file = "F20230108_Purchase Order.pdf" The email is sent without the PDF file attached.
I checked on my phone.
ls_attachmentfile[1] = appeongetcachedir() + "/plugin/" + ls_file
This file is created on a regular basis.
What settings do I need to set on my Android phone?
Do you not have read permission?
How do I solve this?
Regards, Jungi