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

Items added through "Share Menu" are sometimes lost #14

Open
jaynavar opened this issue Apr 9, 2019 · 7 comments
Open

Items added through "Share Menu" are sometimes lost #14

jaynavar opened this issue Apr 9, 2019 · 7 comments
Labels
bug Something isn't working

Comments

@jaynavar
Copy link
Contributor

jaynavar commented Apr 9, 2019

I've experienced a few times now where I used Android's built-in share menu to share a link/site/tweet/etc. to Quick Dynalist, however the link was never saved. I haven't been able to reproduce reliably, and it happens very rarely. However, the fact that it does occur sometimes has forced me to manually check the link was added every time I use this feature, or instead copy the share link to my clipboard and manually add it using the Quick Dynalist quick add dialog (which has never lost an item).

Since the last update I tried to repro the issue by sharing 5-10 links, and none of them were dropped. However since this occurred rarely, and it may have only occurred under specific conditions, I can't say for sure that this issue is now fixed.

@timediv have you seen this issue before? Have there been any changes to the share menu add code path that could have fixed this bug in the latest update?

@louiskirsch
Copy link
Owner

I have revised the sharing functionality in version 2.5.1

Has it ever happened since then? I'm relatively sure this issue does not happen after the revision.

@jaynavar
Copy link
Contributor Author

jaynavar commented Apr 9, 2019

I don't think I've seen it since! 😃

Out of curiosity, any ideas what could have been causing the issue in the old code?

@jaynavar jaynavar closed this as completed Apr 9, 2019
@louiskirsch
Copy link
Owner

The close callback of the bottom sheet that pops up might not be called in all cases, for instance if another quick dynalist activity is started before the bar is closed. Unfortunately saving was done in this callback.

@jaynavar
Copy link
Contributor Author

jaynavar commented Apr 16, 2019

So I experienced this issue again today running v2.5.1. I was also able to figure out the steps to reproduce, and can 100% reliably reproduce the issue.

Repro steps:

  1. Open the Dynalist app (not Quick Dynalist, but the regular Dynalist app).
  2. Open YouTube app (Dynalist should now be the most recent app in your "recent apps" list) and start playing a video (this issue will not occur unless a video is playing).
  3. While the video is playing, attempt to share that video (or another video in the app) to Quick Dynalist via the share menu.
  4. You should now observe that the YouTube video starts playing in a pop-up window, and you are brought back to your most recent app (in this case Dynalist), and the "Quick Dynalist share menu lower bar UI" should still appear as normal as an overlay on your most recent app.
  5. After a few seconds the Quick Dynalist share overlay will disappear (as is expected), however the item is never added to the Inbox.

I have a feeling this is a bad interaction between how YouTube handles the share menu with an actively playing video (i.e. switching view to a pop-up and returning to most recent app) and how Quick Dynalist relies on the activities to remain active. I tested this behavior on other sharing menu options, including Dynalist's native share feature, and none of them failed to "share/add" the item, so this appears to be fixable.

Another important thing to note is that in Step 1 above, the other app that you open first (that will be reopened after sharing) does not need to be Dynalist. I was able to repro using many different apps. However, if you do not have ANY apps open, YouTube will punt you back to the homescreen (instead of the most recent app, as there are none), and the item is successfully added by Quick Dynalist! So it seems there's some issue with the main activity view being switched to a different app while the share code is running that's causing issues, since there is no issue when it just returns back to the home screen instead.

@jaynavar jaynavar reopened this Apr 16, 2019
@louiskirsch
Copy link
Owner

louiskirsch commented Apr 16, 2019

Wow okay thanks for this great bug report and reproducibility. I assume I can only reproduce this with YouTube premium?
Youtube remains playing in foreground and the item is added when I try your steps.

@jaynavar
Copy link
Contributor Author

I believe YouTube Picture-in-Picture is supported on all devices running a relatively new version of Android. I don't think it requires YouTube premium, but you may have to explicitly enable PiP in the settings. It could also be region specific and not available in your country (which would make this a lot harder for you to reproduce ☹️).

@jaynavar
Copy link
Contributor Author

jaynavar commented Apr 16, 2019

From YouTube support page (https://support.google.com/youtube/answer/7552722?co=GENIE.Platform%3DAndroid&hl=en):

Picture-in-picture is currently only available to:
- YouTube Premium members on Android mobile devices, worldwide.
- US Android users running Android Oreo or greater, with ad supported PiP playback.

This will certainly make this a lot trickier to fix. Let me know if there's any debug logs I can send over that could help.

@louiskirsch louiskirsch added the bug Something isn't working label Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants