virtualx-engine/platform
Fredia Huya-Kouadio 5e0805a813 Provide access to the Android runtime to GDScript
Thanks for the fix of `JavaClassWrapper` in https://github.com/godotengine/godot/pull/96182 and the changes in the previous commit, this introduces an `AndroidRuntime` plugin which provides GDScript access to the Android runtime capabilities.

This allows developers to get access to various Android capabilities without the need of a plugin.
For example, the following logic can be used to check whether the device supports vibration:

```
var android_runtime = Engine.get_singleton("AndroidRuntime")
 if android_runtime:
 	print("Checking if the device supports vibration")
 	var vibrator_service = android_runtime.getApplicationContext().getSystemService("vibrator")
 	if vibrator_service:
 		if vibrator_service.hasVibrator():
 			print("Vibration is supported on device!")
 		else:
 			printerr("Vibration is not supported on device")
 	else:
 		printerr("Unable to retrieve the vibrator service")
 else:
 	printerr("Couldn't find AndroidRuntime singleton")
```
2024-09-29 14:32:10 -07:00
..
android Provide access to the Android runtime to GDScript 2024-09-29 14:32:10 -07:00
ios SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
linuxbsd Replace squish with bcdec for BC decompression 2024-09-26 14:42:54 +02:00
macos SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
web Merge pull request #96610 from adamscott/emscripten-minimum-requirements 2024-09-26 18:45:10 +02:00
windows Merge pull request #97458 from Faless/fix/imagine_its_2024_and_your_os_cant_handle_few_kbs_of_text 2024-09-26 12:50:14 +02:00
register_platform_apis.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
SCsub SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00