After the clicking on button new folder appears in the Sync Folders List, it attached to the remote device but all files in it DON’T SYNC with remote device.
Maybe you just miss a restart or repost of the config to syncthing rest api ? Is this near the official master code and what would you like to achieve? Try restApi.saveConfigAndRestart
Before setting out my goal, I would like to draw attention to how synchronization works in Syncthing Android example:
On the local device (LD) in DeviceActivity, the remote device ID (RD)
The event onDeviceRejected is processed by the EventProcessor on RD - Notification is generated and the DeviceActivity is started via PendingIntent, then the Device is created equivalent to LD
The FolderActivity is started on the RD and the Folder associated with the LD is created.
The event onFolderRejected is processed on the LD through EventProcessor - Notification is generated and through FolderActivity the FolderActivity is started via PendingIntent, then the Folder associated with the RD is created
After that, the folders created on LD and RD are perfectly synchronized.
Now about my purpose and the essence of my question. I do not need to create a Folder through FolderActivity, because the Folder properties are not entered from the UI, but are formed from the code and are known in advance. Therefore, the order of actions is as follows:
On the local device (LD) in DeviceActivity, the remote device ID (RD)
The event onDeviceRejected is processed by the EventProcessor on RD - Notification is generated and the DeviceActivity is started via PendingIntent, then the Device is created equivalent to LD
If the event onFolderRejected is processed on LD, Notification is generated and FolderActivity is started via PendingIntent, then the Folder associated with the RD is created - FOLDERS SYNCHRONIZATION WORKS
If, on the onDeviceRejected EventProcessor handler, you create a Folder from the code described above - FOLDERS DO NOT SYNCHRONIZE.
How can I implement the creation of a Folder from the code so that they are successfully synchronized?