Salutations my fellow CSPro users.
I have a need to start an external app from the CSEntry application. As documentation states that is achieved by calling ExecSystem function with parameter "app:app.name". However I was wondering if there was a way to start an external activity and also pass some parameters to said activity along with the start intent? Is something like this possible at all? if not, is there some kind of workaround that I'm missing?
Thanks!!!
Alex
ExecSystem function - passing intent parameters when starting external activity
Re: ExecSystem function - passing intent parameters when starting external activity
Hi Alex,
Please download the latest beta: https://www.csprousers.org/beta/ and read more about the new SystemApp Object.
And as Greg and Josh written me days ago:
However,the Developer Team can give you more explanations about it.
Best,
Yes. The new SystemApp Object allow to interact with external activities and also pass some parameters using SystemApp.SetArgument Function. You can also get data from other applications using SystemApp.GetResult Function.However I was wondering if there was a way to start an external activity and also pass some parameters to said activity along with the start intent?
Please download the latest beta: https://www.csprousers.org/beta/ and read more about the new SystemApp Object.
And as Greg and Josh written me days ago:
This interest me greatly since right now, we can access to other application and other applications can also access to CSEntry data and activities. I'll try to implement a CSEntry helper and we can share experiences about in the next weeks.With SystemApp, you can communicate back and forward between another application, sending data to it and receiving data from it. There is an example of it here:
https://github.com/CSProDevelopment/CSE ... lback-demo
...we’ve implemented SystemApp as a way for users to have a seamless way to communicate between CSEntry and another app.
However,the Developer Team can give you more explanations about it.
Best,
G.VOLNY, a CSProuser from Haiti, since 2004
Re: ExecSystem function - passing intent parameters when starting external activity
Systemapp is new in version 7.4 and it is documented in the latest beta release. You can download that and search for systemapp in the help. It lets you set numeric and string parameters that will get passed to the Activity you are launching as part of the intent. For example the following code will launch maps with driving directions from your current location to the US Census Bureau:
SystemApp nav_to;
nav_to.setArgument("DATA", "google.navigation:q=US+Census+Bureau");
nav_to.setArgument("ACTION", "android.intent.action.VIEW");
nav_to.exec("com.google.android.apps.maps");
nav_to.setArgument("DATA", "google.navigation:q=US+Census+Bureau");
nav_to.setArgument("ACTION", "android.intent.action.VIEW");
nav_to.exec("com.google.android.apps.maps");
Re: ExecSystem function - passing intent parameters when starting external activity
Great, this is exactly what I was looking for! Thanks Josh, Htuser!!!
I am still in 7.3, but will now definitely check out 7.4 beta.
Alex
I am still in 7.3, but will now definitely check out 7.4 beta.
Alex