Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Opening pdf from mobile application

Forum

Search UsersRules
Opening pdf from mobile application
#1
Active user
Points:: 0
Joined:: Feb 28, 2012

Hi i am trying to open a pdf from a mobile application. I am using the following code. In windows it works fine but on Android nothing happens when i run this. No error no nothing. Anyone knows why?

Code
&AtClient
Procedure openFileTest(Command)
   SysInfo = New SystemInfo;
   if Find(SysInfo.PlatformType,"Windows") = 0 then
      path="/sdcard/Download";
   else
      path="c:\temp";
   endif;   
   
   BeginRunningApplication(New NotifyDescription("Attachable_EmptyHandler", ThisForm),"test.pdf",path);
   
   
   
EndProcedure


&AtClient

Procedure Attachable_EmptyHandler(CodeReturn, AdditionalParameters) Export

   Return;

EndProcedure

Profile
#2
Administrator
Points:: 0
Joined:: Oct 3, 2019

Hello Constantinos,

you are specifying an incorrect second parameter to the BeginRunningApplication procedure.

Here we need to pass the full name of the file that we want to open, including the path to it. The third parameter - Path - is optional and can be omitted.

Here's an example of how a call to this procedure might look like in Android:

Code
&AtClient
Procedure Command1(Command)
   
    BeginRunningApplication(New NotifyDescription("Attachable_EmptyHandler", ThisForm),"file:///storage/sdcard1/Downloads/test.pdf");   

EndProcedure

Profile
#3
Administrator
Points:: 0
Joined:: Oct 3, 2019

You can also read how to run third-party applications from mobile 1C in our blog:

https://1c-dn.com/blog/launching-third-party-applications-from-mobile-1c/

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.