feezi / android-augment-reality-framework

Automatically exported from code.google.com/p/android-augment-reality-framework
GNU General Public License v3.0
0 stars 0 forks source link

How to add a progress indication #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I using this framework and showing my local POIs similar to Demo example. 
Everything is working fine except that it takes long time to open the view . SO 
i wanted to show some indication progress bar / atleast a toast that AR data is 
getting loaded . How can i do this.

Thanks a lot for your support

Original issue reported on code.google.com by preetha...@gmail.com on 22 Aug 2012 at 1:46

GoogleCodeExporter commented 9 years ago
Take a look at the updateData method in the Demo class, it implements the 
gathering of data sources.

Original comment by phishman3579@gmail.com on 22 Aug 2012 at 2:16

GoogleCodeExporter commented 9 years ago
Thank you for the answer. I am doing similar to Demo.java.

In my AR activity oncreate looks like @Override
    public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                getMarkers();
    }

getmarkers() - i am loading my local data and here i am doing similar to 
updateData 

public void getMarkers() {
        try {
            exeService.execute(new Runnable() {
                @Override
                public void run() {
                        getmy markers
                    }
                    ARData.addMarkers(cachedMarkers);
                }

            }
            );
        } catch (Exception ex) {
            ex.printStackTrace();
        }

    }

The issue is that in my main activity i have a button on click of which i 
launch my AR activity. Launching this AR activity is not immediate . It takes 
some noticeable time before AR view is opened . Even if i comment //getmarker 
function, its the same effect. SO i think its just creating the view taking 
time. But when run the Demo.java , i dont see this issue. Can you please give 
me some pointers on why this could be happening . Thanks again for the quick 
response

Original comment by preetha...@gmail.com on 23 Aug 2012 at 6:20

GoogleCodeExporter commented 9 years ago
I don't see any reason why your code would take much more time. As long as the 
"getting data" is pushed into a background thread, you should be fine. Without 
seeing the rest of the code, I can really add to much more. I'd also recommend 
moving getMarkers() into the onStart() method.

Original comment by phishman3579@gmail.com on 23 Aug 2012 at 9:09