keepass2android icon indicating copy to clipboard operation
keepass2android copied to clipboard

use package from activity context to support compose

Open GoodSir42 opened this issue 1 year ago • 5 comments

this fixes #2371 by using the bundle ID from the activity as a fallback. You might make this the default package ID and just treat this PR as a general hint in which direction to go. let me know if you need any further input on this matter.

It would be absolutely great to have compose support as I personally like the UI framework a lot :)

GoodSir42 avatar Apr 17 '24 18:04 GoodSir42

@GoodSir42 thanks for providing the PR! Is it intentional that you use the "fallback" immediately on the first level of recursion? Wouldn't it be more backward compatible to call ParseRecursive and afterwards use the _structure.ActivityComponent.PackageName if no PackageId was found?

PhilippC avatar Apr 29 '24 08:04 PhilippC

@PhilippC yes, that actually sounds far more reasonable 😄 C# is not my strong language and as I said it's probably best to use the PR as an inspiration with more knowledge about the project rather than merging it as is. The general idea was to determine the fallback bundle ID if nothing else could be found rather than androidapp://

GoodSir42 avatar Apr 29 '24 08:04 GoodSir42

I updated the PR so that the fallback will only be used if no information could be parsed from the structure

GoodSir42 avatar May 05 '24 07:05 GoodSir42

@PhilippC did you have any time to look into this? I have found the additions in the last update very helpful (especially the automatic OTP copy) and would absolutely love to have keepass2android to work with compose apps :)

GoodSir42 avatar Aug 01 '24 12:08 GoodSir42

sorry for not responding so long. I will have more time in the upcoming weeks. I'm currently cleaning up my mailbox and then will open the IDE again :-)

PhilippC avatar Sep 30 '24 09:09 PhilippC