BASIC

Author Topic: Android Extras  (Read 5931 times)

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1142
    • View Profile
    • My GLBasic code archiv
Re: Android Extras
« Reply #15 on: 2013-May-18 »
Better move it to code snippets (and maybe make it sticky there). Btw maybe we need platform specific sections in code snippets?
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Offline spicypixel

  • Prof. Inline
  • *****
  • Posts: 646
  • Pixel Artist
    • View Profile
    • SpicyPixel.net
Re: Android Extras
« Reply #16 on: 2013-May-18 »
Just looking at the code for AndroidExtras.gbas and the sample code I can see we can use music.seekTo(40000) for 40 seconds in but how can we determine a tracks length in milliseconds? Can we have a music.seekLength() or similar pretty please  :nw:

Find attached a simple update to the AndroidExtras.gbas to allow compilation in Windows for testing without having to worry about the Android specific calls.
« Last Edit: 2013-May-18 by spicypixel »
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4144
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: Android Extras
« Reply #17 on: 2013-May-18 »
Moved and stickied :)
I came. I saw. I played.

Offline fivesprites

  • Mr. Polyvector
  • ***
  • Posts: 101
    • View Profile
    • FiveSprites
Re: Android Extras
« Reply #18 on: 2013-May-18 »
Hi Ian,

Don't mean to be a pain, but could you unsticky and move this back to announcements please?  This thread was an announcement for the actual code snippet that already exists in Code Snippets :)

I did the announcement as usually things just kinda get lost in that snippets section!

See: http://www.glbasic.com/forum/index.php?topic=9166.0

//Andy

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4144
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: Android Extras
« Reply #19 on: 2013-May-18 »
Aaaaaaannnnnd UNMOVED AND UNSTICKIED! :P
I came. I saw. I played.

Offline fivesprites

  • Mr. Polyvector
  • ***
  • Posts: 101
    • View Profile
    • FiveSprites
Re: Android Extras
« Reply #20 on: 2013-May-18 »
hehe - thanks :D


Offline fivesprites

  • Mr. Polyvector
  • ***
  • Posts: 101
    • View Profile
    • FiveSprites
Re: Android Extras
« Reply #21 on: 2013-May-18 »
Just looking at the code for AndroidExtras.gbas and the sample code I can see we can use music.seekTo(40000) for 40 seconds in but how can we determine a tracks length in milliseconds? Can we have a music.seekLength() or similar pretty please  :nw:

Find attached a simple update to the AndroidExtras.gbas to allow compilation in Windows for testing without having to worry about the Android specific calls.

Thanks for that spicypixel.  I did have a skeleton already set to go for the next version that covered non, android platforms but will take a look over yours too :)

Re: music.seekTo....  I'll add a method so you can determine the length of a music track.  Will match the Android API, so will be called:  music.getDuration()

//Andy

Offline spicypixel

  • Prof. Inline
  • *****
  • Posts: 646
  • Pixel Artist
    • View Profile
    • SpicyPixel.net
Re: Android Extras
« Reply #22 on: 2013-May-18 »
Thanks for that spicypixel.  I did have a skeleton already set to go for the next version that covered non, android platforms but will take a look over yours too :)

//Andy

Yours will be far superior, trust me mine is clunky :-)
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2612
    • View Profile
Re: Android Extras
« Reply #23 on: 2013-May-18 »
My fault, I should have requested a sticky in the thread with the lib.  :-[
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline fivesprites

  • Mr. Polyvector
  • ***
  • Posts: 101
    • View Profile
    • FiveSprites
Re: Android Extras
« Reply #24 on: 2013-May-18 »
Updated to v1.1.

This is a minor update to support GLBasic Beta V11.414.  Also includes a couple of new functions for TMusic as requested.

Next update will include support for Google Play Services (Leaderboards etc).

//Andy