I have an old smartphone (Samsung Galaxy S2), unlocked, and I'm thinking of trying to write simple apps for it on my Fedora-24 laptop.
I'm fairly familiar with Java (and Eclipse) (Long ago I wrote a program modifying TeX web2c to output Java).
I haven't found a reasonably authoritative article on this, and would welcome advice and/or suggestions from anyone who has gone down this route.
I ran "dnf search android" and found quite a few appropriate sounding programs, but found it hard to tell how they would fit together.
I'd like to do it in as simple and standard a way as possible, eg not writing in C++ and using a program to translate that to Java. I've looked at a number of sites claiming to teach this topic, but none of the ones I have seen had concrete instructions of how to transfer Hallo World, say, to the phone and run it there. And all seemed to have their own special programs, eg I was just looking at one which said "Android Studio is the official IDE for Android development" but none of the others mentioned this program (or suite).
As I said, I would be very grateful for any knowledgeable adivice on this topic.
On Fri, 07 Oct 2016 14:02:13 +0100 Timothy Murphy wrote:
As I said, I would be very grateful for any knowledgeable adivice on this topic.
You don't want that e-word development environment not to be named. There is a brand new android GUI development environment just for android: https://developer.android.com/studio/index.html
Or you could use pure command line tools and emacs like I was doing (till I got distracted by other things and let my android programming lapse):
Tom Horsley wrote:
=>> As I said, I would be very grateful for any knowledgeable adivice
on this topic.
You don't want that e-word development environment not to be named. There is a brand new android GUI development environment just for android: https://developer.android.com/studio/index.html
Or you could use pure command line tools and emacs like I was doing (till I got distracted by other things and let my android programming lapse):
Thank you very much for that. I have looked quickly through your long article, and will probably follow your advice.
I find your hatred of Eclipse (that is what I assume you are talking about) slightly off-putting, as you seem to imply that all other works on the topic recommend it. I'm not particularaly fond of Eclipse, but not to the extent that I won't use it if it is recommended. It does come slightly between you and the app you want to write, but is it any more than the other programs you recommend?
However, I suppose the issue that most worries me is this: Is developer.android.com the official Android site as they claim to be? Eg is it supported by google? And is studio the official Android IDE? Official as defined by who?
Incidentally, I looked (quickly as I said) through your book/article, but didn't see anywhere where you explicitly said how to transfer your app from emulator to phone. Do you explain that somewhere, or do you consider it obvious? Again, does one have to have root access on the phone? Is that discussed in your article?
On Fri, 07 Oct 2016 15:04:43 +0100 Timothy Murphy wrote:
Is developer.android.com the official Android site as they claim to be? Eg is it supported by google?
Yep, that's the official google site. They have their own tutorials out there as well to guide you through developing example apps with android studio.
Incidentally, I looked (quickly as I said) through your book/article, but didn't see anywhere where you explicitly said how to transfer your app from emulator to phone. Do you explain that somewhere, or do you consider it obvious? Again, does one have to have root access on the phone? Is that discussed in your article?
I probably didn't think about it. What I mostly did was setup a directory on my desktop's web server where I copied the .apk files so I could download them on the phone via a web browser.
You don't need root, but you do need to enable the "allow install from any source" over in settings so it will let you install the downloaded .apk file.
You can certainly install them with a USB connection and adb commands though rather than downloading them over wifi.
Tom Horsley wrote:
You can certainly install them with a USB connection and adb commands though rather than downloading them over wifi.
Thanks for the clarification.
But does the above mean that you cannot download the necessary files over WiFi (say with KDE Connect), or simply that you don't recommend it?
On Fri, 07 Oct 2016 15:33:09 +0100 Timothy Murphy wrote:
But does the above mean that you cannot download the necessary files over WiFi (say with KDE Connect), or simply that you don't recommend it?
Nah, it is just personal preference. I found it more convenient to download them via a web browser (which I already had setup and running) rather than fool with USB cables, but I think adb can do the install directly rather than a two stage download then install, whatever works for you.
Tom Horsley wrote:
Is developer.android.com the official Android site as they claim to be? Eg is it supported by google?
Yep, that's the official google site. They have their own tutorials out there as well to guide you through developing example apps with android studio.
OK, that convinced me to install Android Studio, which I found slightly overwhelming as it is vast, with thousands of files of every kind. At least I did not need to be superuser to do this, and nearly all the files are in /usr/local/android-studio/ .
I'm surprised Google is so shy to admit connection to Studio in any of the headings on the Android Studio site. Why is this?
Also, having found that this is the standard IDE, I'm disappointed that Fedora-24 does not have it as a package. As far as I can see. it will have to be re-installed for Fedora-25, as I was specifically asked what version of Fedora I was running.
There was no suggestion of a next step to take after installation, but I will look in the documentation, and in your book/article, for suggestions.
As I said, it would be nice if there was a document that told you how to install some tiny "Hallo World" type program on your smart phone, step by step.
8.10.2016, 15.25, Timothy Murphy kirjoitti:
As I said, it would be nice if there was a document that told you how to install some tiny "Hallo World" type program on your smart phone, step by step.
See the "Building Your First App" tutorial: https://developer.android.com/training/basics/firstapp/index.html
Markku Kolkka wrote:
As I said, it would be nice if there was a document that told you how to install some tiny "Hallo World" type program on your smart phone, step by step.
See the "Building Your First App" tutorial: https://developer.android.com/training/basics/firstapp/index.html
Thank you very much. I see that there is indeed a section "Run on a Real Device" in this document. I shall follow the advice there rigorously ...
Timothy Murphy wrote:
See the "Building Your First App" tutorial: https://developer.android.com/training/basics/firstapp/index.html
Thank you very much. I see that there is indeed a section "Run on a Real Device" in this document. I shall follow the advice there rigorously ...
I have spent half-an-hour trying to make sense of this document, and I have come to the tentative conclusion that it is the worst Linux HowTo/Tutorial that I have ever seen. And that is setting a very low standard. I seem to recall that the Fedora-24 System Administrators Guide on Postfix was a rival, but not a close one. [That started with a dissertation on Selinux.]
The document starts by telling me to press Run. Unsurprisingly, I don't have any button called Run on my laptop screen, so I assume I am supposed to start Android Studio in some way. I look in /usr/local/android-studio/run and the only executable file there that seems the slightest bit plausible is studio.sh . I try ./studio.sh and it does indeed seem to start Android Studio . [If this is what I was meant to do, perhaps that might have been mentioned.] There is a message down the bottom that says "Failed to sync Gradle project 'ActionBarCompat-ShareActionProvider'". There is indeed a menu entitled "Run" in the taskbar at the top of the screen, and this menu has an item Run in it, but it is greyed out. The only active choice is "View Breakpoints ...".
I have stopped at this point, and must go for a walk and think about something simple like Fermat's Last Theorem.