Skip to main content

 

Eptura Knowledge Center

Launch the Condeco mobile app from another app

The Condeco mobile app can be opened directly from another app installed on an iOS or Android mobile device. Follow the steps for your device to configure a source app to open the Condeco mobile app.

iOS

Open the Info.plist file for the source application and add a new Queried URL Schemes key for Condeco:

Value: com.condecosoftware.condeco

ios plist file.png

Use the following code sample to open the Condeco mobile app from the source app:

if let url = URL(string: "com.condecosoftware.condeco://")  {
    if UIApplication.shared.canOpenURL(url) {
       UIApplication.shared.open(url, options: [:], completionHandler: nil)
       print(url)
    } else {
       print("not found") //Can use URL(string: "itms-apps://itunes.apple.com/app/id1565099537") to open App store
    }
} else {
    return
}

Android

Open the AndroidManifest.xml file from the root folder of the source application and add the following:

<queries>
<package android:name="com.condecosoftware.condeco" />
</queries>

android manifest.png

Use the following code sample to open Condeco mobile app from the source App:

val packageName = "com.condecosoftware.condeco"
var intent = activity.packageManager.getLaunchIntentForPackage(packageName)
          if (intent == null) {
            if (intent == null) {
                    intent = try {
                        Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=$packageName"))
                    } catch (e: Exception) {
                        Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=$packageName"))
                    }
                }
             startActivity(intent)