Start a new topic

Sample app doesn't show anything

Sample app doesn't show anything


Hi Ramesh,

Please have a look at the very latest SDK Samples app (version 3.2).
The issue you describe appears to be cullingDistance related. In case your places are more than 50km away you need to update cullingDistance in JS or native code. 
Latest Sample application also does not use any altitude information anymore so markers will appear on user level by default.

Kind regards,
Andreas

Andreas,

 

Thanks again for the response. I have tried the Fake GPS as suggested by you with no luck! I downloaded the app, started it, clicked on the Set Location button (didn't know what it did internally) and then started the SDK sample's Browsing POI application. As earlier, it said 'JSON objects loaded peoprly', but no POIs showed up in the camera view.

Just FYI - I have already tried putting alert statements in onLocationChanged in multiple places till the end (even before I tried the Fake GPS solution). All of them showed up properly.

So, just to clarify - I have tried all options that are known to me - with SIM, without SIM, with WIFI, GPS, Fake GPS - none worked on this device which is a brand new Karbon device.

Thx

K. Ramesh

Hi again,

I guess location service is the issue of your phone.
Some devices do not fire location events if no SIM is inserted...

Please try using a Fake GPS Tool (e.g. this one), which spoofs your location and fires location events frequently.

Kind regards,
Andreas


I tried the AR.CONST.UNKNOWN_ALTITUDE suggestion. It didn't work!

The same code continues to work in my other Samsung DUOS device.

Andreas,

Thanks. I will try your suggestion. In the meantime, I had tried the poicircle.js to see if the circle showed up. Even that is not working. This is the code:

onLocationChanged: function onLocationChangedFn(latitude, longitude, altitude, accuracy) {

        //alert(markerDrawable);
        

        var myGeoLocation = new AR.RelativeLocation(null, 10, 0, 0);
        var myCircle = new AR.Circle(1, {style: {fillColor: '#FFC100'}});
        
        var poiHTMLdrawable = new AR.HtmlDrawable({uri:"marker.html"}, 4, {viewportWidth: 512, scale:1, updateRate:AR.HtmlDrawable.UPDATE_RATE.STATIC})
        var myGeoObject = new AR.GeoObject(myGeoLocation, {drawables: {cam: myCircle}});
        //AR.context.onLocationChanged = null;
    }

Is there an altitude issue here as well?

K. Ramesh

Hi again!

You may ether set the altitude of the marker to "AR.CONST.UNKNOWN_ALTITUDE" or adjust the locationManager so altitude value of user is never passed over to architectView. 
Both approaches will cause rendering your markers on user's altitude level as fallback.

Kind regards,
Andreas

Andreas,

Thanks for the very quick response. Yes, I see dots in the radar. If it is an altitude issue, how will it work in my other device? How can altitude value depend on the device? How do I fix it?

Thx

K. Ramesh

Hi Ramesh,

We'll soon provide updated sample-application which handles altitude handling in a better way.
Could you please let me know if you see dots in the radar of the "Browsing POIs" sample?
I guess it is related to aan inaccurate altitude value of your device, compare this post.

Kind regards,
Andreas

Markus,

I have come back! Sorry to resurrect this thread, but the issue has come back to haunt me!

So, I got a brand new test phone, another Karbon Titanium S5. I have installed the SDK sample as well as my sample. When I try the Browsing POIs in SDK sample and click on the 'Presenting POI Details',  it says 'JSON objects loaded properly', but no POI marker shows up. I have tried this with SIM and withot SIM. When I try my sample with the poiwithlable.js, I put alert statements in the script in multiple places in the 'createMarkerAtLocation' method from beginning to end. All these alert statements show up properly, but no marker in camera view!

One more update on the SIM use: earlier, I had told you that the samples started working in my Samsug DUOS device when I inserted a SIM. The samples continue to work in that device now ever AFTER REMOVING the sim!

So, I am not sure what to think of this whole solution. Is this issue isolated to me and my devices?

Sorry to be bothering you with this, but I need a solution! Please help.

Thx

K. Ramesh

Markus,

I believe the exception is thrown everytime setLocation is called, but I am not able to confirm it because the exception disappears during debugging. It seems to happen only when I am NOT debugging. If I am able figure out, I will update in this thread.

Thx

K. Ramesh

@Ramesh

Do you get this message only when you use ArchitectView.setLocation()-method or is it anytime you startup the application?

thx,

Markus

Hi there!

Could you please confirm that you have read the whole thread and checked everything i mentioned previously. (Especially if you get a valid location)

thx,

Markus

Markus,

One last question(hopefully) on this thread:

Everything is working fine in the sample I have created and the marker shows up correctly (using the poiwithlabel.js). But I still see an exception in the logcat which reads like this:

10-02 14:43:08.320: W/webview(9282): java.lang.Throwable: Warning: A WebView method was called on thread 'WebViewCoreThread'. All WebView methods must be called on the UI thread. Future versions of WebView may not support use on other threads.
10-02 14:43:08.320: W/webview(9282):     at android.webkit.WebView.checkThread(WebView.java:15142)
10-02 14:43:08.320: W/webview(9282):     at android.webkit.WebView.getSettings(WebView.java:5725)
10-02 14:43:08.320: W/webview(9282):     at android.webkit.WebView.getVisibleTitleHeightImpl(WebView.java:2533)
10-02 14:43:08.320: W/webview(9282):     at android.webkit.WebView.getViewHeight(WebView.java:2575)
10-02 14:43:08.320: W/webview(9282):     at android.webkit.WebViewCore.setupViewport(WebViewCore.java:3741)
10-02 14:43:08.320: W/webview(9282):     at android.webkit.WebViewCore.didFirstLayout(WebViewCore.java:3447)

What is this due to and how to remove this? I am using the ArchitectView class's setLocation method as you had suggested.

Thanks again

K. Ramesh

I try the POI examples from the downloaded SDK (3.1) without modification on iOS and the markers show up properly. However, no markers shown on my Android device (Note 2 with Android 4.1.2).

Anand


 

Well i guess Google maps uses a little more sophisticated location provider or internal APIs to get position data. With the recently released Android version the Android SDK provides a more intelligent API to get position data from the user. You could have a look into that.

Concerning the callJavascript-call, well it actually doesn't make much difference how you call it, allthough with callJavascript you can inject anything you want into your Architect world. As this is a string that is then parsed in javascript, it is therefore a little more prone to errors due to possible syntactical mistakes, in contrast to the setLocation()-method which is specifically designed to inject location information into your architect world.

Markus
Login or Signup to post a comment