Roadmap: Integrate SonarPen SDK into Krita
Open, Needs TriagePublic

Description

I have written a tentative roadmap on what we should do to integrate SonarPen SDK into Krita

  1. Move SonarPen SDK C++ into a common location
    1. Link: https://invent.kde.org/greenblub/sonarpen-sdk-cpp
    2. Discuss if SonarPen people are going to maintain it
    3. Talk to sysadmins for a common location for Krita build tools and utilities
    4. Move the repo into a common location and give SonarPen developer developer's acsess
    5. Review the source code of this repo! Possibly ask a wider KDE community to review it
  1. Port all ext_sonarpen-sdk-cpp commits into our SDP repo
    1. Link: https://invent.kde.org/greenblub/krita-deps-management
    2. Change repository links back to our main repo
    3. Squash extra commits that just cahnge qt's git tag
    4. Make sure SDK builds on all four Android platforms
    5. Build ext_sonarpen-sdk-cpp packages
  1. Port all Qt-related changes
    1. Link: https://invent.kde.org/greenblub/qtbase
    2. Reveiw: is it okay that SonarPenUtilitiesNative is created for all instances of Krita, even though they don't have this device?
    3. Build an updated ext_qt package
  1. Intergrate into Krita
    1. Link: https://invent.kde.org/greenblub/krita/
dkazakov created this task.Aug 7 2024, 9:17 AM
dkazakov added a comment.EditedJan 15 2025, 5:21 PM

Okay, the current issues with the implementation:

  1. SonarPenUtilitiesNative is created for all instances of Krita, even when the user doesn't have a sonarpen device. It looks incorrect. We shouldn't increase Krita's footprint for the users who don't have SonarPen device.

    1.1) What happens if Krita initializes Sonarpen SDK, but the user has headphones attached instead of Sonarpen? 1.2) I guess the switch should be implemented like the switch we do for the WinTab/WinInk switch on Windows: as an attribute to QApplication.
  1. The patch adds two more required permissions to Krita:
    • android.permission.READ_EXTERNAL_STORAGE
    • android.permission.RECORD_AUDIO

      We need clear documentation where these permissions are requested and what happens if the user refuses to provide them.
  1. I cannot see where file sonarpen.aar comes from. I guess that is exactly the place where the permissions request comes from. How can I find it?
  1. The files in sonarpen-sdk-cpp library has incorrect license headers. Instead of the full GLP3 license, the headers should have an SPDX header, like this from KisAdaptedLock.h
/*
 *  SPDX-FileCopyrightText: 2024 Company Name or Person Name <contact.email@exmaple.com>
 *
 *  SPDX-License-Identifier: GPL-3.0-or-later
 */

We cannot have a precompiled class in our package. The class should be built as part of the build process for the sonarpen-sdk-cpp:

https://invent.kde.org/greenblub/sonarpen-sdk-cpp/-/tree/master/dex?ref_type=heads