Skip to content

Commit f2c9607

Browse files
authored
create deeplink for upgrade to unlimited (#4153)
added deep link for unlimited plan subscription page https://github.com/user-attachments/assets/11091354-ecd1-4e24-896e-406b2b4f6c87
2 parents ac1bf04 + feb657b commit f2c9607

File tree

4 files changed

+104
-0
lines changed

4 files changed

+104
-0
lines changed

app/android/app/src/main/AndroidManifest.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,15 @@
139139
android:scheme="https"
140140
android:pathPattern="/apps/.*" />
141141
</intent-filter>
142+
<intent-filter android:autoVerify="true">
143+
<action android:name="android.intent.action.VIEW" />
144+
<category android:name="android.intent.category.DEFAULT" />
145+
<category android:name="android.intent.category.BROWSABLE" />
146+
<data
147+
android:host="h.omi.me"
148+
android:scheme="https"
149+
android:path="/unlimited" />
150+
</intent-filter>
142151
<intent-filter>
143152
<action android:name="android.intent.action.VIEW" />
144153
<category android:name="android.intent.category.DEFAULT" />

app/lib/core/app_shell.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import 'package:omi/pages/apps/app_detail/app_detail.dart';
1212
import 'package:omi/pages/settings/asana_settings_page.dart';
1313
import 'package:omi/pages/settings/clickup_settings_page.dart';
1414
import 'package:omi/pages/settings/github_settings_page.dart';
15+
import 'package:omi/pages/settings/usage_page.dart';
1516
import 'package:omi/pages/settings/wrapped_2025_page.dart';
1617
import 'package:omi/providers/app_provider.dart';
1718
import 'package:omi/providers/auth_provider.dart';
@@ -80,6 +81,15 @@ class _AppShellState extends State<AppShell> {
8081
),
8182
);
8283
}
84+
} else if (uri.pathSegments.first == 'unlimited') {
85+
if (mounted) {
86+
PlatformManager.instance.mixpanel.track('Plans Opened From DeepLink');
87+
Navigator.of(context).push(
88+
MaterialPageRoute(
89+
builder: (context) => const UsagePage(showUpgradeDialog: true),
90+
),
91+
);
92+
}
8393
} else if (uri.host == 'todoist' && uri.pathSegments.isNotEmpty && uri.pathSegments.first == 'callback') {
8494
// Handle Todoist OAuth callback
8595
final error = uri.queryParameters['error'];

web/frontend/public/.well-known/apple-app-site-association

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
"/":"/apps/*",
1414
"comment":"Matches any URL with a path that starts with /apps/."
1515
},
16+
{
17+
"/":"/unlimited",
18+
"comment":"Matches any URL with a path that starts with /unlimited."
19+
},
1620
{
1721
"/":"/wrapped",
1822
"comment":"Matches any URL with a path that starts with /wrapped."
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import { headers } from 'next/headers';
2+
import { Metadata } from 'next';
3+
4+
export const metadata: Metadata = {
5+
title: 'Omi Unlimited | Omi',
6+
description:
7+
'Unlock the full potential with Unlimited. Get advanced AI capabilities, longer memory retention, and more.',
8+
openGraph: {
9+
title: 'Omi Unlimited | Omi',
10+
description: 'Unlock the full potential with Unlimited.',
11+
type: 'website',
12+
},
13+
};
14+
15+
function isMobileDevice(userAgent: string): boolean {
16+
return /android|iphone|ipad|ipod|mobile/i.test(userAgent);
17+
}
18+
19+
function getAppStoreLink(userAgent: string): string {
20+
const isAndroid = /android/i.test(userAgent);
21+
return isAndroid
22+
? 'https://play.google.com/store/apps/details?id=com.friend.ios'
23+
: 'https://apps.apple.com/us/app/friend-ai-wearable/id6502156163';
24+
}
25+
26+
export default async function UnlimitedPage() {
27+
const userAgent = headers().get('user-agent') || '';
28+
const isMobile = isMobileDevice(userAgent);
29+
const appStoreLink = getAppStoreLink(userAgent);
30+
const deepLink = 'omi://h.omi.me/unlimited';
31+
32+
return (
33+
<div className="flex min-h-screen flex-col items-center justify-center bg-[#0B0F17] px-4 text-center">
34+
<h1 className="mb-4 text-4xl font-bold text-white">Omi Unlimited</h1>
35+
<p className="mb-8 max-w-md text-lg text-gray-400">
36+
Unlock the full potential with Omi Unlimited.
37+
</p>
38+
39+
{isMobile ? (
40+
<div className="flex flex-col gap-4">
41+
<a
42+
href={deepLink}
43+
className="rounded-xl bg-white px-8 py-4 text-lg font-semibold text-[#0B0F17] transition-all duration-300 hover:bg-gray-200"
44+
>
45+
Open in App
46+
</a>
47+
<a
48+
href={appStoreLink}
49+
className="text-gray-400 underline hover:text-white"
50+
>
51+
Don't have the app? Download here
52+
</a>
53+
</div>
54+
) : (
55+
<>
56+
<p className="mb-6 text-gray-400">
57+
Visit this page on your mobile device to upgrade.
58+
</p>
59+
<div className="flex gap-4">
60+
<a
61+
href="https://apps.apple.com/us/app/friend-ai-wearable/id6502156163"
62+
target="_blank"
63+
rel="noopener noreferrer"
64+
className="rounded-xl bg-white px-6 py-3 font-semibold text-[#0B0F17] transition-all duration-300 hover:bg-gray-200"
65+
>
66+
Download for iOS
67+
</a>
68+
<a
69+
href="https://play.google.com/store/apps/details?id=com.friend.ios"
70+
target="_blank"
71+
rel="noopener noreferrer"
72+
className="rounded-xl bg-white px-6 py-3 font-semibold text-[#0B0F17] transition-all duration-300 hover:bg-gray-200"
73+
>
74+
Download for Android
75+
</a>
76+
</div>
77+
</>
78+
)}
79+
</div>
80+
);
81+
}

0 commit comments

Comments
 (0)