emperor: (Phoenix)
Add MemoryShare This Entry
posted by [personal profile] emperor at 03:10pm on 26/03/2017 under ,
I've been thinking for a while that I'd like to make an android app (basically, a dealing sheet - a friend has an online one, but I'd like one that would work offline and that could do simple things like keeping the display on for long enough for me to deal ;). I'm aware that the default way to do this is writing java (a language I've mostly avoided so far, and that seems to love boilerplate), but I'm wondering if there are plausible alternatives (I spotted Kivy via WP which seems python-based - any good?) and/or if anyone has useful pointers. Vague desiderata:

1) I can use my regular text editor to write code
2) As Free as is possible given mobile OSs :-/
3) Plausibly portable to iOS should someone feel like it

I expect to end up with something to distribute via F-Droid.
There are 10 comments on this entry. (Reply.)
posted by [identity profile] cartesiandaemon.livejournal.com at 03:27pm on 26/03/2017
I'd also be interested to hear people's advice. I know many programmers surprisingly few of which have actually produced smartphone apps. Shortcipher?

I previously used python+kivy, and got to the point of a game which ran on android. My experience was, good for portability, I'm not sure exactly what platforms, but kivy was explicitly multi-platform, not aimed mainly at android. Good for using your own editor, workflow, not an android specific IDE. However, I had some problems getting other android libraries to link to it, to use GPS etc. I'm not sure if that would have resolved itself, or if it was just more difficult than doing it via java. If you mostly want text output, that might well suit you.

I can look up my notes on android+python+kivy if there's anything specific you need, but I think my main takeaways were "find a kivy for android tutorial and follow it" and "do it on an up-to-date linux system, not windows".

However, I reckoned I should succumb and try it the mainstream way by java, android development kit (?), and eclipse/android studio, and see if that's smoother. I was going to do that this month, but don't have a lot of time left.

I'd be interested to hear how you get on if you do try it. (And to play more bridge at some point :))
hooloovoo_42: (Default)
posted by [personal profile] hooloovoo_42 at 09:18pm on 26/03/2017
Probably way too simple for what you're looking for, as it's aimed at total beginners, but have a look at this


I've made the Cat app and modified it to do something similar but different. I also have a whole list of apps I want to write, but don't have time!
jack: (Default)
posted by [personal profile] jack at 08:12am on 11/05/2017
Did you get anywhere with app-writing?
emperor: (Default)
posted by [personal profile] emperor at 08:26am on 11/05/2017
Alas, not so far. I read a bunch of documentation, and then have been stupidly busy these last few weeks.
posted by [identity profile] ptc24.livejournal.com at 11:18pm on 26/03/2017
If you like or can tolerate Javascript then it may be worth looking at Droidscript.

Porting to iOS may be difficult.
posted by [identity profile] crazyscot.livejournal.com at 06:36am on 27/03/2017
With the caveat that I have only really dabbled with a project that I quickly abandoned once I came across an existing app...

When it comes to setting up your UI, an Android app is not a Java program. It's first and foremost an Android app, which implies a monstrosity of an XML-based framework to plug into. Somewhere down the track you get to specify a Java class for its guts.

While you could theoretically write the Java using your favourite text editor, when it comes to setting up the correct XML to tie it into the framework it's going to be multiple orders of magnitude faster to use the IDE. Building it into an app and running the automated QC checks is likely also a job only for the IDE.

I found that Android Studio was unusably slow on my 2008-vintage linux box (running xubuntu 16.04 desktop). (My 2014-vintage iMac, no worries.)

There is also a separate bolt-on for the IDE that lets you write (some of) your app in C or C++. If you want to go down that route you're looking for the Android NDK (Native Development Kit). I've not used it so can't comment.

As for porting to iOS, AFAIK there's no straightforward way. If your app logic is straightforward enough then you can port it (to C/Obj-C), but the framework/UI integration is going to be pretty much redo from scratch.
chess: (something)
posted by [personal profile] chess at 09:25am on 27/03/2017
I would use Xamarin and VS Community (or Unity for anything with serious graphics requirements) - but they're only free as in beer and I don't know what the non-Windows versions are like. You can take part of the development out into your regular text editor if you like because .cs files don't care what you write them with, but your text editor probably doesn't have good autocompletion for phone libraries, depending on what it is. They are designed for full-range portability and being easy to get started with, though.
fluffymark: (barbie)
posted by [personal profile] fluffymark at 02:58pm on 27/03/2017
I've made an android app (for work). Not totally from scratch, it was a "take a large existing java codebase and see if we can run it on android" job. I avoid IDEs whenever possible (and like using my regular text editor) I can confirm that while it is possible to go this path and make a fully working app, writing a lot of build and style xml files manually is a real pain.

Java is not scary. If you know C++, you can on the whole write java as if it were C++, but without needing to think about memory management. The boiler-plating frequently seen in Java code is a style choice in almost all cases, and I choose not to write Java in that way.

It's also possible to compile C for both android and iOS and run natively, should that work for you.

The real snag is iOS portability. Java/Android code will not port to iOS (well there used to be this tool called robovm, but it got bought out and discontinued). So if you are at all considering portability as a goal, best not write directly in Java. I heard very promising things about tools that can basically take javascript and build android and iOS apps from it, but I've not tried them myself, and don't know how free/complete they are. I'd be interested to know what the current best idea is in developing cross-platform android/iOS apps.

On more warning - my experience in developing for iOS is that the code needs constant maintenance - the APIs are constantly being changed and broken, and they won't let you release anything unless it's built with the most up to date API.

posted by [identity profile] jorallan.livejournal.com at 07:41pm on 27/03/2017
As a slight aside, you don't necessarily need to write Java to target Android "natively" - you can write any JVM language. There's obviously a ton of those, but the three most likely suspects are:

* Kotlin: in many ways "a better Java" and does away with a lot of the boilerplate Java has.
* Scala: possibly best described as a hybrid OO-functional language from the curly brace syntax school. I like it a lot, and it definitely does away with Java's excessive boilerplate.
* Clojure: functional Lisp. Those two words probably tell you enough to know whether you'll love it or hate it. I suspect there's not too many people inbetween.

All three can happily interoperate with Java, so you still get the advantages of all the libraries you need.

posted by [identity profile] emarkienna.livejournal.com at 08:31pm on 27/03/2017
For F-Droid distribution, it's probably worth checking with them in advance what they do or can support as part of making a choice, since they build the applications themselves and not everything is supported (e.g, here's an old thread where somene asks about Kivy).

I've written Android apps (for fun) with Qt/C++, SDL/C++ and Java. If I'm not intending to release something cross-platform myself, I'd choose Java everytime. Not that there's anything bad about the former choices, but I find the Android side of things is easier using the default way (e.g., working out how to do something on Android obviously has a lot more resources for Java). OTOH if you don't want to work with an IDE, third party methods might be better suited for that anyway.


8 9