[Jetpack App] Add deep links from Calypso's app banners #17107
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In Automattic/wp-calypso#67013, the URIs for deep links from Calypso's app banners to the Android app were updated for the new Jetpack app:
intent://post/#Intent;scheme=jetpack;package=com.jetpack.android;end;
intent://notifications/#Intent;scheme=jetpack;package=com.jetpack.android;end;
intent://read/#Intent;scheme=jetpack;package=com.jetpack.android;end;
intent://stats/#Intent;scheme=jetpack;package=com.jetpack.android;end;
These URIs follow the same structure as those used for the WordPress app, except the
scheme
andpackage
names have been updated to reflect the Jetpack app.In order for the deep links to work, I have taken a look at the intents set up here in the WordPress app's manifest file. These have been copied to the Jetpack app's manifest file, with the only change being that the
scheme
has been updated fromwordpress
tojetpack
.Testing
With this branch checked out and the Jetpack app running in an emulator, run the following command in Android Studio's terminal to confirm the
jetpack
custom scheme works to open the correct sections:adb shell am start -a android.intent.action.VIEW -d "jetpack://post" com.jetpack.android.prealpha
adb shell am start -a android.intent.action.VIEW -d "jetpack://notifications" com.jetpack.android.prealpha
adb shell am start -a android.intent.action.VIEW -d "jetpack://read" com.jetpack.android.prealpha
adb shell am start -a android.intent.action.VIEW -d "jetpack://stats" com.jetpack.android.prealpha
Regression Notes
The deep links may work in a way that isn't intended.
Manual testing.
There are existing tests in place for deep links, which should cover these new additions.
PR submission checklist:
RELEASE-NOTES.txt
if necessary.