Skip to content

Conversation

@dorotaphanSiili
Copy link
Collaborator

@dorotaphanSiili dorotaphanSiili commented Aug 14, 2025

Closes # https://jira.it.epicgames.com/browse/APIGEAR-275

Closes #

📑 Description

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

ℹ Additional Information

in api we assume that enum has an int value, that is not a case in java.
The java enums are objects, which are set constants. Not narrowed to an
integer type.
To make them work within our ecosystem that includes other technologies,
where enums are integer based, I added a int field value and functions
to obtain the value for serialization, and create an enum based on the
integer.

This is part of adding an andorid-jni feature.
it is not a good practice to have a modules names that have dot
Usually the dot separates submodules

This is part of adding the android-jni feature.
add the async version of methods. When using with rpc we don't want to
block main thread, the rpc anyway assumes the answer will arrive at some
point later.
add the isReady property, which is also required when using rpc
mechanisms.

This is part of adding the android-jni feature.
the generated names were incorrect, that is fixed now.

This is part of adding the android-jni feature.
The reason for change is alignment with other techologies implementations

This is part of adding the android-jni feature.
the java convention (and ease of use) is that each class or struct has its own file.
The api was split to fulfill that practice.

This is part of adding the android-jni feature.
adds necessary gradle files to allow the project to be build with e.g.
android studio.
The gradle was chosen because of compatibility with unreal build system,
as the main purpose of all the changes in the series of commits is to
allow easy data change between unreal and android.
Most of the modules will be used with unreal to achieve that.

This is part of adding the android-jni feature.
an android service is created for each interface.
It allows setting a backend that fullfills the interface.
The intention is to be albe to provide java-jni impl e.g. by unreal (but
it can bu also pure java implementation).
The backend is created by factory, so it is in same thread as the
service.
Note that the services are created in applications thread, not in a separate
ones, so having many interfaces and thus many services does not cause
the many threads overhead.
The messenger part is not yet there. It will be added with following
tasks.
The service must be started implicitely with
context.startService(theService) function.

This is part of adding the android-jni feature.
add gradle files with which it can be build with android studio or with
unreal.

This is part of adding the android-jni feature.
@dorotaphanSiili dorotaphanSiili force-pushed the dphan/add_android branch 2 times, most recently from 7f8a3f3 to 10f3ef9 Compare August 30, 2025 13:53
adds an empty implementation of generated interface.
It fully supports handling properties (with the property change singal
emission).
It generates empty methods, to be filled with bussiness logic.
It may serve as an example or base implementation.

It allows easy implementing android service side when provideded as a
backend, hence all the helper file, facory, and service starter which
implicitely start the service.

This is part of adding the android-jni feature.
Adds all the "topics" of messages (an enum).
Introduces a parcelable type that wraps generated structs.
This works only for structs with simple types.
The parcelable will be extended with handling complex types in later
tasks.

This is part of adding the android-jni feature.
Adds handing then messages: calls proper methods on backend when serving
incoming messages and sends messages when notified by backend about
changes that must be forwarded to clients.

Added initial tests.

This is part of adding the android-jni feature.
add tests that actually check if service properly reacts on receiving
messages and sends messages when needed.

This is part of adding the android-jni feature.
adds the version of the backend that has some native functions.
This will be used with e.g. unreal template.
There are no build files as unreal has its own system.

This is part of adding the android-jni feature.
adds a client adapter, that implements the ServiceConnection and the api
interface.
A client is generated per api interface and connects with its Service
counterpart, that may be provided by diferent applications.
It requires the desired package that exposes the service to be given for
binding.
The service must be already started - the intent does not start it.
The client allows registering an event listener to get info about all
the changes that service informs about.
In that way it allows adding a jni version of that listener, which will
be added later.

This is part of adding the android-jni feature.
This is part of adding the android-jni feature.
adding new event and a way to fire it to get info about object isReady state
change (e.g may be used for connection established or backend ready).

This is part of adding the android-jni feature.
adds an almost ready to start application for test purposes.
IMPORTANT it generates the functionality only for first interface.
That is for usability purpose, some tabs could be introduced for each
interface, but this make example more complex.
It genereates buttons to request some propety changes:
IMPORTANT the logic how to change it needs to be implemented by user,
similar for executing methods, the user must provide proper parameters.
It prints the result of events received from service: property changes,
singals receivied, method results.

This is part of adding the android-jni feature.
add message and handling that allow synchronizing the client state with
the service state on the connection established. The service sends all
the values of properties.

This is part of adding the android-jni feature.
add parcelable wrappers for enums and add proper handling of them in
service and client.
IMPORTANT: it is not yet handled if enum is part of struct.

This is part of adding the android-jni feature.
In java the structs (java objects) are passed by ref. The copy
constructor helps proper managing of lifetime when handling with
Parcelable objects.
This is preparatory commit to be used for helpers when handling
arrays of structures.

This is part of adding the android-jni feature.
Add functions for (de)serializing arrays of parcelable elements.

This is part of adding the android-jni feature.
Adds handling of arrays of all types: simple types, enums, structs.
adds some go templates for easier handling same code in many places.

Add handling of arrays of any type for messanger in service.
NOTE: using template makes the code not aligned

This is part of adding the android-jni feature.
service uses a stub as the backend.
It is generated only for the first api interface.
User needs to fill the logic of changing properties and emitting
singals.
All the buttons and text views are already correctly connected.
It provides a buttons to start or stop service, change properties, emit
singals. The methods are also working, if the client sends a request it
is served, but the logic needs to be implemented in the stub i.e the
_impl module.

This is part of adding the android-jni feature.
It is an event listener that has native methods that needs to be
implemented with cpp code.
It allows adding e.g. unreal client adapter.
There are no project files added as unreal provides its own build
system.

This is part of adding the android-jni feature.
Structs have now implemented equals function and hashCode.
@dorotaphanSiili dorotaphanSiili force-pushed the dphan/add_android branch 6 times, most recently from 0ccd280 to 65e5b6a Compare September 9, 2025 08:43
use better comparing functions for structures and arrays.
Use implemented equals() for the strucutres.
Tests requires now filling the structures with some data other than
default, cause before setting new value and expected notification it is
checked for equality (not set in that case).
With new compaision that checks the content not addres of object it
needs to have some values.
Adds an app that uses composite build and builds all dependant modules.
The modules are in the diretory of rootproject.
Each module must provide a version.
The app just makes instances of all intefaces implementations:
stub and if android feature enabled also the client and service
versions.
Adds a task to run all unit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant