[GH-ISSUE #513] Unreliable Item Addition via Share Menu on Android #329

Open
opened 2026-03-02 11:48:54 +03:00 by kerem · 7 comments
Owner

Originally created by @lucius346346 on GitHub (Oct 8, 2024).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/513

Originally assigned to: @xuatz on GitHub.

Description:
When using the Android share menu to add items to Hoarder, the process is unreliable. Links are either:

  • Not added at all, or
  • Added multiple times.

For example:

  1. I add a link to Hoarder via the share menu.
  2. I see the "Hoarded" screen as expected, then exit the app.
  3. Upon returning to the app, I see the same screen again, and Hoarder adds the item again, resulting in duplicate entries.

Steps to Reproduce:
Use the share menu outside of the Hoarder app (e.g., from a browser) to add a link.
Observe if the link is added correctly, or if it is added multiple times.
Exit and re-enter the app to check for duplicates.

Expected Behavior:
The shared link should be added once, with no duplicates or missing entries.

Actual Behavior:
Links may not be added at all or may be added multiple times.

Device/Environment:
Platform: Android
Version: 12
App Version: 1.6.3

Originally created by @lucius346346 on GitHub (Oct 8, 2024). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/513 Originally assigned to: @xuatz on GitHub. **Description:** When using the Android share menu to add items to Hoarder, the process is unreliable. Links are either: - Not added at all, or - Added multiple times. For example: 1. I add a link to Hoarder via the share menu. 2. I see the "Hoarded" screen as expected, then exit the app. 3. Upon returning to the app, I see the same screen again, and Hoarder adds the item again, resulting in duplicate entries. **Steps to Reproduce:** Use the share menu outside of the Hoarder app (e.g., from a browser) to add a link. Observe if the link is added correctly, or if it is added multiple times. Exit and re-enter the app to check for duplicates. **Expected Behavior:** The shared link should be added once, with no duplicates or missing entries. **Actual Behavior:** Links may not be added at all or may be added multiple times. **Device/Environment:** Platform: Android Version: 12 App Version: 1.6.3
Author
Owner

@nicktheone commented on GitHub (Oct 21, 2024):

Facing kind of the same issue. In my case I've yet to see duplicate entries but I can easily reproduce the fail to add behavior when sharing a link.

Basically, if Hoarder is already open in background, when sharing a link from another app I get success screen and it prompts me to add the new entry to a list. If, instead, the app wasn't already open in background sharing a link from another apps just opens Hoarder. I need to repeat the sharing process in order to actually add to the database.

<!-- gh-comment-id:2427266790 --> @nicktheone commented on GitHub (Oct 21, 2024): Facing kind of the same issue. In my case I've yet to see duplicate entries but I can easily reproduce the fail to add behavior when sharing a link. Basically, if Hoarder is already open in background, when sharing a link from another app I get success screen and it prompts me to add the new entry to a list. If, instead, the app wasn't already open in background sharing a link from another apps just opens Hoarder. I need to repeat the sharing process in order to actually add to the database.
Author
Owner

@gilbrotheraway commented on GitHub (Nov 10, 2024):

same here, would a pwa work better?

<!-- gh-comment-id:2466823904 --> @gilbrotheraway commented on GitHub (Nov 10, 2024): same here, would a pwa work better?
Author
Owner

@MohamedBassem commented on GitHub (Nov 17, 2024):

I can't seem to reproduce either of the two problems. Can someone record their screen showing the repro?

<!-- gh-comment-id:2481672889 --> @MohamedBassem commented on GitHub (Nov 17, 2024): I can't seem to reproduce either of the two problems. Can someone record their screen showing the repro?
Author
Owner

@lucius346346 commented on GitHub (Nov 18, 2024):

I'll try to record it, but it's hard for me because it happens randomly. Is there a way we can find something in the logs?

<!-- gh-comment-id:2482131339 --> @lucius346346 commented on GitHub (Nov 18, 2024): I'll try to record it, but it's hard for me because it happens randomly. Is there a way we can find something in the logs?
Author
Owner

@LittleBigFrog commented on GitHub (Jan 6, 2025):

I can confirm the same issue.

Facing kind of the same issue. In my case I've yet to see duplicate entries but I can easily reproduce the fail to add behavior when sharing a link.

Basically, if Hoarder is already open in background, when sharing a link from another app I get success screen and it prompts me to add the new entry to a list. If, instead, the app wasn't already open in background sharing a link from another apps just opens Hoarder. I need to repeat the sharing process in order to actually add to the database.

From what it's worth, chatgpt siuggestions:
Intent Handling on Cold Start: Ensure the Intent.ACTION_SEND is processed in the onCreate method for fresh launches, and verify that the shared data (Intent.EXTRA_TEXT) is correctly extracted and acted upon.
Warm Start Handling: Implement onNewIntent to handle the share intent when the app is already running to avoid missing actions.
Launch Mode: Configure the activity as singleTask or singleTop in the manifest to prevent multiple instances and ensure proper intent routing.
Intent Filter: Verify that the intent filter in the manifest correctly supports ACTION_SEND with the appropriate MIME type (text/plain).
Data Persistence: Consider saving shared data temporarily (e.g., in SharedPreferences) if there's a risk of missing the intent during lifecycle transitions.

<!-- gh-comment-id:2573877808 --> @LittleBigFrog commented on GitHub (Jan 6, 2025): I can confirm the same issue. > Facing kind of the same issue. In my case I've yet to see duplicate entries but I can easily reproduce the fail to add behavior when sharing a link. > > Basically, if Hoarder is already open in background, when sharing a link from another app I get success screen and it prompts me to add the new entry to a list. If, instead, the app wasn't already open in background sharing a link from another apps just opens Hoarder. I need to repeat the sharing process in order to actually add to the database. From what it's worth, chatgpt siuggestions: Intent Handling on Cold Start: Ensure the Intent.ACTION_SEND is processed in the onCreate method for fresh launches, and verify that the shared data (Intent.EXTRA_TEXT) is correctly extracted and acted upon. Warm Start Handling: Implement onNewIntent to handle the share intent when the app is already running to avoid missing actions. Launch Mode: Configure the activity as singleTask or singleTop in the manifest to prevent multiple instances and ensure proper intent routing. Intent Filter: Verify that the intent filter in the manifest correctly supports ACTION_SEND with the appropriate MIME type (text/plain). Data Persistence: Consider saving shared data temporarily (e.g., in SharedPreferences) if there's a risk of missing the intent during lifecycle transitions.
Author
Owner

@jrianbensen commented on GitHub (Apr 19, 2025):

I have the same issue from time to time.

It seems to me that the app needs to have left the hoarding interface of the previous item before it can grab another one. This is my observation:

  1. Hoard page X through android share.
  2. Leave the app before it returns to the home screen.
  3. Hoard page Y through the android share.
  4. --> The app opens to the "hoarded" confirmation for the page X and fails to hoard page Y.

It's easy to get confused by the erroneous confirmation and just move on.

<!-- gh-comment-id:2816856244 --> @jrianbensen commented on GitHub (Apr 19, 2025): I have the same issue from time to time. It seems to me that the app needs to have left the hoarding interface of the previous item before it can grab another one. This is my observation: 1. Hoard page X through android share. 2. Leave the app before it returns to the home screen. 3. Hoard page Y through the android share. 4. --> The app opens to the "hoarded" confirmation for the page X and fails to hoard page Y. It's easy to get confused by the erroneous confirmation and just move on.
Author
Owner

@ferdinandyb commented on GitHub (Oct 21, 2025):

My observation is that if karakeep is not already running, then trying to hoard via share will not work. I reliably need to do it twice when I'm doing it without previously opening karakeep, after that it works every time. I'm pretty sure that on a cold start the sharing part is lost, only the app is opened.

<!-- gh-comment-id:3425070621 --> @ferdinandyb commented on GitHub (Oct 21, 2025): My observation is that if karakeep is not already running, then trying to hoard via share will not work. I reliably need to do it twice when I'm doing it without previously opening karakeep, after that it works every time. I'm pretty sure that on a cold start the sharing part is lost, only the app is opened.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#329
No description provided.