GLBasic forum

Main forum => Announcements => Topic started by: mentalthink on 2011-Apr-26

Title: Androids Works on emulator!!! Yesss.
Post by: mentalthink on 2011-Apr-26
Well, I try to run under Android Emulator and works!!!, well all not is good, becuase on my second try, a very very simple arkanoid, whit a few graphics, runs very slow. (Perhaps I made some wrong, or perhaps don´t works properly, than a real device)

I show you a simple image, whit a "Hallo! Android".

Kinds Regards,
Iván J.


[attachment deleted by admin]
Title: Re: Androids Works on emulator!!! Yesss.
Post by: Ian Price on 2011-Apr-26
That's good news - to a degree.

While there appears to be more and more successes with using Android devices and emulators, I think that I'll hold back a bit before investing in any Android devices until -

1) The machines themselves are more reliable - in terms of input and speed.
2) Android is less buggy (I read a report earlier that there are 16,000 known/reported issues with it! Of course only 1% may be serious, but there's so many different devices, all doing their own thing that it's like the pc market - you can't be sure what works on one machine will work on any other :S :()

It's great that GLB is supporting Android - it's just a shame that Android itself has so many issues.
Title: Re: Androids Works on emulator!!! Yesss.
Post by: matchy on 2011-Apr-26
Apart from the white 2D, it's actually quite good as it can create a complete game and 3D works also. List here:
http://www.glbasic.com/forum/index.php?topic=6163.msg48793#msg48793
Title: Re: Androids Works on emulator!!! Yesss.
Post by: MrTAToad on 2011-Apr-26
Yes, GLBasic works well on it - once I worked out why it wouldn't compile... :)

Android OS 2.2 (or rather the applications on it) do seem to be somewhat unstable - the Marketplace frequently crashes as do many other applications.  Whether its because 2.2 is inheriently unstable or due to the fact that it's a generic tablet is unknown.  Perhaps OS 3.0 will be better...

It is (and will be for some time) a big growth area, so its good to get in fairly early...

Will have to see what the emulator is like now that I've got a working Android application
Title: Re: Androids Works on emulator!!! Yesss.
Post by: erico on 2011-Apr-26
Quote from: MrTAToad on 2011-Apr-26
It is (and will be for some time) a big growth area, so its good to get in fairly early...

Totally agree...
At least with the emulator I will be able to try it on without having to pay for the device and an app-dev account first...
(I know I´m cheap :P)
Title: Re: Androids Works on emulator!!! Yesss.
Post by: MrTAToad on 2011-Apr-26
Quote(I know I´m cheap )
Best way of doing it!

One thing I did forget to mention is that Smartphones and the (cheap) tablets aren't fast - so anything really complicated wont be possible.  For example, with the wretched Angry Birds game, I have to turn the background off for it to be playable...
Title: Re: Androids Works on emulator!!! Yesss.
Post by: Dabz on 2011-Apr-27
Quote
At least with the emulator I will be able to try it on without having to pay for the device and an app-dev account first...

Unlike iOS, you only need to buy a dev license ($25) when you want to upload your app to the market place, Google doesnt stop you from running your app on a device like Apple does, as well as you dont even need to be on the market place, you can distribute your app how you like.

Though, there are a couple of warnings with Android dev...

Its prone to piracy, one coder I know who wrote a live wallpaper and was selling it for $1 (59p) ended up having his work dumped on the pirate pages... Which was a shame!

Another is Android users are prone to the auld "Buy it... Play it... Refund it" syndrome, not exactly sure if Google knocked that head, but where Apples policy is one refund I think, the last time I checked, Google allowed users to have unlimited refunds.

Dabz
Title: Re: Androids Works on emulator!!! Yesss.
Post by: Millerszone on 2011-Apr-27
Quote from: Dabz on 2011-Apr-27
Quote
At least with the emulator I will be able to try it on without having to pay for the device and an app-dev account first...

Though, there are a couple of warnings with Android dev...

Its prone to piracy, one coder I know who wrote a live wallpaper and was selling it for $1 (59p) ended up having his work dumped on the pirate pages... Which was a shame!
Dabz

Piracy is everywhere. My game Hit the Deck Baseball is available on IOS devices and it's on about every mobile app pirate site out there.
Title: Re: Androids Works on emulator!!! Yesss.
Post by: Kitty Hello on 2011-Apr-28
A shame. Did you include some piracy checks? You could make the images of the pirated game so all players wear an eyepatch...
Title: Re: Androids Works on emulator!!! Yesss.
Post by: matchy on 2011-Apr-28
Eyepatch is a great idea. How about when on a piracy check a sound file plays "arrrrgh" or "aye aye captain"?
Title: Re: Androids Works on emulator!!! Yesss.
Post by: Kitty Hello on 2011-Apr-28
I would not make it too cool, because otherwise the pirated version is more interesting than the real one.
Title: Re: Androids Works on emulator!!! Yesss.
Post by: MrTAToad on 2011-Apr-28
Yes, the emulator works well - just use

Code (glbasic) Select
adb install <apk file>

with the emulator visible (otherwise it will say error:device offline)

[attachment deleted by admin]
Title: Re: Androids Works on emulator!!! Yesss.
Post by: mentalthink on 2011-Apr-28
MrTatoad, you have a good speed on the emulator, for me runs very slowly.

Kinds Regards,
mentalthink
Title: Re: Androids Works on emulator!!! Yesss.
Post by: MrTAToad on 2011-Apr-28
Well, its acceptable for the program - it certainly wouldn't be if it was a fast, action game or had a lot of processing to do.

I do have a fairly fast computer anyway, which helps :)
Title: Re: Androids Works on emulator!!! Yesss.
Post by: OscarBraindeaD on 2011-May-02
hi all,
what version of sdk/API level are needed in the AVD created in order to run the apk?
When I try to install the apk in the emulator it fails with:


828 KB/s (1796558 bytes in 2.116s)
   pkg: /data/local/tmp/gl.apk
Failure [INSTALL_FAILED_OLDER_SDK]

I'm on mac os x 10.6.6.
I've tried API levels 4 and 7 with the above error message and the API level 11 give me an "error: device not found", with the emulator running...

Any idea?

Thanks in advance.
Regards
Title: Re: Androids Works on emulator!!! Yesss.
Post by: mentalthink on 2011-May-02
HI Oscar, I you need to use how least 2.1 or 2.2, be careful, if you use 3.0 don´t works. Perphaps, can run, but in my case don´t make it.

Kinds Regards,
Iván J.
Title: Re: Androids Works on emulator!!! Yesss.
Post by: Xaron on 2011-May-02
Quote from: matchy on 2011-Apr-26
Apart from the white 2D, it's actually quite good as it can create a complete game and 3D works also. List here:
http://www.glbasic.com/forum/index.php?topic=6163.msg48793#msg48793

Has that changed? Because I can use colored 2D lines without problems on my Desire HD...
Title: Re: Androids Works on emulator!!! Yesss.
Post by: OscarBraindeaD on 2011-May-02
Thanks mental,
I tried with api 2.3.3 and it installs but, when it runs, i only get a black screen and returns to the menu screen.
Same with the 2.2 api... Hmmm... weird. Maybe it is due I'm using demo version of GLBasic.
I'll try only showing some text not graphics at all...

Regards
Title: Re: Androids Works on emulator!!! Yesss.
Post by: MrTAToad on 2011-May-02
You need Android OS 2.2 - I think its around level 5

White lines are due to the emulator (and certain tablets and phones) not supporting various OpenGL extensions
Title: Re: Androids Works on emulator!!! Yesss.
Post by: Kitty Hello on 2011-May-02
Level 8 - Android 2.2 (Froyo) required.
Title: Re: Androids Works on emulator!!! Yesss.
Post by: BdR on 2012-Mar-04
*kicks thread*

I'm interested in bringing my games to Android now, so I've been testing GLBasic with the Android emulator and it works great! :good: Just press build multiplatform for Android and it creates an app and runs it in the emulator, amazing!

Here are some things I've found. The Android emulator in general is a bit flaky and unreliable (Google's fault, not GLBasic). For me it sometimes crashes on Android version 2.2 and 2.3.3, but at other times it runs just fine, so I don't know what causes it. I haven't seen it crash with v4.0.3 (yet).

When the emulator does work it's slow so don't expect to run and test your game at normal speed (especially action games). I guess it's mainly usefull to see if you app can start and if screen orientation is correct etc.

You can press CTRL+F11 or CTRL+F12 to flip the emulator 90 degrees (simulate tilting the device). Although, when I do this while my GLBasic app is running it crashes the app, not the emulator. Android give an error message and closes the app, which you can then just restart by tapping your app's icon again.