I know that the user (or remote DB) registration process can be controlled by the administrator, by the -zu parameter, or custom scripts. When I use the code below to play with ML, my client database is always destroyed:
But, after some time I found out that ml_database has a plenty of "remote IDs" (remote databases that do not exist anymore). I tried to search for any API method of UltraLiteJ to unregister my database, but could not find anything.
Could you please help me with this question? Or there is not such concept in MobiLink as "register"/"unregister", and everything should be maintained by the administrator and e.g. ml_delete_remote_id/ml_delete_sync_state. I know that my example is very artificial, but I use it as the playground, and I want to do the automatic registration and unsubscription of the application from the code.
Thank you in advance,
What you're looking at is the tracking mechanism used within MobiLink to keep track of unique remotes in the MobiLink system. It's not really a 'register'/'unregister' mechanism since remotes are generated without a remote ID by default. Unless the ml_remote_id database option is set before the first synchronization, MobiLink will generate a new remote ID for each newly initialized database and set it in the remote database once it first synchronizes.
What you really want to do is set up your register/unregister mechanism to register a MobiLink user for user authentication to the MobiLink server and then manage that authentication mechanism.
If you want to remove the unused remote IDs on the consolidated server, then yes, you will have to use 'ml_delete_sync_state'.
answered 01 Aug '14, 10:10