Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Jetpack App] Add deep links from Calypso's app banners #17107

Merged
merged 1 commit into from
Sep 1, 2022

Conversation

SiobhyB
Copy link
Contributor

@SiobhyB SiobhyB commented Aug 31, 2022

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:

  • Editor: intent://post/#Intent;scheme=jetpack;package=com.jetpack.android;end;
  • Notifications: intent://notifications/#Intent;scheme=jetpack;package=com.jetpack.android;end;
  • Reader: intent://read/#Intent;scheme=jetpack;package=com.jetpack.android;end;
  • Stats: 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 and package 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 from wordpress to jetpack.

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:

  • Editor: adb shell am start -a android.intent.action.VIEW -d "jetpack://post" com.jetpack.android.prealpha
  • Notifications: adb shell am start -a android.intent.action.VIEW -d "jetpack://notifications" com.jetpack.android.prealpha
  • Reader: adb shell am start -a android.intent.action.VIEW -d "jetpack://read" com.jetpack.android.prealpha
  • Stats: adb shell am start -a android.intent.action.VIEW -d "jetpack://stats" com.jetpack.android.prealpha

Regression Notes

  1. Potential unintended areas of impact

The deep links may work in a way that isn't intended.

  1. What I did to test those areas of impact (or what existing automated tests I relied on)

Manual testing.

  1. What automated tests I added (or what prevented me from doing so)

There are existing tests in place for deep links, which should cover these new additions.


PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@SiobhyB SiobhyB self-assigned this Aug 31, 2022
@SiobhyB SiobhyB added this to the 20.7 milestone Aug 31, 2022
@SiobhyB SiobhyB changed the title Add deep links from app banners [Jetpack App] Add deep links from Calypso's app banners Aug 31, 2022
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Aug 31, 2022

You can test the Jetpack changes on this Pull Request by downloading an installable build (jetpack-installable-build-pr17107-55bb329.apk), or scanning this QR code:

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Aug 31, 2022

You can test the WordPress changes on this Pull Request by downloading an installable build (wordpress-installable-build-pr17107-55bb329.apk), or scanning this QR code:

With this commit, intents using the custom "jetpack" scheme are added to enable deep linking from Calypso's app banners to different sections in the Jetpack app.
@SiobhyB SiobhyB force-pushed the add/deep-links-from-app-banners branch from 16bcf08 to 55bb329 Compare August 31, 2022 18:56
@SiobhyB SiobhyB marked this pull request as ready for review August 31, 2022 19:03
@SiobhyB SiobhyB requested a review from zwarm August 31, 2022 19:03
Copy link
Contributor

@zwarm zwarm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SiobhyB - Works like a charm 👍

I tested as described, plus when both apps are installed on the device, and when a user is logged out. Used an emulator and physical device.

@zwarm zwarm merged commit 2ac2182 into trunk Sep 1, 2022
@zwarm zwarm deleted the add/deep-links-from-app-banners branch September 1, 2022 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants