ripme icon indicating copy to clipboard operation
ripme copied to clipboard

Porting to Android

Open Matt07211 opened this issue 8 years ago • 49 comments

I'm planning to port to android, below is my thoughts listed and some questions to be discussed.

Thoughts:

  • The porting of the program should be rather easy as a majority of android apps are java and so is this program, thus removes a lot of the complexity of the port.

  • The lowest sdk should be at around KitKat (4.4.4) cause devices before that time really wouldn't have the memory/resources for this type of task.

Questions to be talked about:

  • Once this planned app becomes something usable, how should we maintain it. Should we keep it a seperate fork and updating the base as needed or to merge the code back into the respository (and how would that be managed)

If there is any questions you have, feel free to post it so we can have a discussion about it.

Feel free to contribute to the project once it gets started. Note: I won't be able to start till next week, so.... ;)

Matt07211 avatar Jan 02 '17 01:01 Matt07211

You could make it a separate project and use this repo as a submodule, then you can handle updating the submodule version when you feel like it, and re-release the app on your own cadence.

Or you could make all of the necessary changes to build an Android app and PR to this repo. Ensure you don't break the build of the desktop app, etc.

Up to you. Let me know your thoughts.

metaprime avatar Jan 02 '17 01:01 metaprime

I might go the submodules (https://github.com/blog/2104-working-with-submodules) route.

It'll allow people contributing to the app (if it ever happens) to be able to work on the app components not the rip-me components. It'll also stop all the bloat that will come from the app development. Do you have any concerns or information that may be useful before I start using submodules.

I'll start on sketching the look of the app tonight.

Matt07211 avatar Jan 02 '17 01:01 Matt07211

@Matt07211 I agree. Separation of concerns. :)

For that route, rather than working in a fork of Ripme, you should create a new repo (maybe called RipmeAndroid?). Paste the link to your repo here when you've got it started. I'd like to keep tabs on the progress. I might even help out if I have the time and there's nothing urgent to resolve in Ripme.

metaprime avatar Jan 02 '17 03:01 metaprime

@Matt07211 with more than one Ripme-related project, we might want to create an organization for Ripme and related projects so things are centralized instead of hosted under different users.

metaprime avatar Jan 02 '17 03:01 metaprime

Yea I was planning to create a repo under the name "Ripme-Android". But if you plan to setup an organisation (which I think is a good idea) tell me :)

I can create the repo now/soon if you really want (License, readme and Rip-me submodule) anything else in the repo will have to wait till later in the week when I can start (and download Android studio).

Either way let me know.

Matt07211 avatar Jan 02 '17 04:01 Matt07211

I'll keep you updated if I go the organization route. I don't want to hijack this project too much. In any case, you can go ahead and set up your repo under your own username, and we can move it later.

metaprime avatar Jan 02 '17 04:01 metaprime

Don't worry about hijacking this project, I'll need input about stuff anyway ;) As I said I won't be able to start this project untill later this week (probably the 5th)/next week. So that at least gives you a couple of days to decide.

Matt07211 avatar Jan 02 '17 04:01 Matt07211

@Matt07211 I'm just saying it doesn't matter when I decide since you'll have your own fork anyway. It's just a matter of where the "main" copy is, and with GitHub and Git in general, that's just a social construct :)

metaprime avatar Jan 03 '17 01:01 metaprime

I don't need no philosophical intricacies on deciding where the fork will be located.

I'll have a fork created by next week anyway

Matt07211 avatar Jan 03 '17 05:01 Matt07211

Fair enough. I suppose it's something we should do at some point anyway. I'll need to change the update mechanism again so that future releases come from ripme/ripme instead of 4pr0n/ripme.

.... It's just that there are number of work items to do to set this up as an organization that make this a bit of a pain.

metaprime avatar Jan 03 '17 07:01 metaprime

By the sounds of it your gonna go the organisation route. Geuss refactoring the code is gonna be annoying.

If I may inquire (for a seperate project of mine), what is required to create an organisation? What is the actual process? If you don't have the time to answer then that's fine :)

Matt07211 avatar Jan 03 '17 10:01 Matt07211

Here's what I'll do. I'll make the organization, create a repo for Ripme-Android, and add you as a contributor to that repo. We can add the main ripme project repo to that organization later, but it allows you to start your project with the main repo in a logical place for how we're planning to move forward.

As for the details of making an organization, you can think of it like an "account" that you access via your normal account's log-in and which can have more than own "owner". As for the other details, it's been a while since the last time I made one.

But basically it means that we will have a centralized place to go with a name that isn't one of our usernames and instead represents the project as a whole.

metaprime avatar Jan 05 '17 18:01 metaprime

Looks like someone already registered a user with the name ripme so we can't register the organization as "ripme".

https://github.com/ripme

I'm drawing a blank on an alternative to use as an organization name. Ideas?

metaprime avatar Jan 05 '17 18:01 metaprime

4pr0n_RipMeAndroid ?

rautamiekka avatar Jan 06 '17 00:01 rautamiekka

How about "RipMe_AlbumDownloader" Or "RipMe_ContentDownloader" Or "RipMe_Downloader" Basically the name (since you can't just use RipMe) should symbolise the main task that the program does.

My work WiFi was being rather dodgy, so I was unable to download Android Studio, I'll try again tomorrow when I am at work again (if that doesn't work Ill just go to my local library and download there during the weekday, cause it's a decent sized download)

Matt07211 avatar Jan 06 '17 04:01 Matt07211

Or something short and sweet like RipMeApp?

metaprime avatar Jan 06 '17 08:01 metaprime

Yep. That sounds the best. I like it.

Matt07211 avatar Jan 06 '17 09:01 Matt07211

https://github.com/RipMeApp/ https://github.com/RipMeApp/ripme https://github.com/RipMeApp/RipMe-Android

metaprime avatar Jan 06 '17 17:01 metaprime

Not ready to move main development or deployment to https://github.com/RipMeApp/ripme but at least it's there.

metaprime avatar Jan 06 '17 17:01 metaprime

I added https://github.com/RipMeApp/ripme as a submodule of https://github.com/RipMeApp/RipMe-Android for you to get you started!

metaprime avatar Jan 06 '17 17:01 metaprime

Thanks. If my work WiFi isn't flaky today, I'll have android studio downloaded and I'll have started on the app by the end of tonight.

Matt07211 avatar Jan 07 '17 00:01 Matt07211

Sorry haven't been able to start this little side project, to busy with work :(

I've got Android studio (I still need to download the SDK) and have git cloned the repo and sub module. But haven't had the chance to start on this project.

I have still yet to see how much effort is needed to port the java code to the equivalent API (I'm blaming this on work taking up all of my time;) )

Matt07211 avatar Jan 09 '17 05:01 Matt07211

@Matt07211 no worries, take your time. I'm also busy until February and won't be able to do any coding until then.

metaprime avatar Jan 10 '17 09:01 metaprime

@Metaprime That's good, didn't want you to think that I'm the type of person to say something and not follow through. I will follow through it just may be really slow.

One quick question, what part of the java code do you think will bring me the most trouble (ignoring the java code for the UI as it's irrelevant)?

Matt07211 avatar Jan 10 '17 09:01 Matt07211

@Matt07211 Honestly no idea. I've never done a port of a desktop Java app to Android and my Android app dev experience is very little to practically nonexistent.

I think the biggest practical challenge is the huge space requirements an app like this commands. Not sure if that will be an issue for Android devices. Uploading directly to the cloud to save space locally makes some kind of sense but the technical problem there is the bandwidth required (download image, upload image -- 2x the bandwidth of simply downloading -- I don't think there's any way to have the images you're downloading beamed directly to the cloud storage and bypass the device -- that would require support from each respective service of allowing you to retrieve a file from anywhere on the web).

The fact that this app doesn't support HTTPS connections at the moment which makes privacy a problem -- downloading/uploading NSFW pictures on a mobile network without a secure, encrypted connection has me worried. Additionally, connecting to a cloud service without HTTPS is stupid if not impossible.

(Actually that's my major technical concern that really should be improved before tackling other work. See #214 #403 and the anti-pattern of forcing https links to http as supported by #366.)

metaprime avatar Jan 11 '17 09:01 metaprime

So there's some major technical hurdles before we're app-viable, but that doesn't mean we can't prototype.

metaprime avatar Jan 11 '17 09:01 metaprime

I'll be prototyping tonight ;)

A note about the space requirements;

  • External SD card compatibility is planned, or as you said we would be rather tight on space.
  • I'm not sure of the statistics of what phones have/don't have external SD card slots, but most low end phones usually have them and premium phones may have them included or have a large internal memory (E.G. 32GB, 64GB etc.) so only a small subset of devices will only have a very small storage area.
  • OTG compatibility in phones have increased in recent years so this avenue can't be ruled out.

In regards to cloud storage, it'll seem more like a wait and see approach, coupled with research, and how the original app has implemented the feature. This is a area that definitely requires a look into at the minimum.

Https related issues may also be a wait and see, but this ( https://developer.android.com/training/articles/security-ssl.html#HttpsExample ) Android developer page looks promising for https related issues with Android specifically

Either way it'll be a little while before we get a semi functioning app, but that's the fun isn't it. I'll hopefully at least be able to update the repo in the coming days.

Matt07211 avatar Jan 11 '17 11:01 Matt07211

The only way to have your rippings go to cloud without downloading+uploading is either the cloud end or the source end has to initiate the transfer.

Technically your computer, the 3rd (could be wrong number) party, could tell the source where to send the data, or the cloud where to get the data from, but that's quite special arrangement which to me sounds the same as opening SSH connection and running a command.

That arrangement wouldn't be negotiable with the source without owning it yourself or a friend own it or something along that line.

rautamiekka avatar Jan 11 '17 15:01 rautamiekka

@rautamiekka Yea that sounds about right. :(

As for my progress, I have some other side projects that need to be finished first and this is around last on the list (I'm probably gonna be like what metaprime is and won't be able to do much till February). As for the other day, I tried building a default hello world app and Android Studio/Gradle kept throwing up errors one after another, after a while I gave up for the night and went to sleep.

Matt07211 avatar Jan 14 '17 05:01 Matt07211

I'd like to say work has slowed down, some of my side projects are almost complete, it's near the beginning of a new month, so you I'm gonna try again at this :)

Matt07211 avatar Jan 31 '17 05:01 Matt07211