Page 1 of 1

Cannot Test Android in Simulator

Posted: Sat Apr 30, 2011 4:48 am
by McJazz
I cannot seem to get the Android test function or simulator to enable in LiveCode 4.6.1. I am attempting to run the android functions in trial mode, which the release notes imply should work. I have developed the hello world app and tested it in the simulator from within the Eclipse IDE. The 4.6.1 Android release notes indicate that the test button and test target (i.e. android simulator) may not show up if the sdk was not installed correctly. I am not sure what step(s) I may have missed, since a non LiveCode app seems to work from Eclipse. Any help would be appreciated.

Re: Cannot Test Android in Simulator

Posted: Sun May 01, 2011 12:28 am
by BarrySumpter
I've been testing LiveCode and Android over the last week.

You must be developing on WinXP.
I ran into all kinds of issues on WinXP.

I tested on MacBookPro without issues.

Please search for my latest posts.

Edit | Preferences | Mobile Support | Android SDK |
select the location of SDK root
and the JDK Path sould show up.

Since a bug on WinXP won't compile/save with Android -soon to be fixed by RR
I had to move my .rev over to my MCP development environment.
AND had to change the same JDK path on the MCP before test/compile/save would work.

I'm not used to having to keep a simulator of the Android running.
So I have to keep the SDK Manager open and its virtual device running all the time.


hth

Re: Cannot Test Android in Simulator

Posted: Sun May 01, 2011 2:36 am
by McJazz
Thanks for the reply. Actually, I am using a MacBookPro. How did you install and setup the Android SDK and Java JDK? I must have missed a step.

Re: Cannot Test Android in Simulator

Posted: Sun May 01, 2011 3:12 am
by BarrySumpter
I followed the instructions in one of the docs - something like:
How do I become an android deveoper on the Mac -
Sorry this forum won't allow me to post links.

I think the SDK is for installing, setup, and testing on a virtual device.
And the JDK is included in the Android SDK for the Mac.

I'm pretty sure it was only one file I had to download for the Android SDK.
I extracted to the Mac Desktop and referenced from there.

Where the sdk manager is in that Tools subFolder and the executable is Android.
ANd the JDK is somewhere under the Android SDK root folder.
I just wish that ever time I execute the SDK manager it would NOT run thru all the Installed Packages first.

Don't forget to
Preferences | Mobile | Support | set the location to that Android SDK root folder.
The JDK Path should appear just beneith. Otherwise you're pointing to the wrong folder.

On WinXP I had two differnet folders - something like
1) Android SDK
2) Android SDK - Windows
I had to make sure it was pointing to the
Android SDK - Windows
folder or the JDK path was blank.


Make sure your virtual device is Started before trying to test on it.
I had to set my virtual device to 10 inches instead of Automatic? sizing.
To get it to display properly on my MBP screen.

hth

Also, I noted: to actually get the SDK/JDK to work properly for me
I had to register fully with ORACLE when installing the Android SDK.

Re: Cannot Test Android in Simulator

Posted: Sun May 01, 2011 6:41 pm
by McJazz
Thank you for your help. I went through the tutorial and everything seems to work ok. The emulator does seem to lag a bit compared to the iOS emulator. Also, standard rectangular buttons appear unattractive (i.e. out of date). Are these native? I know they can be skinned with custom icons. Any other ideas?

Best Regards

Re: Cannot Test Android in Simulator

Posted: Sun May 01, 2011 11:15 pm
by BarrySumpter
It may be the OS standard.

I know I prefer Apple OSX graphics considerably more than windowsXP graphics.
Absolutely love those bubble buttons.

I was building my own at one time using a very cheap vector graphics app.
Xara

The only idea I have at the moment
since I've only just started researching Android development this week,
Is to look thru the Android Market
to find an app that I like the looks of
and try to emulate with LiveCode for practice learning.

At one time I was looking into building Widgets.
I can't recall what platform.
But the really impressive looking widgets were all graphically based.
And seemed to have only a few graphic images superimposed one on top of another.
Each with different opacities.

I was also looking thru some of the tools the OmegaBundle was offering.
Tactile Media or TM | Tools had a group of gagues.
Which used this technique of multiple graphics on top of another.
Or so it seems.
And has some very very impressive graphics on their home page.

It may well turn out that the button you are looking for needs to be a graphic with two states.
Normal
Pressed

And may already be included in LiveCode or the OmegaBundle.

I'd prefer at this stage to experiment with the buttons in LiveCode to see what extent they can be viewed.
Then start looking at other options.

hth

Re: Cannot Test Android in Simulator

Posted: Mon May 02, 2011 12:00 am
by bn
Hi Barry,

what Scott Rossi does is really amazing. But at present this is for desktop computers.

With the current graphics engine of Livecode and the comparatively slow CPU's on the mobile devices, one trick is to avoid graphics with graphic effects/gradients or any other object with graphic effects. It crawls compared to images.
That said you can do a lot in the IDE with graphics and then when you like it make a snapshot of it and use the image/images for your controls.
I did that for iOS buttons here:
http://forums.runrev.com/phpBB2/viewtop ... ons#p27885
It uses gradients and graphic effects on graphic objects and then takes snapshots of those buttons for actual use.
Whenever there are performance problems on mobile devices look for graphic effects and invisible instead of hidden objects. Images are presently the way to go. Runrev is apparently working on the graphics engine of Livecode and if that turns out to speed up things like screen redraw a whole new set of possibilities opens up.

Kind regards

Bernd

Re: Cannot Test Android in Simulator

Posted: Mon May 02, 2011 12:54 am
by BarrySumpter
Hi Bernd,

Wow! Thanks for that heads up.
And all that work.

I've just had another look at that RR app for building those iButtons.
Thats nice work.



With Xara vector graphics
I used for the Apple bubble buttons,
once the 3 or 4 really simple layers were built,
I could change the color of a single layer
and resize extrememly fast because of the vector base.
Then as you mentioned take a snap and use the image instead.
And NOT rely on a graphics engine to draw my buttons at run/execution time.

I've got two of the HTC HD2 which are pretty fast.
So I'll be disigning for its cpu and screen size.

I'd like to copy the scratched metal look of OS x windows/form background as well.
Maybe that gradiant. Maybe not.
If anyone knows how to mimic this on Android I'd like to review it.

----
Just recalled there is an icon graphics package with the OmegaBundle.
Maybe it has the bubble buttons I'm looking for.
----

hth

Re: Cannot Test Android in Simulator

Posted: Mon May 02, 2011 10:55 am
by BarrySumpter
Scott from Tactile Media - TM | Tools just emailed me with a tutorial to create one of those bubble buttons.

Its on Tactilemedia web| Lessons | create a button

I've also found a graphic for the scratched metal.

Now I just need to reseach on how to use it properly in LiveCode for Android.