Skip to content



StreetHawk Growth feature lets your user share your application with friends. Also, the feature can be extended to invite the new user to a deep linked page inside your application. Create a Share button inside your application and call InviteFriendsToDownloadApplication to generate the share URL. StreetHawk SDK will then ask user ways to share the generated URL. That is (email, post on Facebook etc). Below are the APIs which generates sharable URL. A scheme for deep linking is required for StreetHawk growth.

Integration Steps

Integration of StreetHawk's Analytics module is prerequisite for this module. Click here for the document on StreetHawk Analytics module.

  • Add dependencies

For Android Studio as your IDE, add the following code in application's build.gradle file under dependencies.

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.streethawk:growth:1.8.22'
  • Register Scheme in AndroidManifest.xml

Register scheme, host and other parameters required to deep link into your application.

    <intent-filter android:label="SetParams">
        <action android:name = "android.intent.action.VIEW" />
        <category android:name = "android.intent.category.BROWSABLE"/>
        <category android:name = "android.intent.category.DEFAULT"/>
  • Register Growth plugin for your application

Register StreetHawk's growth module with StreetHawk SDK and call init as shown below in onCreate function of your application's launcher activity.

import com.streethawk.library.core.StreetHawk;
import com.streethawk.library.growth.Growth;


    protected void onCreate(Bundle savedInstanceState) {
        Application app = getApplication();
  • Fetch and share the universal shareable link.

Call originateShareWithCampaign to generate the universal shareable link which your application user can share with his friends.

Button share = new Button(this);
        share.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                String ID = "ShareViaFacebook";
                String shareLink = "recipeApp://homepage?recipe=chocolatechipcookie";
                String utm_source = "Facebook";
                String utm_medium = "cpc";
                String utm_term = "facebookAdd";
                String campaign_content = "best chocolate chip cookie recipe";
                String default_ur = "";

                Growth.getInstance(this).originateShareWithCampaign(ID,shareLink, utm_source, utm_medium, utm_term, campaign_content, default_ur, new IGrowth() {
                            public void onReceiveShareUrl(String shareUrl) {
 Intent intent = new Intent(Intent.ACTION_SEND);
                    mContext.startActivity(intent);       // Launch default application picker
                            public void onReceiveErrorForShareUrl(JSONObject errorResponse) {

Variable Description
utm_campaign ID to be used in StreetHawk analytics
URI Deeplink URI of the page which needs to be deep linked
utm_source source where URL will be posted. (Example facebook)
utm_medium medium for posting the URL (Example cost per click or CPC)
utm_term Keywords for campaign (Example facebook adv)
campaign_content Description of campaign (Example 5 minutes chocolate chip cookie)
default_url Fallback URL for non-supported platforms (Example
object Implementation of IGrowth object. If null, SDK will invoke StreetHawk app picker and catch the utm_source as per user's selection.

As shown above, the universal shareable URL returned by StreetHawk is received as shareURL in onReceiveShareUrl function.

Knowledge Base Articles