Android Extras

Previous topic - Next topic

kanonet

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

spicypixel

#16
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.
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.

Ian Price

Moved and stickied :)
I came. I saw. I played.

fivesprites

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

Ian Price

Aaaaaaannnnnd UNMOVED AND UNSTICKIED! :P
I came. I saw. I played.

fivesprites

hehe - thanks :D


fivesprites

Quote from: spicypixel 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

spicypixel

Quote from: fivesprites 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.

bigsofty

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)

fivesprites

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