GLBasic forum

Main forum => Announcements => Topic started by: Kitty Hello on 2020-Apr-25

Title: New Update. Bluetooth, Camera, Permissions, Chomebook
Post by: Kitty Hello on 2020-Apr-25
The new update 16.507 is available on STEAM now.
Among some bug fixes, this offers more possibilities on the Android platform. The mousewheel works better and DDgui got some bugfixes. (Yikes - I forgot to upload that - will soon do!)


You've seen the great efforts of spacefractal the last months. So, the Chomebook support is in and the game controlers are, too.
I fixed some bugs in the IDE and made strings even faster by implementing move semantics.
The bluetooth library is finally done and can be used for Windows and Android. Might also work on other platforms, but not tested.
For Android, I added a camera support and you can request permissions using the Android dialog popups.
Code: (glbasic) [Select]
IF "1" == android_JAVACALL("requestPermission:android.permission.CAMERA")

To see it all in action, here's a project that uses all of them.
Title: Re: New Update. Bluetooth, Camera, Permissions, Chomebook
Post by: spacefractal on 2020-Apr-25
im wasent sure hiw whell ans rest of buttons was used, but actuelly forgot MOUSEAXIS really as its a bit wrong reading the rest of the buttons that way and a command newer used and totally forgot all about it.

So im havent checked that for CHROMEBOOK. im take a look when possible. MOUSESTATE does works by both buttons a intended and fell like a mouse and as not a fake touch.
Title: Re: New Update. Bluetooth, Camera, Permissions, Chomebook
Post by: SnooPI on 2020-Apr-26
It's good news  :good:
Title: Re: New Update. Bluetooth, Camera, Permissions, Chomebook
Post by: spacefractal on 2020-Apr-26
mouse whell on Windows is multipled with 120?

Also Windows and Chromebook mouse whell seens to been complete different values. Im will go for the Chromebook here as its works more better as its does not have a insane multipled value.

Howover we do cant use range between -1 and 1 integer at all. On android its im can get up to around 40 in range when wheeling in full speed.
Title: Re: New Update. Bluetooth, Camera, Permissions, Chomebook
Post by: Qedo on 2020-Apr-26
it can be useful?
https://devblogs.microsoft.com/oldnewthing/20130123-00/?p=5473
Title: Re: New Update. Bluetooth, Camera, Permissions, Chomebook
Post by: spacefractal on 2020-Apr-26
im wasent aware of that 120. Me thinks we should just have divided its by 120 before returning in glbasic and that done. So the document is now a bit wrong.


On Chromebook, this is quite different its seen and does just return a float. Strange. im see im can get Android part to been close as possible to Windows me think and do a max value of 480 in step of 120.

So... MOUSESTATE is not working on Chromebook yet and is working on that. Etc to get all 3 buttons + wheel to works.
Title: Re: New Update. Bluetooth, Camera, Permissions, Chomebook
Post by: MrPlow on 2020-Apr-26
Good work! Very interesting!
also worth keeping an eye on app crash stats too, for each subsequent update - stuck partial wake locks and such...
as they affect placement and priority and should be monitored.

I am always a little nervous when the big updates come in - in case many thousands of users are affected
 

:)
Title: Re: New Update. Bluetooth, Camera, Permissions, Chomebook
Post by: spacefractal on 2020-Apr-26
Look like the newest version can break combatible as that way JavaCall calls has been changed, which was by Gernot and not by me. Etc you can no longer call with JavaCall() function, which can cause compiler to fails.

All you need to do is just replace JavaCall$ to android_JAVACALL and import the c++ java function like this:

Code: (glbasic) [Select]
?IFDEF ANDROID
IMPORT "C" const char* android_JAVACALL(const char* string)
?ELSE
FUNCTION android_JAVACALL: callStr$
RETURN
ENDFUNCTION
?ENDIF

Actuelly a little bit annoying me thinks. But its fixable by now.

PS.  stuck partial wake locks is a totally different issue and is pretty much impossible to fix. No idea how. The only idea is there is something wrong when the app goes to HIBERNATE or a sound issue (make sure to stop any sound/music when paused) when you quit it and then can been forced down.
Title: Re: New Update. Bluetooth, Camera, Permissions, Chomebook
Post by: dreamerman on 2020-Apr-26
Nice to see new features :-)
I've only briefly looked as example source, didn't play with it but noticed that it BT part detects my android phone, so few questions emerged:
is this bluetooth feature restricted in any way or it just pure bt interface that can be used in any way and does it have some special hardware requirements like Bluetooth v 4.0 or whatever?

My two cents on mouse wheel, whatever are system hardware specifications, differences and changes between their API updates those functions should give consistent, same kind of results in GLB, will it be integer range like -120 to 120, or float -1.0 to 1.0 it's secondary matter, just one type/range for all systems.

Camera usage can be interesting for some projects..
Title: Re: New Update. Bluetooth, Camera, Permissions, Chomebook
Post by: erico on 2020-Apr-26
Great news!
Title: Re: New Update. Bluetooth, Camera, Permissions, Chomebook
Post by: Marmor on 2020-Apr-27
kitty kriegst du android serial auch rein ? gruss