I tried out the sample project from Azure Spatial Anchors for android and everything worked. I can add an anchor from one smartphone and locate it from another smartphone. The problem is that I cannot locate the anchor after approximately 24h. I know that it is possible to set an expire date, but I did not and I haven't seen it in the code. Is there a time limit for storing the spatial anchors similar to ARCore Cloud Anchors?
It is possible to store spatial anchors for longer than 24 hours. The service doesn’t delete any of your anchor information unless you explicitly set the expiration time on the anchor or delete the anchor manually.
If you are currently using the sharing anchor sample, the original version of the sample was clearing your application storage every time.
if (!this.initializing.Wait(0))
{
this.initializing.Set();
await this.dbCache.DeleteIfExistsAsync(); // here the database gets deleted
await this.dbCache.CreateAsync();
this.initialized.Set();
}
This behavior was subsequently changed in a pull request.