Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to store spatial anchors longer than 24h?

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?

like image 687
mbuessecker Avatar asked Nov 26 '25 19:11

mbuessecker


1 Answers

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.

like image 107
virivera-msft Avatar answered Nov 29 '25 09:11

virivera-msft



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!