Deep Linking
Deep linking allows users to open specific StorifyMe stories directly from shared links, providing a seamless experience when content is shared across platforms.
StorifyMe provides two approaches for implementing deep links:
Option 1: StorifyMe-Hosted Deep Links (Recommended)
StorifyMe automatically generates and hosts the Digital Asset Links file for you. This is the simplest approach and requires no backend infrastructure on your end.
Prerequisites
- Android app with StorifyMe SDK integrated
- StorifyMe account
- App published to Google Play Store (or available for testing)
Step 1: Configure App Credentials in Dashboard
-
Log in to your StorifyMe dashboard
-
Navigate to Settings → Mobile
-
In the Android section, enter:
- Package Name: Your app's package name (e.g.,
com.yourcompany.app) - SHA-256 Fingerprints: Your app signing certificate fingerprints (see below)
- Package Name: Your app's package name (e.g.,
-
Click Save
Getting SHA-256 Fingerprints
You need to provide SHA-256 fingerprints for all signing keys (debug, release, and Play App Signing if applicable).
Debug Keystore:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Release Keystore:
keytool -list -v -keystore /path/to/your/keystore.jks -alias your-key-alias
Play App Signing Key:
- Go to Google Play Console
- Select your app → Setup → App integrity
- Copy the SHA-256 fingerprint under "App signing key certificate"
Add ALL fingerprints to the StorifyMe dashboard (separated by commas or new lines).
StorifyMe will automatically generate the Asset Links file at:
https://storifyme.xyz/.well-known/assetlinks.jsonhttps://storifyme.com/.well-known/assetlinks.json
Step 2: Add Intent Filters to AndroidManifest.xml
Open your AndroidManifest.xml and add intent filters to handle deep links:
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTask">
<!-- Your existing intent filters -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- StorifyMe Deep Links - storifyme.xyz -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="storifyme.xyz"
android:pathPrefix="/stories/YOUR_ACCOUNT_ID/" />
</intent-filter>
<!-- StorifyMe Deep Links - storifyme.com -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="storifyme.com"
android:pathPrefix="/stories/YOUR_ACCOUNT_ID/" />
</intent-filter>
<!-- Support for /shorts/ path -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="storifyme.xyz"
android:pathPrefix="/shorts/YOUR_ACCOUNT_ID/" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="storifyme.com"
android:pathPrefix="/shorts/YOUR_ACCOUNT_ID/" />
</intent-filter>
</activity>
Important: Replace YOUR_ACCOUNT_ID with your actual StorifyMe account ID. The pathPrefix ensures your app only receives links for your account (multi-tenant isolation).
Step 3: Handle Deep Links in Your Activity
The deep link URL format is:
https://storifyme.xyz/stories/{ACCOUNT_ID}/{story_handle}
https://storifyme.xyz/shorts/{ACCOUNT_ID}/{story_handle}
Kotlin Implementation
Update your Activity (e.g., MainActivity.kt):
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.storify.android_sdk.PreviewStoryByHandleLauncher
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
// Handle deep link on app launch
handleDeepLink(intent)
}
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
// Handle deep link when app is already running
intent?.let { handleDeepLink(it) }
}
private fun handleDeepLink(intent: Intent) {
val uri = intent.data
if (uri != null && uri.scheme == "https") {
val handle = extractStoryHandle(uri)
if (handle != null) {
// Launch story directly
PreviewStoryByHandleLauncher.INSTANCE.launch(this, handle)
}
}
}
private fun extractStoryHandle(uri: Uri): String? {
val pathSegments = uri.pathSegments
// For StorifyMe-hosted URLs: https://storifyme.xyz/stories/{ACCOUNT_ID}/{story_handle}
return when {
pathSegments.size >= 3 &&
(pathSegments[0] == "stories" || pathSegments[0] == "shorts") ->
pathSegments[2]
else -> null
}
}
}
Java Implementation
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import com.storify.android_sdk.PreviewStoryByHandleLauncher;
import java.util.List;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Handle deep link on app launch
handleDeepLink(getIntent());
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
// Handle deep link when app is already running
handleDeepLink(intent);
}
private void handleDeepLink(Intent intent) {
Uri data = intent.getData();
if (data != null && "https".equals(data.getScheme())) {
String handle = extractStoryHandle(data);
if (handle != null) {
// Launch story directly
PreviewStoryByHandleLauncher.INSTANCE.launch(this, handle);
}
}
}
private String extractStoryHandle(Uri uri) {
List<String> pathSegments = uri.getPathSegments();
// For StorifyMe-hosted URLs: https://storifyme.xyz/stories/{ACCOUNT_ID}/{story_handle}
if (pathSegments.size() >= 3 &&
("stories".equals(pathSegments.get(0)) || "shorts".equals(pathSegments.get(0)))) {
return pathSegments.get(2);
}
return null;
}
}
Step 4: Testing StorifyMe-Hosted Deep Links
Using ADB
# Test with storifyme.xyz
adb shell am start -W -a android.intent.action.VIEW \
-d "https://storifyme.xyz/stories/YOUR_ACCOUNT_ID/test-story" \
com.yourcompany.app
# Test with storifyme.com
adb shell am start -W -a android.intent.action.VIEW \
-d "https://storifyme.com/stories/YOUR_ACCOUNT_ID/test-story" \
com.yourcompany.app
# Test shorts path
adb shell am start -W -a android.intent.action.VIEW \
-d "https://storifyme.xyz/shorts/YOUR_ACCOUNT_ID/test-story" \
com.yourcompany.app
Replace:
YOUR_ACCOUNT_IDwith your StorifyMe account IDcom.yourcompany.appwith your app's package nametest-storywith an actual story handle from your account
Using a Test Link
-
Send yourself a message (Gmail, Slack, etc.) with a story link:
https://storifyme.xyz/stories/YOUR_ACCOUNT_ID/test-story -
Tap the link on your Android device
-
Your app should open and display the story
Troubleshooting StorifyMe-Hosted Links
App doesn't open from links:
- Verify
android:autoVerify="true"is set in intent filters - Check that path prefix includes your
ACCOUNT_ID - Verify SHA-256 fingerprints in dashboard are correct
- Clear app defaults: Settings → Apps → Your App → Open by default → Clear defaults
Check verification status:
adb shell pm get-app-links com.yourcompany.app
Verify Asset Links file:
curl https://storifyme.xyz/.well-known/assetlinks.json | grep "com.yourcompany.app"