Skip to content

Open a card from the lockscreen widget without unlock#3091

Open
hipgnose wants to merge 4 commits intoCatimaLoyalty:mainfrom
hipgnose:feature/lockscreen-card-viewing
Open

Open a card from the lockscreen widget without unlock#3091
hipgnose wants to merge 4 commits intoCatimaLoyalty:mainfrom
hipgnose:feature/lockscreen-card-viewing

Conversation

@hipgnose
Copy link
Copy Markdown

To open the activity over the lockscreen we can't use the setShowWhenLocked(true), we need to define the activity manifest as showWhenLocked=true, as stated in the Android Developers FAQ.

This PR adds the manifest configuration needed to open the activity and disable/hide the activity if the user chose DisableLockscreenWhileViewingCard setting

In the first commit I was finishing the activity if DisableLockscreenWhileViewingCard was off and the lockscreen was up, but I figured out that we can just call showWhenLocked(false) and the activity is sent to behind the lockscreen again.

Notes:

  • I tested this in my device and it works without glitches or activities jumping around.
  • I didn't use any llm, bot, code agent or something like that, for this or anything in my life.
  • Only the test startWithLoyaltyCardNoExpirySetExpiry is failing for me, it says it expected April 22 but receives April 21, I don't know why but maybe it 's something with my timezone?

Fixes #2916

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow opening card from lock screen widget without device unlock

1 participant