godot/platform/android/java/lib
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
..
aidl/com/android/vending/licensing
patches
res Add support for Android Themed Icons (monochrome) 2024-09-27 13:56:34 +02:00
src Provide access to the Android runtime to GDScript 2024-09-29 14:32:10 -07:00
srcTest/java/org/godotengine/godot/utils
AndroidManifest.xml
build.gradle Improve support for XR projects 2024-09-06 00:35:50 -07:00