Clipboard API is different or permissioned on newer Androids? #54

Closed
opened 2025-04-21 14:45:29 -04:00 by idk · 2 comments
Owner

Since introducing the ability to copy the base32 of a tunnel pool in android I2PTunnel with a long-press, I've noticed that the functionality does not work on my Nokia which is running Android 9, but does work on my Motorola which is running Android 8.1. Need to track down what changed and add it to the setClipboard function.

Since introducing the ability to copy the base32 of a tunnel pool in android I2PTunnel with a long-press, I've noticed that the functionality does not work on my Nokia which is running Android 9, but does work on my Motorola which is running Android 8.1. Need to track down what changed and add it to the setClipboard function.
idk self-assigned this 2025-04-21 14:45:29 -04:00
idk closed this issue 2025-04-21 14:45:29 -04:00
Author
Owner

Turns out it was actually how I was doing the notification for the copying, cleaning up the notification channel and doing the notification with a Toast instead fixed it. The copy b32 action occurs when you long press the tunnel label in the very first I2PTunnel tab, on the label of the tunnel, not inside the tunnel config. Long pressing the label should pop a toast notification that the b32 was copied to the clipboard, which works in the current builds on my Nokia.

Turns out it was actually how I was doing the notification for the copying, cleaning up the notification channel and doing the notification with a Toast instead fixed it. The copy b32 action occurs when you long press the tunnel label in the very first I2PTunnel tab, on the label of the tunnel, not inside the tunnel config. Long pressing the label should pop a toast notification that the b32 was copied to the clipboard, which works in the current builds on my Nokia.
Author
Owner

The only thing I can find is an Android 10 change, and it wouldn't apply to us:
https://www.androidpolice.com/2019/09/04/dont-upgrade-to-android-10-if-you-rely-on-clipboard-syncing/

I'm now on Android 10.

I guess this is for servers only? on the server i2ptunnel page, there's a b32 and a clipboard icon next to it. clicking the icon works and displays 'address copied to clipboard', and I verified it's in the clipboard. Long press on the b32 does nothing. Is that where you long press? I don't know why we need a long press supported anyway if there's an icon right next to it.

The only thing I can find is an Android 10 change, and it wouldn't apply to us: https://www.androidpolice.com/2019/09/04/dont-upgrade-to-android-10-if-you-rely-on-clipboard-syncing/ I'm now on Android 10. I guess this is for servers only? on the server i2ptunnel page, there's a b32 and a clipboard icon next to it. clicking the icon works and displays 'address copied to clipboard', and I verified it's in the clipboard. Long press on the b32 does nothing. Is that where you long press? I don't know why we need a long press supported anyway if there's an icon right next to it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: I2P_Developers/i2p.android.base#54
No description provided.