drawpile / Drawpile

A collaborative drawing program
http://drawpile.net/
GNU General Public License v3.0
1.04k stars 130 forks source link

Android port #357

Closed blurymind closed 1 year ago

blurymind commented 8 years ago

I recently got a samsung note 10.1 tablet with a pressure sensitive s-pen.

After trying to look for a paintchat app for android - i found none! Not even paid ones.

Would it be possible to make a port of drawpile to android? I would vouch to test it and even support it's development by purchasing it on the app store. Even as an apk that is not hosted at the android market, i would still love to have it.

Almost everyone now has a tablet or a smartphone. A lot of these devices come with a pen - if not pressure sensitive pens for them are easy and cheap to acquire. Even wacom now has android tablets sold.

If anyone else vouches to test a future port or has some information, please state your device and why you would love to have drawpile running on it.

For me personally these are the reasons:

I know that there would be some design challenges in this- but i strongly believe that it would be worth the effort - especially if the goal is to get drawpile in the hands of more people! Tvpaint is an example of a port being done right -as their port is basically the same as the desktop app almost! However tvpaint on android costs 1500£ - which in my humble opinion is an insane price tag

callaa commented 8 years ago

This is certainly something I would like to try. In the 2.0 branch, I've managed to separate out the engine code from the UI code (mostly at least,) and I am planning on writing a QML based alternative UI for tablet PCs. (A partial proof-of-concept QML UI already exists from the early 2.0 cycle when I tried implement the canvas with QtQuick rather than the QGraphicsScene.) This could also serve as the basis for the Android port.

blurymind commented 8 years ago

you have my full and complete support! This will once again make drawpile the first application ever to do something.

The first time was collaborative animation

and now - the first to do paintchat on android/mobile

aletheus commented 6 years ago

I am also totally down for helping out however I can.

aletheus commented 6 years ago

So what exactly would be involved in this process?

callaa commented 6 years ago

I haven't tried building any Android apps with Qt yet, but this is how I would go about it:

First, I'd check out Qt's Android tutorials and make a "hello world" application to make sure all the dev tools work. Next, I'd try to incorporate that hello world app into Drawpile's project structure (a new folder: src/android/) The source code is split into multiple packages: client, shared, desktop and server. The desktop and server packages contain the shells for the client and server. They are not needed in the Android version. The client package contains all the GUI-agnostic client code and the shared package contains all the code shared by the client and the server (including the server core.)

There are two ways this can go from here:

The best way is that the Android app can be built with cmake, just like the Windows, Linux and OSX versions. (This may help)

If that isn't possible, things get difficult. The whole thing must be built with qmake, so I'd need to write a qmake file that replicates the cmake files. (Alternatively, a new project could be started from scratch and the relevant files copied over from Drawpile's source tree, but this would only be good for a proof-of-concept or a hard fork that goes it's own way, since keeping the new project in sync with the original would be very hard.)

Now, if I've gotten as far as building an Android app with client and shared libs linked in, I can start the actual work.

First thing that's needed is a canvas. There is a semi-working QML canvas implementation in src/mobile that can work as a starting point. Then perhaps a basic pen tool to make sure drawing works.

Next, I would add a screen for joining a session. All the code is in libdrawpileclient, so it should only be a matter of implementing the UI. Once that works, it's "only" a matter of adding all the rest of the missing features. The Android version doesn't have to have all the same features as the desktop version. For example, I would leave out the built-in server entirely.

Another Android specific thing that might complicate things is that if the application loses focus, you get disconnected from the session. Apps that need an uninterrupted connection typically use a background job to handle it, I think. It should be possible to do that in a Qt app too, but I have no idea how.

aletheus commented 6 years ago

Thank you for this comprehensive orientation!! I'm an artist, not a programmer, but I've done a little modular programming, action-script (back when flash was owned by macromedia) and php development, so I'm not totally clueless. Will start with the qt android tutorials as you suggest and go from there. Again, thank you for giving this some direction.

aletheus commented 6 years ago

What about this? https://developer.android.com/ndk/guides/cmake.html

callaa commented 6 years ago

That looks promising. Even if the final build phase can't be done with cmake, according to that page, it should still be possible to build the libraries. Then the full build would go like this:

  1. Build libdrawpileclient and libshared with cmake
  2. Build the Android app with Qt creator / qmake
aletheus commented 6 years ago

Okay great. will get started in the next week or so and post any questions here for the record.

Charmandrigo commented 6 years ago

is this still alive? For ages the FAQ keeps saying is possible to make it for android

aletheus commented 6 years ago

I have had start from basics.. I'm not a developer, I'm an artist... so I'm still working on just learning javascript online. Then I was going to move on to C++ then android app development, then actually create an official android fork. But I've also been busy with commission work..so, if it has not been born yet, it cannot be dead. Lol. Development learning progress for me is slow as I'm busy with artwork.

GlitchyPSIX commented 5 years ago

Hmmm... what happened to this?

Wade821 commented 5 years ago

Just a lack of time. Callaa is working on other features to improve Drawpile. Fixing bugs, working on the thick server which doesn't require session resets, and many other things. As a one person developing team, it would be a lot of work to make happen. Calla also spends a lot of time probably reviewing questions in the official Discord and questions here on GitHub, so I'm trying to help keep him focused on the issues that actually require his direct input by assisting with the technical issues.

Did you know Drawpile's code base is somewhere around 30,000 lines (and probably more by now) of code? For perspective, I made a script (not programming) to install Drawpile on a mini computer called Raspberry Pi running the operating system Raspbian. That script is about 2,600 lines. If I copy and paste that into a word document, that's about 59 pages to print out... which means Drawpile's code would probably take about 700 pages. So it's a massive amount of work to do what he's doing. Without more help, development will be slowed down. That's why I try to help here and on Discord since I lack the programming skills to help myself.

And a drawpile port would be neat to see myself, but I can wait for that... some of the new features that have come down the way have been excellent. Personally, the inspector tool and the thick server are my personal favorites... along with the improved paint engine. Anyway, that's more than likely the case.

GlitchyPSIX commented 5 years ago

You're acting as if I didn't know some of the things you've mentioned! 😛 Saying there wasn't enough time is a good enough reply, I can understand the issue. I may pay a visit to see what I can do.

Wade821 commented 5 years ago

Not everyone does though, nor does everyone know that Callaa is Finnish. That's important because he can't legally ask for donations to work on Drawpile full time without certain commitments and a legal form stating he can do so, which I believe he has to apply for and it comes with other possible issues as well that he's concerned about if he went that route. So Callaa also works on this in his free time, basically.

GlitchyPSIX commented 5 years ago

Ouch, that's another thing to add to the table, and I perfectly understand the feeling as it kind of happens with my own works (Except the donation law).

Wade821 commented 5 years ago

That doesn't mean I've asked him about doing donations and I got his paypal email address from him. It's posted on the # announcements channel in the official Discord. Not gonna post it here because web crawler bots. But yeah, hopefully that clarifies a bit more. That's part of why I want to help, I love this program. He can't do it all by himself... quickly, anyway.

GlitchyPSIX commented 5 years ago

That's fine, again, understandable.

blurymind commented 5 years ago

The android port would be a lot of work, but could potentially be used to fund the project. I wouldn't mind paying to get it on android as an app. The desktop version could remain free, while the android could be sold

Wade821 commented 5 years ago

I suppose so, but given Callaa's consideration of fundraising and the local Finnish laws restricting it without permits, I'd assume that is also out of the question for him. That's more of a question for him to answer, however.

blurymind commented 5 years ago

It's not fundraising when it is sold on the app store

On Fri, Jun 28, 2019, 11:58 AM Wade821 notifications@github.com wrote:

I suppose so, but given Callaa's consideration of fundraising and the local Finnish laws restricting it without permits, I'd assume that is also out of the question for him. That's more of a question for him to answer, however.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/drawpile/Drawpile/issues/357?email_source=notifications&email_token=ABRRWVIY3ZELO3H6OCTFHHLP4XVELA5CNFSM4CNXH6KKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYZYSGI#issuecomment-506693913, or mute the thread https://github.com/notifications/unsubscribe-auth/ABRRWVIHZCUM6ZYMMWWZ6C3P4XVELANCNFSM4CNXH6KA .

callaa commented 5 years ago

Right, selling software is fine. Drawpile license even permits it.

It seems that Qt's support for using cmake to build Android projects has improved since this issue was opened, so it might be easier to start the port now.

Wade821 commented 5 years ago

It's not fundraising when it is sold on the app store On Fri, Jun 28, 2019, 11:58 AM Wade821 @.***> wrote: I suppose so, but given Callaa's consideration of fundraising and the local Finnish laws restricting it without permits, I'd assume that is also out of the question for him. That's more of a question for him to answer, however. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#357?email_source=notifications&email_token=ABRRWVIY3ZELO3H6OCTFHHLP4XVELA5CNFSM4CNXH6KKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYZYSGI#issuecomment-506693913>, or mute the thread https://github.com/notifications/unsubscribe-auth/ABRRWVIHZCUM6ZYMMWWZ6C3P4XVELANCNFSM4CNXH6KA .

Right. I was trying to say however that Callaa may have his reasons for not doing so, given his resistance to any kind of fundraising efforts. It would seem to me that if he needed some kind of certificate or something for fundraising in Finland, there might be some sort of requirement for selling a product or creating a business per say from the resulting cash flow of said product sales. I'm no legal expert in Finnish law.

However, it's a moot point since Callaa answered. Just was trying to set an expectation there may be legal concerns for both donations or selling products within Finland that I'm not aware of off hand.

blurymind commented 5 years ago

I don't think it's illegal to sell open source software. In fact Krita is sold on steam in order to fund it's development, even-thought it is free to download from their website. They still get revenue. There are plenty of other examples.

There are no laws to prevent you from publishing open source apps on the android store either. If there are some weird laws for fund raising you are reffering to, they will have absolutely no effect here.

I believe that tablets are an ideal type of a device for drawpile and will gladly spend 10$+ to get the ability to paintchat on my tablet with pressure sensitivity on the go. More over this is a huge opportunity to get this to a lot of new users- there is no other app on the mobile market that lets you paintchat. Drawpile not only lets you paintchat, it lets you collaboratively work on animation pencil tests.

Wade821 commented 5 years ago

I'm not saying it's illegal. Again, I'm not a legal law expert in Finland. All I meant to imply was that there was local restriction in regards to donations, so therefore it would be logical to infer that there may be restrictions on businesses and/or require something else that we aren't aware of given the laws in Finland. That's all. Callaa has been very resistant to even getting a general Drawpile paypal link as to not have to give out his personal email because even that may appear as some form of solicitation for donations, which that I know for certain is illegal in Finland without a license. What Krita does for its software isn't necessarily a good comparison for Drawpile, since they're based in the Netherlands.

So I assumed that he's considered paid options already, which is what I was trying to suggest. Doing things online doesn't necessarily remove local laws for him, depending on how said possible laws are structured. I'd love it if we could find a way to support him that works legally! Don't get me wrong, I wouldn't mind paying for an Android port either. I was simply providing food for thought, not trying to be antagonistic but rather provide information. Any further ideas on this would have to take Finnish laws into consideration and Callaa's standpoint on what he wants to do with it.

callaa commented 5 years ago

This discussion is starting to veer a bit off topic, I feel. As far as I know, there are no legal objections to selling the app on the Play Store. So far, I've been resistant to monetizing Drawpile in any way because, unless I could turn it into my actual job that pays all the bills, it would just be extra pressure for me.

Now, back to the topic of Android port:

The first thing that needs to be done is set up the build scripts. Something as simple as a "Hello World" app to begin with, but one that links all the Drawpile library code. After that, it will be possible to start working on the actual port: a UI optimized for a touch device with no keyboard. (And unfortunately, no pen support at this stage either, since I'm not sure if Qt's Android version supports it. Also, I don't know of any Android tablet other than Galaxy Note with stylus support.)

yareckon commented 4 years ago

hi @callaa, all Samsung Tablet size devices after the Galaxy Note series have stylus support (wacom style) but just dont come out of the box with styluses. Also, the status on QT android pen support has just changed: https://codereview.qt-project.org/c/qt/qtbase/+/109047

blurymind commented 4 years ago

@yareckon thats fantastic news! It should make it much easier to get stylus pressure on any samsung device with an s-pen

callaa commented 4 years ago

That sounds very good! Looks like Qt's support for using cmake with Android has improved too, which should help. That was previously a big stumbling block.

Charmandrigo commented 4 years ago

That sounds very good! Looks like Qt's support for using cmake with Android has improved too, which should help. That was previously a big stumbling block.

I hope you're being serious, this would not only make Drawpile available for android tablets with Wacom AES styluses, but also Pixelbook laptops and android smartphones with pen like the Galaxy Note series

mnh48 commented 4 years ago

I'm replying this here just to clear up as I see that the two people were talking about two different things and might causing both sides to confuse with each other.

Quoting this on one side:

there was local restriction in regards to donations [...] Doing things online doesn't necessarily remove local laws for him

Quoting this on other side:

As far as I know, there are no legal objections to selling the app on the Play Store.

the one side is saying about local Finnish law while the other is saying about legality to sell the app, these two are separate...

yes, he can sell the app or receive donation because it's not illegal to do so from Play Store viewpoint, but no, he can't sell the app or receive donation because it's illegal to do so from Finnish law viewpoint unless he specifically go through hectic of process to get the license to do so from his government, and the time spent to get the license, being reviewed, and finally approved would take away the precious time that he could use to focus on the development itself... not to mention the probability of him applying such license might make him lose his actual job outside of the development...

there's not much other ways, so he just stay safe by not accepting donation or selling anything... that way, he can still do what he's doing without breaking Finnish law.

Law is a very complicated matter and you need to look at multiple different sides when dealing with laws online.


back to the topic, I do want to see an Android port because it would make the program to be more accessible... but I wouldn't force anyone to make it when I read that his local law is restricting him to do so...

I actually found this thread because I wanted to join certain collaborative Drawpile session but I don't currently have any desktop devices and has been doing everything on my Android smartphone gifted to me by my aunt, this thread of issue pops up when searching for the Android version...

I guess I will have to try to find ways to emulate the Windows EXE to run on my phone then... or maybe I can run the linux appimage on the aarch64 Debian instance on my phone that I've been using to run GIMP, Inkscape and FontForge... not sure if Linux Drawpile actually support aarch64 but I will just try that, I guess... trying doesn't hurt

ottworks commented 1 year ago

Another potential customer here, :+1:

Wade821 commented 1 year ago

Inching ever closer towards a possible Android port as Drawpile 2.2 with Rust paint engine is in the works... don't know how soon that will be done. And there's still additional leg work to be done that I can't comment on, not being a developer myself. Just know that progress is being made.

askmeaboutlo0m commented 1 year ago

(I've taken over development on Drawpile, so I'm going through these tickets and organizing them.)

I've made an Android port, it'll be coming with Drawpile 2.2.