I'm using HERE SDK trial and I want to ask that RealisticViewListener and LaneInformationListener works with trial license? Because I have registered listeners but I don't get any event.
navigationManager.addLaneInformationListener(new WeakReference<>(laneInformationListener));
navigationManager.setRealisticViewMode(NavigationManager.RealisticViewMode.DAY);
navigationManager.addRealisticViewAspectRatio(NavigationManager.AspectRatio.AR_4x3);
navigationManager.addRealisticViewListener(new WeakReference<NavigationManager.RealisticViewListener>(realisticViewListener));
Both features are available in the trial (as well as all other features). Your implementation looks correct, but it will be hard to determine where things go wrong without seeing more code.
Also, please be aware that in rare cases there is simply no lane- or signposts information available, e.g. the callback only occurs when the user has arrived at a point in the route where lane information is available such as before a highway exit.
I suggest to try out the SDK navigation example on GitHub and hook your listeners in from there to see how it works. You can also start navigation simulation (if you are unsure if your local area has enough data):
// if user wants to start simulation, submit calculated route
// and a simulation speed in meters per second
error = navigationManager.simulate(route, 60);
Related
I recently started to see this logs I/Counters: exceeded sample count in FrameTime multiple times in my app logcat, I understood it comes from Google Maps.
Any idea what it means? and how to get rid of it?
Try disabling a few layers of the widget (like say 'myLocation' layer enabled by using 'myLocationEnabled' parameter) and enable them back in the release build. Also make sure you are disposing your Google Maps Controller in the dispose method (if you are storing it somewhere after taking it from onMapCreated).
As far as I can figure out from the error and the API docs, GoogleMaps has multiple layers and each layer needs to be built in a given FrameTime. Since the added burden of multiple layers slow down the processing, it may exceed given FrameTime and trigger the error.
The reason may also include the fact that debug builds have no optimisations and that really affects the GoogleMaps package. I tried the same app with the constant barrage of 'I/Counters: exceeded sample count in FrameTime' errors in release build on a real device and the errors seem to not appear, implying these errors can simply be ignored.
While we wait for a fix you can set these to fold (in Android Studio) by going to File->Setting->Editor->General->Console and adding "exceeded sample count in FrameTime" to the list "Fold console lines that contain:"
I had the same issue since this morning, it was gone when after I:
stopped my emulator
wiped the data
cold booted it.
NOTE: this is with android
For Android emulators it's enough to wipe the data of the device and the FrameTime messages will go away.
EDIT: Sadly, this isn't a permanent solution as messages will start appearing after re-opning the emulator. I will be back with another update if I stumble upon a permanent fix.
I had a similar issue, for me I had setup a location listener:
location.onLocationChanged.listen(l) {
controller.animateCamera(...);
}
This appeared to be called even though the phone location had not changed, so I added a check to store the previous known location and in the listen, I compared the streamData with my location and only performed the update if there was a change.
Perhaps you can post your code to see if this could be the reason?
It's happening inside onLocationChanged method.
When I set isMyLocationEnabled to false at some extent it was removed but fully, now there were lesser log statement.
It happens when the map moves (or probably more specifically when it is redrawn). Both when animating, and also when manually sliding it around. My logcat is spammed full of Counters: exceeded sample count in FrameTime messages. This explains why you'll see less when not having my location enabled: The map doesn't move as much...
It's so annoying.
For flutter: I was using setState() method with a google map and there was also a locationListener(). So I removed the setState() and instead I did update my screen using provider. And the warnings were gone.
In mixpanel is it possible to track then total number of hours my application used per day. I am having Shift in and Shift out option in my application but what i need is to track the Consolidated
time of my application usage per day.
In theory yes, but it very much depends on the events you have.
If for example you have a beginSession and an endSession event tracked every time the users opens and closes the app, respectively, you can simply find all of a user's events of these kind and compute the "live time" between them.
Mixpanel have a new(ish) application in their we console for running map-reduce style JQL queries on your data set, you could script something like this. Or if you prefer, you can plug into their export API and pull all your events for a users, and run the calculations. If you have lots of events you could even try to heuristically determine "active time" based on idle time between events?
However, I believe you are more likely asking if this is something that Mixpanel tracks for you and will give you for free, I do not believe this is the case.
If you have a rundown of your tracking structure, I may be able to provide more specific advise?
I am making an Android game. So, people are able to create groups/parties between them and I would like to give them the ability to view each member of their group moving on the Google Maps in real time. This means that I have to find a good way to update each client’s map markers in real time or pseudo-real time at least.
Would an approach with a DBMS be fine or that would be too costly? In this approach, every client should be responsible to update the DB every so with their current coordinates and thus everyone can make queries to view every other party member's lastly updated location. Making this happen within small time intervals will give the feeling to users that people are moving on Map in real time.
On the other hand, would a peer-to-peer approach handle this case in a better way? Like every group/party runs on its own by letting players exchange info between them containing everyone's new coordinates every so (interval). I believe that the second approach is better because it does not give load to our server, but there may be drawbacks. I am not sure however how easy this would be to be implemented and if Android API provides something good for this case.
Any opinion/suggestion/comment is very welcome. Please I would like to hear what you are thinking, since I have no experience on this subject and hence anything might be helpful.
Thank you in advance! Please enlighten me :)
Since the options are all a bit "costy" in terms of connection/operation, i would suggest you to check at the MQTT protocol. It's used as M2M connection with an eye to optimization. It was created for Internet of Things purposes.
I've used it for non-android projects but it can be used also for that.
You only need a server (broker) and i suggest Mosquitto (which is lightweight).
Then every one can subscribe to a topic like: "/location/update/+" using + wildcard means every topic that is one level after "update" topic.
Then every one publishes his own position to the topic "/location/update/{MYID}" and the others will receive the position.
Usually the position are retrieved only when connected, but you can manage to support a sort of "hanging" subscription by using QoS=2 when subscribing and connecting always with the same ClientName.
Does it help?
I am developing an Android application using skobbler/telenav SDK also known as SKMaps. I am currently implementing a simple gps navigation system using SKRouteManager and SKNavigation manager and the corresponding Listeners. So far I have been able to set the destination for my navigation by geocoding postcodes into gps locations using the google api. I also have alternative routes and the onReRoutingStarted() event of the SKNavigationListener is working right. However, I have a problem with onDestinationReached() - it seems like it does not get called when I reach my destination so my navigation does not stop. So if I keep driving and pass the destination point the app starts rerouting me again. Is there an issue with the onDestinationReached() or any special requirements when implementing it?
I thought it should work because it successfully calculates the route in the first place so it should know the destination point and I shouldnt have to specify it in any other way. But the method does not get called by the app when I reach the end of the route.
I have also encountered another issue with the SKNavigationListener events - onUpdateNavigationState(SKNavigationState navigationState). Inside the method I am trying to obtain some of the information the SKNavigationState object should be able to provide me with. The problems are as follows:
Eclipse cannot recognise the method getDistanceToDestination() - acts as if it is not defined inside the class SKNavigationState.
getCurrentAdviceCurrentStreetName() returns null
As far as I understand getCurrentAdviceDistanceToAdvice() should give me the distance to the point where I will receive another advice and getCurrentAdviceDistanceToDestination() should give me the remaining distance to the end point of the route. Both methods are supposed to return the distance in meters but they provide me with some really large numbers (more than a billion) when my route is only 5 kilometers long. Also, sometimes they return 0.
The onUpdateNavigationState(SKNavigationState navigation state) is supposed to get called multiple times while following the route and every time provide me with new information about the state of my navigation. It does get called multiple times but when I use the above methods they keep returning the same values (if I restart the application the values change but during a single test they give me the same values).
If anyone has any clue what could be going wrong. It is really confusing because I can successfully get the current speed from the SKNavigationState object using getCurrentSpeed(). But somehow some of the methods seem to not exist and others return values that dont make sense.
This issue was a bug on the 2.0.2 SDK version - it was fixed in vs 2.1.0 (which should be out on the 30'th of June 2014)
My final goal is to calculate how much time a user is spending at a specific location. Therefore I would like to make the application aware of when a user arrives and leaves a specific location, so I can calculate the time spent there.
Is there a way to get notified when a user arrived at specific location and leaves it in Android and iOS? It does not need to be instant, one-two minutes of miscalculation are fine.
Thank you in advance!
On Android platform, your can try the Geofencing API introduced at Google I/O 2013
Within the API document, they provide a good example project.
And for iOS it's called (surprisingly) Location Services - what you need is the Region Monitoring.