Skip to content

Commit

Permalink
Merge pull request #430 from dimagi/sr/google
Browse files Browse the repository at this point in the history
Publish android assetlinks for deeplinking
  • Loading branch information
sravfeyn authored Nov 13, 2024
2 parents c3fbdcd + be0f47d commit 02c5899
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@

from commcare_connect.organization.views import organization_create

from . import views

urlpatterns = [
path("", TemplateView.as_view(template_name="pages/home.html"), name="home"),
path("about/", TemplateView.as_view(template_name="pages/about.html"), name="about"),
path(".well-known/assetlinks.json", views.assetlinks_json, name="assetlinks_json"),
# Django Admin, use {% url 'admin:index' %}
path(settings.ADMIN_URL, admin.site.urls),
path("o/", include("oauth2_provider.urls", namespace="oauth2_provider")),
Expand Down
30 changes: 30 additions & 0 deletions config/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from django.http import JsonResponse


def assetlinks_json(request):
assetfile = [
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "org.commcare.dalvik",
"sha256_cert_fingerprints":
[
"88:57:18:F8:E8:7D:74:04:97:AE:83:65:74:ED:EF:10:40:D9:4C:E2:54:F0:E0:40:64:77:96:7F:D1:39:F9:81",
"89:55:DF:D8:0E:66:63:06:D2:6D:88:A4:A3:88:A4:D9:16:5A:C4:1A:7E:E1:C6:78:87:00:37:55:93:03:7B:03"
]
}
},
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "org.commcare.dalvik.debug",
"sha256_cert_fingerprints":
[
"88:57:18:F8:E8:7D:74:04:97:AE:83:65:74:ED:EF:10:40:D9:4C:E2:54:F0:E0:40:64:77:96:7F:D1:39:F9:81"
]
}
},
]
return JsonResponse(assetfile, safe=False)

0 comments on commit 02c5899

Please sign in to comment.