godot/platform/android
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
..
api Remove the restriction on supported types for Godot Android plugins 2024-09-29 14:32:10 -07:00
doc_classes Add support for Android Themed Icons (monochrome) 2024-09-27 13:56:34 +02:00
export Add support for Android Themed Icons (monochrome) 2024-09-27 13:56:34 +02:00
java Provide access to the Android runtime to GDScript 2024-09-29 14:32:10 -07:00
plugin Remove the restriction on supported types for Godot Android plugins 2024-09-29 14:32:10 -07:00
android_input_handler.cpp
android_input_handler.h
android_keys_utils.cpp
android_keys_utils.h
audio_driver_opensl.cpp
audio_driver_opensl.h
detect.py
dir_access_jandroid.cpp Update the GodotHost interface to support signing and verifying Android apks 2024-08-26 11:16:38 -07:00
dir_access_jandroid.h Update the GodotHost interface to support signing and verifying Android apks 2024-08-26 11:16:38 -07:00
display_server_android.cpp Added fallback_to_opengl3 2024-09-20 06:10:05 +08:00
display_server_android.h
file_access_android.cpp Reduce code duplication in FileAccess 2024-09-01 12:39:32 +02:00
file_access_android.h Reduce code duplication in FileAccess 2024-09-01 12:39:32 +02:00
file_access_filesystem_jandroid.cpp Reduce code duplication in FileAccess 2024-09-01 12:39:32 +02:00
file_access_filesystem_jandroid.h Reduce code duplication in FileAccess 2024-09-01 12:39:32 +02:00
java_class_wrapper.cpp Remove the restriction on supported types for Godot Android plugins 2024-09-29 14:32:10 -07:00
java_godot_io_wrapper.cpp
java_godot_io_wrapper.h
java_godot_lib_jni.cpp Remove the restriction on supported types for Godot Android plugins 2024-09-29 14:32:10 -07:00
java_godot_lib_jni.h Update the storage access handler logic to support accessing / retrieving contents with the assets:/ prefix 2024-08-26 11:16:37 -07:00
java_godot_view_wrapper.cpp
java_godot_view_wrapper.h
java_godot_wrapper.cpp Restore 'Toggle fullscreen' menu for the Android editor and clean up the immersive mode logic 2024-08-28 09:50:34 -07:00
java_godot_wrapper.h Restore 'Toggle fullscreen' menu for the Android editor and clean up the immersive mode logic 2024-08-28 09:50:34 -07:00
jni_utils.cpp Fix JavaClassWrapper so it actually works 2024-09-02 08:54:23 -05:00
jni_utils.h Fix JavaClassWrapper so it actually works 2024-09-02 08:54:23 -05:00
net_socket_android.cpp
net_socket_android.h
os_android.cpp Update the GodotHost interface to support signing and verifying Android apks 2024-08-26 11:16:38 -07:00
os_android.h Update the GodotHost interface to support signing and verifying Android apks 2024-08-26 11:16:38 -07:00
platform_config.h
platform_gl.h
README.md
rendering_context_driver_vulkan_android.cpp Add debug utilities for Vulkan 2024-08-21 23:48:08 +02:00
rendering_context_driver_vulkan_android.h
SCsub SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
string_android.h
thread_jandroid.cpp
thread_jandroid.h
tts_android.cpp
tts_android.h

Android platform port

This folder contains the Java and C++ (JNI) code for the Android platform port, using Gradle as a build system.

Documentation

Artwork license

logo.png and run_icon.png are licensed under Creative Commons Attribution 3.0 Unported per the Android logo usage guidelines:

The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.