First steps into Android development

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
hylton
Posts: 53
Joined: Thu Oct 04, 2012 12:49 pm

First steps into Android development

Post by hylton » Tue Dec 11, 2012 9:36 am

Hello,

I am busy testing LiveCode for Android development and I need help with the following please:

1. I have not been able to track down one free app (not a game) that has been coded with LiveCode and that runs on my Galaxy Note. Not a single one. Is there anyone out there actually using LiveCode for income generating purposes on the Android platform?

2. If there is at least one person out there that has developed an Android app in LiveCode, can you please point me to an apk or Google Play url where I can download the app, for free, to test to see what the performance is like on my Galaxy Note? I am looking for an app with at least two cards, the ability to swipe or click between the cards, some scrolling of text or images, and a Settings screen. In other words, the absolute basics of an Android app.

I have run the following stack http://revonline2.runrev.com/download/s ... ynresizing but because I am running a trial license, there is a splash screen that occupies the screen for many seconds before it allows me to view the stack. This unfortunately does not give me a sense of the app startup performance.

3. After reading the lengthy forum post regarding mobGUI, it seems that even the developer himself hardly uses his own product anymore. He is impressed with the new features built into LiveCode to help developers skin their apps themselves to achieve a native look. Is there anyone out there that can show me how I would be able to use the inbuilt features on LiveCode to emulate the Holo theme?

4. What is the best recommendation for learning to code for Android using LiveCode? The amount of tutorials from RunRev is very sparse, and even though Holgate's book claims to be a Beginner's Guide, it relies on implied knowledge.

Example: He dedicates just two sentences to getting a physical device to work under LiveCode with Android. His words "1. Connect your device by USB. 2. Look at the Development Test Target submenu to see it listed." In reality, it took me several hours yesterday to setup my Galaxy Note, searching multiple websites and the xda-developers forum until I finally had it working.

5. I have looked at the alternatives to developing apps on Android and they don't appeal to me. I just need to know that I can actually develop apps for clients and make it work. I am looking forward to your recommendations.

Thank you.

Kind regards
Hylton

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7228
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: First steps into Android development

Post by jacque » Tue Dec 11, 2012 6:52 pm

I have an app in the Google Play Store, but it's a game. It does do everything you mention except for the Holo theme, since it has a custom skin. All skins are done by using images, so it could easily have been Holo instead.

The game has multiple cards, tapping to change cards, touch/drag to move objects, a scrolling web page display, and most of the other things you'd expect in an Android app. Performance is acceptable on a very old Archos low-powered device, and excellent on all devices made in the last couple of years and running Android OS 2.3 or higher.

The game isn't free so it doesn't meet your criteria. You can see it here if you are curious though:
https://play.google.com/store/apps/deta ... vesw.casey
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

hylton
Posts: 53
Joined: Thu Oct 04, 2012 12:49 pm

Re: First steps into Android development

Post by hylton » Tue Dec 11, 2012 7:55 pm

Hi Jacqueline

Thank you for your reply. Your game is one of the suggestions given to me when I asked this question from RunRev support. Let me guess, this game was inspired by real life experience :)

2. To expand on this question:

Is it possible for someone in the community to create a skeleton app with the following:

- Two cards with some lorem ipsum and a few images, where the content is longer than the physical device so that we can test how touch scrolling works
- swipe or click between the cards
- an input field so that we can see how keyboard input works
- one drop-down menu so that we can see how the menu renders
- settings that display when clicking the menu button, that uses the bounce feedback when scrolling to the top and bottom
- or whatever settings popup is possible that is activated by clicking on the menu key
- back key managed to move back to the first card from the second card
- back key pressed again exits the app
- ability to download the app for free directly from a website or the marketplace

New users need to be able to see what overhead the LiveCode runtime adds to performance on the physical device without having to worry about the trial splash screen. They also need to see what is possible to make an informed decision.

It seems completely bizarre to me that the only way I can truly test LiveCode on Android is to purchase a one-month license. It's like walking into a car dealer and asking for a test drive, only to be told that I need to sign a one month lease. That makes no sense.

3. I am preferably looking for a programmatic approach. I will gladly do the work to emulate the Holo theme, I just need pointers as to how to do it. I do not want to use images, if at all possible.

Your thoughts please.

Kind regards
Hylton

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7228
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: First steps into Android development

Post by jacque » Tue Dec 11, 2012 8:47 pm

It's possible to make the prototype you want, but it would take more time than most developers are likely to do for free. While LiveCode is a very capable and fast development environment, it's still programming and would take some time. I'm booked with client work for the next few months and won't have time, but maybe someone else does.

By the way, there is no "overhead" when properly scripted. LiveCode apps launch and run at the same speed as any other.

If you're in a hurry it would be inexpensive to spring for the dollar or so on one of the apps in the Play Store. And yes, Casey has been a source of inspiration for a lot of what I do. I learned some choice words just for him. :)
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

hylton
Posts: 53
Joined: Thu Oct 04, 2012 12:49 pm

Re: First steps into Android development

Post by hylton » Wed Dec 12, 2012 8:40 am

Hi Jacqueline

What I was hoping, was that a simple stack like that would already be in use by any Android developer as a starting point for new Android app development. I certainly don't suggest that someone create that just for me.

Thank you for letting me know that LiveCode apps run just as fast as other apps.

What I have discovered is that LiveCode takes a 197kB stack and turns it into a 5.8MB app once installed on the device. Am I correct in assuming that there is nothing that can be done about that? Is this the natural consequence of coding in LiveCode?

Regarding purchasing an app to test LiveCode: I am sure you appreciate that the cost of the app is irrelevant. It is the principle of having to purchase something just to test it which I find strange.

Kind regards
Hylton

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7228
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: First steps into Android development

Post by jacque » Wed Dec 12, 2012 7:35 pm

Casey's Solitaire is 2.5 megs as a stack and 3.5 megs as an apk. The reason is because the runtime engine needs to be attached to the stack in order to make it an app. It will expand to whatever size the current engine is after installation. From the apps on my Android device, 5 megs seems pretty small. I have apps that expand to 20 or 30 megs.

I don't have a template app per se or I'd be happy to send it to you. Some people like using frameworks but I tend to avoid the extra code and just use only those things that are required for the current project. I do have a few standard handlers I paste in but the overall construction of each app is usually unique enough that a framework is overkill. Someone else may have something. Except for Casey, all the apps I've created are for clients and I'm not able to distribute them. If you'd like a free copy of Casey, write to my email address and swear you won't send it off to a torrent somewhere.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

hylton
Posts: 53
Joined: Thu Oct 04, 2012 12:49 pm

Re: First steps into Android development

Post by hylton » Fri Dec 14, 2012 1:45 pm

Thanks jacque for your generosity!

To come back to my initial questions:

1. This still stands. How is Android development being done? Is it only being done for private clients?
2. It seems I would need to write this myself and post it once done.
3. No answers yet.
4. No recommendations yet.
5. No recommendations yet.

Jacques has assisted fantastically where possible and I truly appreciate her effort.

Anyone else in the community that could help me with my questions?

AndyP
Posts: 615
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: First steps into Android development

Post by AndyP » Fri Dec 14, 2012 5:14 pm

Hi Hylton,

Have a look at this on revonline by Fabrice Muller.

http://revonline2.runrev.com/stack/469/ ... ad-Android

It should get you off to a running start.

As for app size the one I'm working on at the moment is 2.51MB ( 8 cards )and that's with the Sqlite and MySql externals added. I'm expecting this to grow to about 3.5MB once completed, in-fact I've imposed a 4MB limit on myself for the app which really healps to keep one focused on minimising byte waste.

Heavy graphic files tend to be a common explination for bloated app sizes, you need to do a lot of work to minimise the file size of graphics but still providing something pleasing to look at and use. Background images are a prime example. in most cases you can use a thin e.g. 10 pixel wide graphic and 'stretch it to fill your cards instead of using one or more large full card size images.

Hope this helps

Andy
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search

hylton
Posts: 53
Joined: Thu Oct 04, 2012 12:49 pm

Re: First steps into Android development

Post by hylton » Fri Dec 14, 2012 8:03 pm

Hi Andy

Thanks for the pointer, but that stack is broken on Android.
This stack however loads great on the screen and on my device: http://revonline2.runrev.com/download/s ... ynresizing

You raise very valid points regarding the stack size, however, the majority of the increased file size comes from LiveCode itself. This seems to be due to the LiveCode runtime. I was surprised at how large the installed size of a LiveCode app becomes. That in itself is not a problem for me, it was more of an observation.

Example: Casey's Solitaire
Stack size: 2.5MB
Apk size: 6MB
Total installed size on device: 14.19MB (Galaxy Note, ICS 4.0.4)

My major concerns are how to get started in Android development and how to make an app look like the Holo theme.

Any recommendations would be appreciated.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: First steps into Android development

Post by Simon » Sat Dec 15, 2012 4:30 am

Hi Hylton,
I've started on building this stack for you, just for practice (LC is that FUN!), it's running on my Android, but I realize the potential problems for RunRev.
I am not a great coder at the best of times and if I don't build an app that makes you jump for joy then it may result in a loss of sales to RunRev. Now RunRev is my best friend so that would be bad.

Sorry but without one of the admins approval I can't post it. I can tell you that I've hit most of your wish list and what you are asking for can be done without a problem.
...clicking the menu button, that uses the bounce feedback...
Don't get what that one means. The other bounce is easy.
...Holo theme
Lots of work there but I think Scott Rossi's tmcontrols would help you out.

Regards,
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: First steps into Android development

Post by Simon » Tue Dec 18, 2012 9:23 pm

Some more info:
5.4 MB shown by phone
276 KB when moved to SD card
1.67 KB .apk file
68 KB LiveCode file of which
48 KB images (including images for content)
home.png
All menus shown
home2.png
cd2.png
Text Entry
Slide motion is great, native bounce not so good but I hand coded a nice one in.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

hylton
Posts: 53
Joined: Thu Oct 04, 2012 12:49 pm

Re: First steps into Android development

Post by hylton » Thu Dec 20, 2012 10:26 pm

Simon,

Your progress looks fantastic!

Is there any way that you can compile an apk that I can download?

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: First steps into Android development

Post by Simon » Thu Dec 20, 2012 11:15 pm

Hi Hylton,
As I mentioned above it would be wrong of me to post the apk as it may adversely effect on your decision to purchase LC.
While I am confident that this demo performs great here in the sim and on my HTC I don't know what your results would be.
Can-o-worms.
- Two cards with some lorem ipsum and a few images, where the content is longer than the physical device so that we can test how touch scrolling works
- swipe or click between the cards
- an input field so that we can see how keyboard input works
- one drop-down menu so that we can see how the menu renders
- settings that display when clicking the menu button, that uses the bounce feedback when scrolling to the top and bottom
- or whatever settings popup is possible that is activated by clicking on the menu key
- back key managed to move back to the first card from the second card
- back key pressed again exits the app
I can tell you that everything you described above (with the exception of menu bounce, but I think you meant scrolling txt img bounce.) can be done with LC for Android.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Post Reply

Return to “Android Deployment”