Introduction
This document shares, detailed integration steps for Quick Launch SDK into your existing application or a new app.
Pre-Requisites
  • If Android studio is not installed on your machine, please download from here and install.
  • Set the Java version in Android studio for compiling the project Please follow the instructions here.
  • Minimum Requirements for GluedIn Android SDK
    • minSDK – 23
    • Maximum compileSDK – 32
    • Minimum compileSDK – 29
    • Maximum targetSDK – 32
    • Minimum targetSDK – 29
    • Minimum Java Version – 11.0
Console Steps to get the Keys
  • Follow onboarding steps on console
  • Create your project in the dashboard and get the API Key and Secret key.
  • Follow the documents on the console to get the Android SDK dependency.
Sample App
  • Download the sample app from here
Steps to Quick Launch App using the GluedIn Android SDK
Please follow the below steps to Integrate GluedIn SDK in your Android Application using latest Android Studio (Android Studio Bumblebee | 2021.1.1)
  • After downloading the sample App from, extract the zip file into folder
  • Start/Open Android Studio and close any open Android Studio projects
  • From the Android Studio menu click File > Open OR alternatively, from the Welcome screen, click Open and Browse through the downloaded Sample App
  • Select the GluedInQuickLaunchSampleApp project folder with the AndroidManifest.xml file and click Ok button.
  • Now Android Studio Opens the Sample App
  • Once the app has been imported into Android Studio, project will be synced automatically, but if does not, you can manually sync the application by hitting highlighted button in below screenshot:
  • You can change the app name by changing name into strings.xml file. Refer below:
  • Now rename the project package name as per your preference. Please follow the steps below to rename the package.
    • Change to “Android” From “Project”
    • Now click on the setting gear icon and deselect Compact Middle Packages.
    • Now the packages folder is broken into parts as shown in the below image.
    • Now right-click on the first package name (com) and Refactor > Rename. A warning message will be displayed but go ahead and click on the Rename current button.
    • Rename the directory name as your requirement and click on the Refactor button.
    • Now a new directory name will be shown in place of “com”.
    • Do the same for the domain extension and App folder name according to your requirement.
    • Now you can see the package name has been changed from “com.gluedin.sample” to “yourdomain.directory.appname”
    • Now go to the build.gradle (Module: app) in Gradle Scripts. Here change the applicationId to your “yourdomain.directory.appname” and click on the Sync Now button. And you are successfully renamed your package name.
  • Now Change the Splash Screen as per your preferences, make sure to use the same name (plus_saw_splash_bg) but you can use webp or png any format.
  • Replace the app_icon with your app icons. But the name must be the same as existing.
  • You can set multiple log levels for ADB and Http logs.
    • Log Levels are:
      • Verbose: Show all log messages
      • Debug: Show debug log messages that are useful during development only, as well as the message levels lower in this list.
      • Info: Show expected log messages for regular usage, as well as the message levels lower in this list.
      • Warn: Show possible issues that are not yet errors, as well as the message levels lower in this list.
      • Error: Show issues that have caused errors, as well as the message level lower in this list.
      • Assert: Show issues that the developer expects should never happen.
    • Http Log Levels are:
      • 1 for NONE – No Logs
      • 2 for BASIC – Logs request and response lines
      • 3 for BODY – Logs request and response lines and their respective headers
      • 4 for HEADERS – Logs request and response lines and their respective headers and bodies (if present)
  • Now put your API and Secret Key (copied from onboarding steps) into the MainActivity.kt file, like below.
  • You have to also add your domain name into DeepLinkAuthority as depicted below: Note: Don’t add http or https Ex: www.gluedin.io OR www.google.com
  • Now open the app/build.gradle file and change the URL scheme to your domain to reflect the same when someone shares any content from the app.
    Note: Don’t add http or https Ex: www.gluedin.io OR www.google.com
  • Now clean the project and build again.
    • a. Clean Project
    • b. Rebuild Project.
Steps to Integrate GluedIn Android SDK into existing application
Please follow the below steps to Integrate GluedIn SDK in your existing Android Application using latest Android Studio (Android Studio Bumblebee | 2021.1.1)
Note: Android Studio Artic Fox & Below versions might have different steps to integrate.
  • For Android Studio Bumblebee, Open settings.gradle file in project root folder and add below line of code within “dependencyResolutionManagement” tag. If tag is not added, please add the same using below code.
    	
    dependencyResolutionManagement {
        repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    	repositories {
    	google()
    	mavenCentral()
    	maven { url 'https://jitpack.io' }
    	maven {
    	        url "https://plugins.gradle.org/m2/"
    	      }
            maven {
    		name = "GitHubPackages"
    		url = uri("https://maven.pkg.github.com/plussaw/PlusSaw")
    		credentials {
    		username = "plussaw"
                    password = "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"
    	     }										
            }	
        }
    }     
    
    	
  • For Android Studio Artic Fox and Below, Add below code into project build.gradle file
    	
    repositories {
    	google()
    	mavenCentral()
    	maven { url 'https://jitpack.io' }
    	maven {
    	url "https://plugins.gradle.org/m2/"
            }
    
    maven {
    	     name = "GitHubPackages"
    	     url = uri("https://maven.pkg.github.com/plussaw/PlusSaw")
    	 credentials {
    	     username = "plussaw"
    	     password = "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"
                }
    	}
     }	 
    
    	
  • Now add below code into the app/build.gradle file.
    	
    android {
        ……
        …...
        buildFeatures {
            viewBinding true
            dataBinding true
        }
    
    }
    
    dependencies {
    ….
    ….
    implementation 'com.gluedin.nocode:gluedin:1.3.1'
    }
    
    
    
  • Open gradle.properties and add below line if not present,
    	
    android.enableJetifier=true
    	
    
  • Add Facebook id in app/build.gradle. Refer to step 6 for details. Note: Since it’s just for resolving dependency at runtime. You can keep the facebook_app_id & plus_saw_sdk_facebook_app_id key as empty/null.
  • Now open the app/build.gradle file and change the URL scheme to your domain to reflect the same when someone shares any content from the app. Note: Don’t add http or https
  • Now open the “Application” class of the project if it’s already in your project, else follow below steps to add “Application” class in the project.
    • Right click on folder then goto “New” -> “Kotlin Class/File”
    • Now enter class name as “Application” and select “Class” option from list and press Enter key.
    • Once the application class will be created, Now extend the application class with android.app.Application class and onCreate() method like below and add below code in onCreate() method of “Application” class:
      	
      override fun onCreate() {
             super.onCreate()
             PlusSAWInitializer.initSdk(this)
          }
      
      	
    • Now add the “Application” class reference in the AndroidManifest.xml file. As below
    • Add below code into your MainActivity of the app OR on a place from where you want to launch the Quick Launch SDK.
      	
      val callback: PlusSawSDKCallBack = object : PlusSawSDKCallBack {
         override fun onPlusSawSdkInitSuccess(
              isSuccess: Boolean,
              plusSawSdkException: PlusSawSdkException?
           ) {
             if (isSuccess) {
                  finish()
             } else {
                 Toast.makeText(
                 this@MainActivity,
                 "PlusSawSDK Launched Failed",
                 Toast.LENGTH_SHORT
                 ).show()
             }
           }
      
      override fun onAppAuthSuccess(
              isSuccess: Boolean,
              plusSawSdkException: PlusSawSdkException?
          ) = Unit
      }
      
      val plusSawConfigurations = PlusSAWInitializer.Configurations.Builder()
      .setLogEnabled(true, Log.DEBUG)
      .setSdkCallback(callback)
      .setFCMToken("") // optional, can be set at later stage
      .setApiKey("put_api_key_here")
      .setSecretKey("set_secret_key_here")
      .setFirebaseAnalytics(Firebase.analytics) // optional, can be set at later stage
      .setHttpLogEnabled(true, 3)
      .setDeeplinkAuthority("set_domain_url_for_link_share_feature")
      .enableFacebookLoginAndShare(true)
      .enableGoogleLogin(true)
      .create()            
      
      plusSawConfigurations.validateAndLaunchPlusSawSDK(
        this,
      PlusSawConstants.LaunchType.APP,
        intent
      )
          
      	
    • Now put your API and Secret Key (copied from onboarding steps) into the MainActivity.kt file, like below.
    • You have to also add your domain name into DeepLinkAuthority as depicted below: Note: Don’t add http or https Ex: www.gluedin.io OR www.google.com
    • Now open the app/build.gradle file and change the URL scheme to your domain to reflect the same when someone shares any content from the app. Note: Don’t add http or https Ex: www.gluedin.io OR www.google.com
    • Now clean the project and build again.
      • Clean Project
      • Rebuild Project
Optional Steps for customization into SDK
  • You can change the App theme by using below steps:
    • Add the “plus_saw_configurations.json” file into assets/plusSAW folder, and add the color codes into respective keys, like below screenshot.
    • You can also add custom fonts and put the name into respective keys, like below screenshot.
    • You can change the app theme color by changing into colors.xml. Note: This step is only applicable for quick launch only. Not for integration into existing applications.
  • To integrate Facebook & Google Sign-in into GluedIn SDK, Refer Step 6.
  • To integrate Firebase Crashlytics, Firebase Deeplink and Firebase Analytics, please create an app on Firebase console and follow the instructions mentioned in their website. Download the google-services.json file after setting up all and replace the file into the project. Firebase Crashlytics Setup Firebase Dynamic Link Setup Google Analytics Setup Note: To you google services, please make sure to add below:
    • Open project/build.gradle file and below line in “dependencies” tag.
      	
      classpath 'com.google.gms:google-services:4.3.10'
      		
      		
      Also add below line in app/build.gradle file under “plugins” tag
      	
      id 'com.google.gms.google-services'
      		
      		
    • If crashlytics is enabled in your app then add below line in project/build.gradle file under “dependencies” tag
      	
      classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
      		
      		
      Also add below line in app/build.gradle file under “plugins” tag
      	
      id 'com.google.firebase.crashlytics'
      		
      		
  • If You want to enable/disable the Facebook and Google Sign-in features, you can enable/disable like below:
  • If you want to change the base url of SDK API’s, you can change by using below method, but we encourage not to change it since it’s most preferred for developers:
  • You can select the feed type of the SDK based on your preference.
    	
    For Vertical Feed - PlusSAWInitializer.Configurations.FeedType.VERTICAL
    For Square Feed - PlusSAWInitializer.Configurations.FeedType.SQUARE
    
    
    
Social Login Integration into SDK
  • Steps to integrate Facebook into GluedIn SDK.
    • Create the app on Facebook’s official website and get the application id.
    • Now paste the application id into facebook_app_id tag into app/build.gradle file.
      	
      manifestPlaceholders["facebook_app_id"] = ""
      resValue "string", "plus_saw_sdk_facebook_app_id", ""
      
      	
      Note: Add your created Facebook app id in place of empty value
    • If you don’t want to use the Facebook feature, keep the key value empty. Note: Don’t delete the keys or lines in app/build.gradle, it may lead to compile time issues.
  • Steps to integrate Google Sign-in into GluedIn SDK.
    • Follow the steps mentioned on google developer link.
    • Download the google-services.json file after setting up all and replace the file into the project.