Android programming in Puppy: "Studio"

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

Android programming in Puppy: "Studio"

#1 Post by Rattlehead »

I'd like to create my own Android applications, but I'm a complete beginner atm. All the tutorials I have found in Internet seem to take too much things for granted.

Also, in this forum, I've seen there is some kind of Android simulator that allows you to test stuff. Examining some of the code in the tutorials, from what I remember of a course I did in the 90s, it seems Android uses some variant of Java, so I guess I'd need the Java Development Kit (this will give you an idea of my level of 'rookieness' in the matter).

What are the tools that I would need? Is there some puplet that is Android ready out of the box? Recommended books and sites to learn programming? Thank you
Last edited by Rattlehead on Fri 06 Feb 2015, 13:55, edited 1 time in total.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#2 Post by greengeek »

Hi rattlehead, have a look at kevin bowers post here. Maybe he can offer some mutually beneficial info.

stemsee

#3 Post by stemsee »

You need the android sdk or android studio from here!

http://www.google.co.uk/url?sa=t&rct=j& ... 1339,d.d2s

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#4 Post by Rattlehead »

Thank you for the response guys. It took me some time to process it -not the kind of 101 information I was expecting!

Kevin's thread says
For those who don't already know, Android is based on Linux
OK, cool, great to know, but what's the language people use to program stuff in it? I stick to my previous message - looks like Java to me; where can I learn it?

The rest of that thread sends my head spinning quickly. It mentions an application called Sulu2 which is used to root Android, something that I'll have to do at some point of the road, but by now I just wont to crank out the usual hello world in a simulator!
You need the android sdk or android studio from here!
Thank you for the resource. But could someone avoid me 10,000 of hours of tweaking (which I don't have right now) and point me to a Puppy where such package is either already installed, or certified to just work once downloaded? The Samepup mentioned in the other thread seems to do all kind of nifty synchronizations between Puppy and Android, but it doesn't seem to be a platform for programming, please correct me if I'm wrong...

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#5 Post by amigo »

It's java.

Robin2
Posts: 180
Joined: Sat 17 Jan 2015, 18:17

#6 Post by Robin2 »

Rattlehead wrote:But could someone avoid me 10,000 of hours of tweaking
I have no experience of the Android SDK on Puppy (being new to Puppy) but it was a lot of work on Xubuntu - basically a lot of stuff to download. If you can save it outside the Puppy system I would do so.

Unless you are familiar with Java programming the Android system is a lot to swallow. I experimented a bit with installing JRuby on Android which did not need much pure Java code.

To be honest, compared to programming Android java (on any PC) the extra bits for Puppy are likely to be easy.

...R

gcmartin

Android ONLY requires a PUP with the JDK. Rest is easy.

#7 Post by gcmartin »

To get started is really very easy, per se. The problem is NOT Puppy, but, no PUP developer, IMHO, has provided a PUP with the JDK built in. It has been requested, but none, yet, has stepped forward.

Here's an idea for you to consider: Appeal to any one of the several PUP developers who are doing 64bit PUPs. This is the better platform because of its data pathing for the emulator requirement in test and debug.

Next, you need to ask the developer to please provide the JDK in their REPO if it is NOT in their distro to allow all sorts of things to occur, one of which is Android stuff. One PUPPY member, @Musher0, here, has done the hard work of creating an installable instructions for JDK.

Once you have the JDK installed on the PUP, ALL OF THE REST IS EASY!!! (In Windows and Macs, they do this so easily)

OK, lets assume you can get this far, the most mature platform with object kinds of built in navigators is eClipse with the Android feature added. There are others, but the eClipse people team with the Android people to maintain the platform and keep it as consistent with the Android developers as humanly possible.

Lastly, there are at least 100 explanations, videos, tutorials, etc to get anyone to "Hello World" quickly using this environment, and you can target it to any one of the various versions of Androids EVER EXISTED! (i.e v2.x all the way to 5.x (Lollipop) and beyond)

This gets you started. All the rest of your skills for Android will follow ... for some, quickly, for others, not so.

Again, simply distro, JDK, eClipse, Android kit. The easiest of these are the eClipse and Android who rely on the JDK's presence.

If anyone gets this far, we have the makings of the Android PUPPY. With it we can do all kinds of present day home device stuff, especially if we understand that at the end of this year, some already estimate that there will be over 7 billion Android smart devices in the world going to 20billion soon after.

Hope this is seen as a help

Robin2
Posts: 180
Joined: Sat 17 Jan 2015, 18:17

Re: Android ONLY requires a PUP with the JDK. Rest is easy.

#8 Post by Robin2 »

gcmartin wrote:To get started is really very easy, per se. The problem is NOT Puppy, but, no PUP developer, IMHO, has provided a PUP with the JDK built in.
Do you mean the Oracle JDK or the Android ADK?

Installing the Oracle JDK is simple. Download the ZIP file. Extract it to somewhere convenient. Make symlinks in /usr/bin to the java and javac executables.

I have my jdk installed in a separate partition outside the Puppy system.

...R

gcmartin

#9 Post by gcmartin »

Thanks @Robin2

In the Linux world there are 2 JAVA efforts: There is the traditional one now owned by Oracle and there is the Open Source one. Respectively, they are JDK and OpenJDK.

My understanding is eClipse will operate on either, as it is a mere JAVA app. But, subtleties may surface in use. (I am NO expert of which JAVA. But am aware that Android has specific recommendations when using the ADK on eClipse in JAVA.)

For Android stuff, I have ONLY used Windows, JDK, eClipse for Android. (BTW, some of you are probably already aware that this combination can build for iPhone apps, as well)

Now that so many of this community's users have smartDevices, it might be time for community members to consider a method of providing PUPs a means to Add this to ability to PUPPY distros.

For example, today Puppyland world has a DEVX for each distro produced. Maybe an addition to the distro would be:
  • a "JAVADEVX" (JAVA+DEVX) availability along with the traditional DEVX.
  • Or maybe PUPPYlanders could provide a separate packaging which has a universal installable for any PUP.
  • Or maybe, there could be an ISO for smartDevice users developers which also would make Puppy Linux more attractive to those who come to Puppyland from Windows.
    (I do not posses the skills to do a creditable job at this, but many of you do and may see advantage to any one of these ideas.)
This,of course, is consistent with the majority of the world having a smartDevice by the end of 2015.

Puppy Linux ability and speed works to advantage and its attractiveness. This is offered as some ideas for making PUPPY as gleaming as possible to the eyes of those who venture in.

Robin2
Posts: 180
Joined: Sat 17 Jan 2015, 18:17

#10 Post by Robin2 »

From this webpage - the Android Studio system requirements
Linux

GNOME or KDE desktop
GNU C Library (glibc) 2.11 or later
2 GB RAM minimum, 4 GB RAM recommended
400 MB hard disk space
At least 1 GB for Android SDK, emulator system images, and caches
1280 x 800 minimum screen resolution
Oracle® Java Development Kit (JDK) 7
It is hard to reconcile this with the concept of the small size of Puppy distros.

My approach would be to keep the Puppy system small and install these things in another partition outside the Puppy system.

By the way I should have referred to the Android SDK - the Android ADK is a different thing.

...R[/quote]

gcmartin

#11 Post by gcmartin »

Understood. The Andcliperoid programming I refer is that which runs when added and used in eClipse which require JDK to support both coding and image testing of your coded apps.

On PUPs, having some experience with this, I recommend you have a 64bit PC, again. If your x86 PC is a modern 1 made since 2006, you already have the physical requirements for doing your app development with little hardship.

Your idea to have your development done where it stores and uses storage outside of the main distro's files is one most every PUP use understands the advantage.

Not sure what you refer when you say small as it means so many things to people.

What this thread ask is a good one. A PUP "arrangement" capable of also producing Android apps for home use.

There are 2 current PUPs which is positioned to address your needs, but, will need their JREs replaced with JDKs which positions for your needs: LightHouse and EmSee. There may be other PUPs which contain JRE OOTB, but I am not aware of any other PUPs. In those PUPs the JAVA libraries and the system variables are already positioned for the change. If they are used as your model, your JDK installation may place itself in your system so that all other pieces for development, simply, fall in place.

Looking forward.

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#12 Post by Rattlehead »

Hey guys, thank you for all the info. My computer time is a bit limited lately, but I'll try to get my head around these suggestions at some point.

However, I think I found something that might be deadly to my pretensions already...
2 GB RAM minimum
Ouch. My laptop has 1 GB only.

Anyways, thanks for the info. In the meantime, I found the Android SDK for dummies book in my library and I'm halfway through. It's refreshed my Java, but I would also need to practice some more... Thank you everybody.

gcmartin

#13 Post by gcmartin »

Just remember; Android is NOT pure JAVA. JAVA is the development environment support subsystem.

Android on you smartDevice gets apps which are a combination of HTML5, XML, and JAVA. Android, the operating system, has a virtual machine built into its fabric, currently JAVA. But Oracle has not played nicely with the Android group and for past 2 years a new Virtual Machine is emerging for apps to use. And we will move of it in coming year with some subtlety emerging in Lollipop (Android version 5+).

For the immediate challenge, though, the PUP needs still remain as a target for both development, testing, and vehicle delivery outside of the development framework.

We have all the pieces which have been done over past years, but, not yet combined on any one PUP or combined and tested REPO package for any one PUP.

But, I am SURE we are going to get there. There are just too many billions to ignore. Soon, smartDevices will exceed ALL PCs (Microsofts/Apples/etc) on the planet in operations....ALL.

Puppyland has already taken a 1st step with it 2014 entry of MTP for data/content management. This thread addresses, similarly, how PUPs can be used to manage apps for personal needs.

And, every person, today and tomorrow, young and old, are the users who pay attention whenever they see or hear iOS or Android.

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#14 Post by LazY Puppy »

Android Studio 1.0.2 in Precise based L.A.S.S.I.E. using LP2_jdk-1.7u25-i586.sfs.
Attachments
AndroidStudio-1.0.2-in-Precise-based-L.A.S.S.I.E.-and-LP2_jdk-1.7u25-i586.sfs.jpg
(92.06 KiB) Downloaded 435 times
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

stemsee

#15 Post by stemsee »

@LazY PuppY

Could you make one complete sfs module of latest java and sdk studio for easy distribution and use!?!?

:)

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#16 Post by LazY Puppy »

stemsee wrote:@LazY PuppY

Could you make one complete sfs module of latest java and sdk studio for easy distribution and use!?!?

:)
A complete SFS of Java Development Kit and Android Studio will be sized around 1 GB (low .gz compression) and will need at least 3GB of RAM uncompressed.

The Android Studio is executable directly from the location where it is stored - just needs the JDK loaded by SFS or installed by a PET File.

I have just downloaded the .zip File: https://dl.google.com/dl/android/studio/ide-zips/1.0.1/android-studio-ide-135.1641136-linux.zip
MD5: 7c8f2d0cec21b98984cdba45ab5a25f26d67f23a and extracted it to my external RoxApps Directory: /mnt/sdc2/RoxApps/Entwicklung.

Inside of the above path I've executed the file: /android-studio/bin/studio.sh which will execute the install wizard for Android Studio to download and install all the needed Files.

After all Files are downloaded and installed Android Studio appeared on the Screen and I've updated it from 1.0.1 to 1.0.2 and restarted Android Studio.

Seems to work, though I haven't any clue how to use it. :lol:

---

Edit: 2015-02-04, 01:14, GMT+1

I have added a small Script to execute Android Studio and automatically loading the needed JDK Environment. Just edit the following parts inside of the Script and change Settings for your needs.
# User Settings for the Android Studio Data and Working Directories
# Edit this for your needs !!!
ANDROIDPATH="/mnt/sdc2/Android"
ANDROIDDATADIR="00-data"
ANDROIDSTUDIODIR="android-studio"
JDKSFS="jdk-1.7u25-i586.sfs"
# End of: edit this for your needs !!!
The attached .gz Archive is a fake .gz Archive!

Just remove the fake ".gz" file extension and make the Script executable.

Use this Script only after Android Studio was downloaded and completely installed.
Attachments
Simple-Starter-for-Android-Studio-102.gz
Fake .gz Archive! Remove the ".gz" and make executable
(1.59 KiB) Downloaded 424 times
Last edited by LazY Puppy on Wed 04 Feb 2015, 01:59, edited 3 times in total.
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#17 Post by LazY Puppy »

Probably seems to work also in my Lucid based LazY Puppy.
Attachments
AndroidStudio-in-Lucid-based-LazY-Puppy.jpg
(140.44 KiB) Downloaded 1867 times
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#18 Post by Rattlehead »

Thank you! Seems to be exactly what I was looking for. It's a shame that I don't have the ram to run that bloated java thing... :roll:

gcmartin

#19 Post by gcmartin »

... bloated java thing... :roll:
Actually, its not bloated. :)

It allows ANY developer to target, build, emulate, test and load for each Android version the developer would want his effort to work on. Like iOS, and Windows each version is "subtlely" different from every other version in the family.

Further, this offering by @LazY Puppy allows any user of the toolset to build for any x86 or ARM application as well as things which can/will be done for mobile and smartDevice application development.

Hope this explains what's included in the package.

Last, remember, that the package size DOES NOT have anything much to do with your RAM size. All of this is NOT resident in RAM assuming you have /mnt/home, swap, or peripheral storage. It just the packaging which is called by the modules being executed...not everything at once.

Thanks, for both, the raising of this thread and the current solution presented!

Hope others see the benefit(s) coming out of what is here as this increases the way PUPpies can be utilized. (Actually, if the word gets out that some PUP is providing an OOTB distro with this as a development feature, we should brace for those who would come to use it. Forum may need to create an area to houses the contributions and questions that would increase over time.)

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#20 Post by LazY Puppy »

I have added a small Script to execute Android Studio and automatically loading the needed JDK Environment. Just edit the following parts inside of the Script and change Settings to your needs.
# User Settings for the Android Studio Data and Working Directories
# Edit this for your needs !!!
ANDROIDPATH="/mnt/sdc2/Android"
ANDROIDDATADIR="00-data"
ANDROIDSTUDIODIR="android-studio"
JDKSFS="jdk-1.7u25-i586.sfs"
# End of: edit this for your needs !!!
The attached .gz Archive is a fake .gz Archive!

Just remove the fake ".gz" file extension and make the Script executable.

The Script was added to this Post.

Edit:

This probably seems to work on a wider range of Puppies. Tested Android Studio in Slacko 593 and Tahr 60CE.

Executed using the simple StartScript for Android Studio
Attachments
AndroidStudio-in-Slacko-593-and-Tahr-60CE.jpg
(110.28 KiB) Downloaded 1863 times
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

Post Reply