soduto / Soduto

Soduto is a KDEConnect compatible client for macOS. It allows better integration between your phones, desktops and tablets.
https://www.soduto.com
GNU General Public License v3.0
350 stars 50 forks source link

Can anyone guide me into how to implement any of those features? #15

Open XMOUFID opened 3 years ago

XMOUFID commented 3 years ago

Im completely new to all of this but find what you guys accomplish fascinating and I would love to implement them, how do I do that, also I realize this isn't exactly an issue, I couldn't find a way to contact you, and I've look around for tutorials and such, but they didn't help, if you could just provide a link or something to a guide that would be highly appreciated, thank you so much in advance! @l2dy @augo @giedrius-stanevicius @Ashinch anyone

Ashinch commented 3 years ago

Hey @XMOUFID , I am very sorry that my response is late because I have not recently concerned about this. Do you want to contribute to this project?

XMOUFID commented 3 years ago

@Ashinch no it's okay, I just would like if you could give me a simple guide or provide a link that explains the process of adding those features mentioned in the project, because when I install it, I don't get some of them like the battery percentage etc, so I assumed I have to do something else to implement them, if that's the case then any additional info would be appreciated, again thanks a lot!

Ashinch commented 3 years ago

@Ashinch no it's okay, I just would like if you could give me a simple guide or provide a link that explains the process of adding those features mentioned in the project, because when I install it, I don't get some of them like the battery percentage etc, so I assumed I have to do something else to implement them, if that's the case then any additional info would be appreciated, again thanks a lot!

Hey @XMOUFID, if you are DMG program downloaded from the Soduto website, it is that it is old, does not contain recent changes.

Want to get the latest commit, you need clone this repo, then manually build in Xcode, maybe you need to update the dependent library, this may not be smooth, maybe you can contact @giedrius-stanevicius , let him share a newest DMG program.

XMOUFID commented 3 years ago

@Ashinch yes I tried building it before, it shows up with many errors, thanks a lot for being helpful though, it's highly appreciated, and about @giedrius-stanevicius he doesn't seem to be active at the moment nor do I know of any way to reach him, also, is there a way you can send yours instead for now? but no pressure if you're busy. thanks once again!

giedrius-stanevicius commented 3 years ago

Hi @XMOUFID, sorry for delay answering. Currently I don't have a working build setup for Soduto, also I need to renew Apple developer subscription in order to be able to produce properly signed app binary. I've been quite busy lately, so I am not sure when I'll find time for all this. Will try to do it sooner, though.

Ashinch commented 3 years ago

... is there a way you can send yours instead for now...

@XMOUFID, Yes, as @giedrius-stanevicius said, I have no latest version of DMG here, I am sorry.

XMOUFID commented 3 years ago

@giedrius-stanevicius it's okay, take your time, not trying to add more pressure, and thanks a lot!

@XMOUFID, Yes, as @giedrius-stanevicius said, I have no latest version of DMG here, I am sorry.

@Ashinch no need to be sorry I understand, thanks though, you've been very helpful.

whispy commented 2 years ago

@giedrius-stanevicius would you be willing to accept a bounty to help out with getting the app updated and renewing your apple developer subscription?

giedrius-stanevicius commented 2 years ago

@whispy, can you write an email to soduto@soduto.com with details about what your needs are and what kind of bounty are you suggesting? Maybe we will manage to arrange something ;)

sannidhyaroy commented 1 year ago

@giedrius-stanevicius Can you tell me how I can access the notification access button from the received data packet from KDE Connect?

As a reference, this is the method which is written in the NotificationsService.swift file for accessing the App Name:

func getAppName() throws -> String? {
    try self.validateNotificationType()
    guard body.keys.contains(NotificationProperty.appName.rawValue) else { return nil }
    guard let value = body[NotificationProperty.appName.rawValue] as? String else { throw NotificationError.invalidAppName }
    return value
}

I want to get the list of action buttons in a similar way but haven't found a solution. I know it's possible as KDE Connect on Linux and other platforms can do this. Any idea?

yurikoles commented 1 year ago

https://github.com/KDE/kdeconnect-kde

giedrius-stanevicius commented 1 year ago

@sannidhyaroy What kind of action buttons do you have in mind? Looking at KDE Connect notifications plugin description (https://github.com/KDE/kdeconnect-kde/tree/master/plugins/notifications) it does not seem there are any possible actions except dismiss and reply

giedrius-stanevicius commented 1 year ago

@sannidhyaroy Ok, it seems there are actions, only README is not updated there. You may check https://github.com/KDE/kdeconnect-kde/blob/master/plugins/notifications/notification.cpp - at the bottom there is a function that parses the packet and extracts the actions and other notification properties.

sannidhyaroy commented 1 year ago

@giedrius-stanevicius After looking at the code for KDE Connect desktop app's notification plugin, I was able to get the action buttons as an array of strings. However, they obviously don't perform any kind of action in response to clicks as I can't figure out how to send a request to the other device to carry out the necessary operation.

Screenshot 2022-12-13 at 5 40 37 PM
giedrius-stanevicius commented 1 year ago

@sannidhyaroy KDE connect uses such code to send action. So you should make the same kind of packet too:

void NotificationsPlugin::sendAction(const QString &key, const QString &action)
{
    NetworkPacket np(PACKET_TYPE_NOTIFICATION_ACTION);
    np.set<QString>(QStringLiteral("key"), key);
    np.set<QString>(QStringLiteral("action"), action);
    sendPacket(np);
}
sannidhyaroy commented 1 year ago

@giedrius-stanevicius Thanks a lot! I was struggling with this for the past few days without making any progress but was finally able to successfully implement the feature, thanks to your immediate help!