Skip to content

Commit

Permalink
Add legacy URL support for demo app deeplinking (#950)
Browse files Browse the repository at this point in the history
* Add legacy host
* Fix app name after flavor renaming
* Show descriptive label in app chooser after QR code scan
* Add legacy host to env.properties.sample
  • Loading branch information
liviu-timar authored Dec 22, 2023
1 parent 110f9e4 commit 3a4821f
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 6 deletions.
4 changes: 3 additions & 1 deletion demo-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ If you want to build and run the [dogfooding app](https://github.com/GetStream/s
```
# Environment Variable for dogfooding app
DOGFOODING_RES_CONFIG_DEEPLINKING_HOST=pronto.getstream.io
PRODUCTION_RES_CONFIG_DEEPLINKING_HOST=getstream.io
DOGFOODING_RES_CONFIG_DEEPLINKING_HOST_LEGACY=stream-calls-dogfood.vercel.app
DOGFOODING_RES_CONFIG_DEEPLINKING_PATH_PREFIX=/
PRODUCTION_RES_CONFIG_DEEPLINKING_HOST=getstream.io
PRODUCTION_RES_CONFIG_DEEPLINKING_HOST_LEGACY=
PRODUCTION_RES_CONFIG_DEEPLINKING_PATH_PREFIX=/video/demos/
```

Expand Down
18 changes: 16 additions & 2 deletions demo-app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>
<uses-permission
android:name="com.google.android.gms.permission.AD_ID"
tools:node="remove" />

<application
android:name="io.getstream.video.android.App"
Expand Down Expand Up @@ -91,6 +93,16 @@
<data android:host="@string/deeplinking_host" />
<data android:pathPrefix="@string/deeplinking_path_prefix" />
</intent-filter>
<intent-filter>
<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" />
<data android:host="@string/deeplinking_host_legacy" />
<data android:pathPrefix="@string/deeplinking_path_prefix" />
</intent-filter>
</activity>

<activity
Expand All @@ -102,6 +114,8 @@
android:windowSoftInputMode="adjustResize" />

<!-- Prevent firebase from using advertisement ID -->
<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />
<meta-data
android:name="google_analytics_adid_collection_enabled"
android:value="false" />
</application>
</manifest>
6 changes: 4 additions & 2 deletions demo-app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
limitations under the License.
-->
<resources>
<string name="app_name">Stream Video Calls</string>
<string name="filter_call_link">call_link</string>
<string name="deeplinking_host">getstream.io</string> <!-- for CI build -->
<string name="deeplinking_host_legacy">getstream.io</string> <!-- for CI build -->
<string name="deeplinking_path_prefix">/video/demos</string> <!-- for CI build -->
<string name="filter_call_link">Join video call</string>
<string name="unauthorized_error">Your login token is expired. Please re-login.</string>
<string name="sign_in_description">Please sign in with your Google \nStream account.</string>
<string name="sign_in_google">Google Sign In</string>
Expand Down
19 changes: 19 additions & 0 deletions demo-app/src/production/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2023 Stream.io Inc. All rights reserved.
Licensed under the Stream License;
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://github.com/GetStream/stream-video-android/blob/main/LICENSE
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<string name="app_name">Stream Video Calls</string>
</resources>
4 changes: 3 additions & 1 deletion env.properties.sample
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Environment Variable for dogfooding app
DOGFOODING_RES_CONFIG_DEEPLINKING_HOST=
PRODUCTION_RES_CONFIG_DEEPLINKING_HOST=
DOGFOODING_RES_CONFIG_DEEPLINKING_HOST_LEGACY=
DOGFOODING_RES_CONFIG_DEEPLINKING_PATH_PREFIX=
PRODUCTION_RES_CONFIG_DEEPLINKING_HOST=
PRODUCTION_RES_CONFIG_DEEPLINKING_HOST_LEGACY=
PRODUCTION_RES_CONFIG_DEEPLINKING_PATH_PREFIX=

# Environment Variable for sample apps
Expand Down

0 comments on commit 3a4821f

Please sign in to comment.