Skip to content
This repository has been archived by the owner on Jun 18, 2023. It is now read-only.

Commit

Permalink
Add support for deep link scheme aware and aware-ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
JulioV committed Apr 28, 2020
1 parent e525245 commit 7d1f276
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions aware-phone/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@
android:host="*"
android:pathPattern="/.*index.php/webservice/index/.*"
android:scheme="https" />
<data
android:host="*"
android:pathPattern="/.*index.php/webservice/index/.*"
android:scheme="aware" />
<data
android:host="*"
android:pathPattern="/.*index.php/webservice/index/.*"
android:scheme="aware-ssl" />
</intent-filter>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ public void afterTextChanged(Editable s) {
if (Aware.DEBUG) Log.d(Aware.TAG, "AWARE Link detected: " + getIntent().getDataString() + " SCHEME: " + scheme);

study_url = getIntent().getDataString();
if (scheme.equalsIgnoreCase("aware")) {
study_url = getIntent().getDataString().replace("aware://", "http://");
} else if (scheme.equalsIgnoreCase("aware-ssl")) {
study_url = getIntent().getDataString().replace("aware-ssl://", "https://");
}

Uri url = Uri.parse(study_url);
onboarding = url.getQueryParameter("participant");
Expand Down

0 comments on commit 7d1f276

Please sign in to comment.