Search code examples
androidiosoutsystems

Launch to specific screen of OutSystem mobile app from native iOS and Android app


I'm new to Outsystems and we are stuck with a scenario where we want to launch a specific screen of Outsystems mobile application from our native iOS and Android app.

We have already added URL Schemes to Outsystems mobile app using corodova plugin. Also added LSApplicationQueriesSchemes to my native iOS app. Android app is still in development.

Outsystems app is launching from native iOS app, but we need launch it to a specific screen. We have a login page in Outsystems app, we need to bypass that.

I assumed the outsystems app must be working on URLs or deeplinking, but looks like its not the case.

Can you guys help me out here?? Even a vague idea to achieve it will be helpful.

For Android developers who need native code (Kotlin) to launch Outsystems app

val packageName = "in.co.companyname.appname"
            val context = getActivity()
            val pm = context!!.packageManager

            val myAction = Uri.parse("in.co.companyname.appname://Module/Screen?parameter1=para1&parameter2=para2")
            // Initialize a new Intent
            val intent: Intent? = pm.getLaunchIntentForPackage(packageName)
            if(intent!=null){
                intent!!.setAction(Intent.ACTION_VIEW)
                intent!!.setData(myAction)
                context!!.startActivity(intent)
            }else{
                Toast.makeText(activity!!, "Please install the App", Toast.LENGTH_SHORT).show()
            }

For iOS developers

UIApplication.shared.open(URL.init(string: "in.co.companyname.appname://Module/Screen?parameter1=para1&parameter2=para2")!, options: [:], completionHandler: nil)

Solution

  • This documentation should help...I have tested with Android, and was able to successfully construct deep links and encode them in an NFC tag.

    Short version: the deep link is constructed with the following syntax:

    <app-identifier>://<module>/<screen>
    

    where app-identifier is the native app identifier for your app, and module and screen are the module and screen name you want to open with the deep link.

    As I do not have an iOS device handy, I was not able to test on iOS specifically.