Page 1 of 4

SpiderBasic 2.10 final is out !

Posted: Mon Apr 10, 2017 7:14 am
by Fred
Hello everybody !

- final version is out ! Thank you all for testing and feedback

- beta 3 is available and bring some fixes and IAPKey field for Android InAppPurchase

- beta 2 is available and brings a lot of fixes.

The new beta version of SpiderBasic 2.10 is available on your online account for testing :). Here are the new features:

Code: Select all

- Added: Accelerometer library
- Added: Geolocation library
- Added: InAppPurchase support for iOS
- Added: BatteryLevel(), DeviceInfo(), VibrateDevice()
- Added: #PB_String_PlaceHolder flag to StringGadget() to set a placeholder at creation
- Added: #PB_Event_SizeDesktop event to monitor a desktop resize without having a background window
- Added: ResizeScreen() to resize an already created screen
- Added: Cordova command can be executed via Import/EndImport 
- Added: Android app is immediately run on the device once deployed

- Changed: reworked the InAppPurchase library
- Changed: switched from crosswalk to cordova on Windows for Android. NOTE: cordova requires internet connection to build an app.

- Optimized: Android app size is now much smaller (1,5 MB instead of 20 MB)

- Removed: TouchRadiusX() and TouchRadiusY() as it was only working on FireFox

- Fixed: some compiler and library bugs
Have fun with SpiderBasic and don't hesitate to report any issue to have a stable final release !

The Fantaisie Software Team

Re: SpiderBasic 2.10 beta 1 is available

Posted: Mon Apr 10, 2017 8:44 am
by swan
Nice. Particularly the Cordova inclusion ..... :D

Re: SpiderBasic 2.10 beta 1 is available

Posted: Mon Apr 10, 2017 8:48 am
by falsam
Thanks for this new release.

JDK 1.8+ Path is initialized by default with the value H:\JavaSDK\

Re: SpiderBasic 2.10 beta 1 is available

Posted: Mon Apr 10, 2017 8:52 am
by Fred
Probably your previous conf ?

Re: SpiderBasic 2.10 beta 1 is available

Posted: Mon Apr 10, 2017 9:33 am
by falsam
Fred wrote:Probably your previous conf ?
Oops yes. Sorry. :oops:

Re: SpiderBasic 2.10 beta 1 is available

Posted: Mon Apr 10, 2017 9:38 am
by falsam
I generated an APK from an existing code.

- With SpiderBasic 2.0 I have a size of 25 MB
- With SpiderBasic 2.1 I have a size of 1.7 MB. That's great.

Re: SpiderBasic 2.10 beta 1 is available

Posted: Mon Apr 10, 2017 10:03 am
by Fred
I wrote a small example to test the new functions:

Code: Select all

Procedure Events()
  
  Select EventGadget()
    Case 0
      VibrateDevice(1000) 
      
    Case 1
      Debug DeviceInfo(#PB_Device_Model)
      Debug DeviceInfo(#PB_Device_Platform)
      Debug DeviceInfo(#PB_Device_UUID)
      Debug DeviceInfo(#PB_Device_Version)
      Debug DeviceInfo(#PB_Device_Manufacturer)
      Debug DeviceInfo(#PB_Device_Serial)
      
    Case 2
      Debug BatteryLevel()
      
    Case 3
      Debug "AccelerometerX: " + AccelerometerX()
      Debug "AccelerometerY: " + AccelerometerY()
      Debug "AccelerometerZ: " + AccelerometerZ()
      Debug "AccelerometerTime: " + AccelerometerTime()
      
    Case 4
      Debug "GeolocationLatitude: " + GeolocationLatitude()
      Debug "GeolocationLongitude: " + GeolocationLongitude()
      Debug "GeolocationAltitude: " + GeolocationAltitude()
      Debug "GeolocationSpeed: " + GeolocationSpeed()      
      Debug "GeolocationHeading: " + GeolocationHeading()      
      Debug "GeolocationTime: " + GeolocationTime()      
          
  EndSelect
  
EndProcedure

Procedure OnSizeDesktop()
  Debug "size desktop"
  ExamineDesktops()
  Debug "DesktopWidth(): " + DesktopWidth(0)
  Debug "DesktopHeight(): " + DesktopHeight(0)
EndProcedure


OpenWindow(0, 0, 0, 300, 205, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
 
ButtonGadget(0, 0, 0, 300, 25, "Vibrate")
ButtonGadget(1, 0, 30, 300, 25, "SystemInfo")
ButtonGadget(2, 0, 60, 300, 25, "BatteryLevel")
ButtonGadget(3, 0, 90, 300, 25, "Accelerometer")
ButtonGadget(4, 0, 120, 300, 25, "Geolocation")
StringGadget(5, 0, 150, 300, 50, "Geolocation", #PB_String_PlaceHolder)

StartAccelerometer(100)
StartGeolocation(30000)

BindEvent(#PB_Event_Gadget, @Events())
BindEvent(#PB_Event_SizeDesktop, @OnSizeDesktop())
Some functions are only available from Android/iOS

Re: SpiderBasic 2.10 beta 1 is available

Posted: Mon Apr 10, 2017 10:07 am
by Fred
To use a cordova plugin easily:

Code: Select all

Import "cordova plugin add cordova-plugin-camera"
EndImport
It will add the plugin at compile time, so you could use the plugin function with inline javascript. Should work with any cordova commands, every command string starting with 'cordova' is executed during the build.

Re: SpiderBasic 2.10 beta 1 is available

Posted: Mon Apr 10, 2017 11:17 am
by spidernet
Nice new features. Thank you. :)

Re: SpiderBasic 2.10 beta 1 is available

Posted: Mon Apr 10, 2017 11:19 am
by MrTAToad
The layout of PB_Event_SizeDesktop in the help file isn't quite correct...