You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
android handle only one activity, either game or native. To use native,
the default could now be used, but all other android need to add the
game activity.
# Objective
android native activities should be able to use the default
## Solution
remove android-game-activity from default
## Testing
created a default app for android native activity with default
## Important
Will be a breaking change for apps using android-game-activity.
---------
Co-authored-by: Christian Oelschlegel <oelschle@sciphy.de>
Co-authored-by: leomeinel <leo@meinel.dev>
title: "Remove android game activity from default"
3
+
pull_requests: [23708]
4
+
---
5
+
6
+
Bevy previously had `"android-game-activity"` as part of its default features. Users that wanted to use "android-native-activity" instead, had to disable `default-features` and define all features + "android-native-activity" explicitly since they can't have both activity features at once.
7
+
8
+
Now both activities are not part of the default features but need to be added explicitly.
9
+
10
+
**Migration from bevy 0.18 to 0.19:**
11
+
12
+
For apps using `GameActivity` you need to add the feature `"android-game-activity"` to your `Cargo.toml`:
13
+
14
+
```toml
15
+
bevy = { version = "0.19", features = ["android-game-activity"] }
16
+
```
17
+
18
+
Since apps using `NativeActivity` already define features explicitly, you don't have to necessarily make changes. If you want to use the default features instead, you can now just add the feature `"android-native-activity"` to your `Cargo.toml` instead of redefining features explicitly:
19
+
20
+
```toml
21
+
bevy = { version = "0.19", features = ["android-native-activity"] }
Copy file name to clipboardExpand all lines: docs/cargo_features.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ collections to build your own "profile" equivalent, without needing to manually
42
42
|scene|Features used to compose Bevy scenes. **Feature set:**`bevy_world_serialization`, `bevy_scene`.|
43
43
|picking|Enables picking with all backends. **Feature set:**`bevy_picking`, `mesh_picking`, `sprite_picking`, `ui_picking`.|
44
44
|default_app|The core pieces that most apps need. This serves as a baseline feature set for other higher level feature collections (such as "2d" and "3d"). It is also useful as a baseline feature set for scenarios like headless apps that require no rendering (ex: command line tools, servers, etc). **Feature set:**`async_executor`, `bevy_asset`, `bevy_input_focus`, `bevy_log`, `bevy_state`, `bevy_window`, `custom_cursor`, `reflect_auto_register`.|
45
-
|default_platform|These are platform support features, such as OS support/features, windowing and input backends, etc. **Feature set:**`std`, `android-game-activity`, `bevy_gilrs`, `bevy_winit`, `bevy_clipboard`, `default_font`, `multi_threaded`, `webgl2`, `x11`, `wayland`, `sysinfo_plugin`.|
45
+
|default_platform|These are platform support features, such as OS support/features, windowing and input backends, etc. **Feature set:**`std`, `bevy_gilrs`, `bevy_winit`, `bevy_clipboard`, `default_font`, `multi_threaded`, `webgl2`, `x11`, `wayland`, `sysinfo_plugin`.|
46
46
|common_api|Default scene definition features. Note that this does not include an actual renderer, such as bevy_render (Bevy's default render backend). **Feature set:**`bevy_animation`, `bevy_camera`, `bevy_color`, `bevy_gizmos`, `bevy_image`, `bevy_mesh`, `bevy_shader`, `bevy_material`, `bevy_text`, `hdr`, `png`.|
47
47
|2d_api|Features used to build 2D Bevy apps (does not include a render backend). You generally don't need to worry about this unless you are using a custom renderer. **Feature set:**`common_api`, `bevy_sprite`.|
48
48
|2d_bevy_render|Bevy's built-in 2D renderer, built on top of `bevy_render`. **Feature set:**`2d_api`, `bevy_render`, `bevy_core_pipeline`, `bevy_post_process`, `bevy_sprite_render`, `bevy_gizmos_render`.|
0 commit comments