Rest Api has the option to set a "weight" (RouteFeatureWeightType) for every RouteFeatureType, while mobile SDKs have only on/off feature(es: you can ask a route with or without dirt road). Is there a similar function or workaround for mobile SDKs?
RouteRestrictions options to specify restrictions for route calculations. These include avoidSeasonalClosures, avoidAreas.
developer.here.com/documentation/ios-sdk/api_reference/Structs/RouteRestrictions.html
developer.here.com/documentation/android-sdk/api_reference/com/here/sdk/routing/RouteRestrictions.html
More features for routing are as follows :
developer.here.com/documentation/ios-sdk/api_reference/Routing.html
Related
I'm recently started to use Jovo framework to build the App for Google Home device based on Dialogflow. The app is working fine. Now decided to do the integration with Facebook Messenger via Dialogflow. It's working fine. I can trigger the bot to start from the Messenger plus can see the output and so on but have two questions:
the output in FB messenger looks like this: [speak]Some text inside[/speak],
can we remove the SSML tags from the output, is there a way to strip
those tags before tell() or ask() methods are triggered, I have tried
using the this.googleAction().setResponseObject() method, have
checked how to response JSON looks like and then created the object
to pass with the property fulfillmentText, where I removed those
tags, it works that way but this is not efficient and looking for sth simpler
is there a method to use, sth like setResponseObject() but without alexaSkill() or googleAction "prefix" obj, where we can prepare a custom object so we can send custom JSON response. I'm asking cause I want to use FB Messenger specific output like buttons: https://developers.facebook.com/docs/messenger-platform/send-messages/buttons. Is this is possible using JOVO
Since the release of Jovo v2.1 (read the announcement here), you can build Facebook Messenger chatbots with Jovo using Dialogflow Integrations.
Regarding your questions:
1) This is fixed with the latest update
2) You can set custom payloads with the new this.$dialogflow.setCustomPayload('facebook', payload) helper method
I have a newsletter page on my website which I'd like to also use to capture some additional information about the user using Google Analytics.
Using the getAll() method from ga.js I can get the referrer URL (if any), however I cannot see the medium or source data. Is this possible to retrieve using their ga.js library?
Retrieve specific tracker from the list of trackers you obtained.
Use the following to access the fields source and medium.
tracker.get('campaignSource') and tracker.get('campaignMedium')
Additional help from below links.
Access data from ga object:
https://developers.google.com/analytics/devguides/collection/analyticsjs/accessing-trackers
Field reference:
https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference
This is not possible with ga.js.
However, you can use custom JavaScript to deduce the same information.
If you only want this capability, then I suggest you have a look at the library I wrote: https://github.com/ilkkapeltola/visitdata
Once the library is included, you can run visitData.get(), which returns an object with exactly the data you need.
If you are using google analytics core reporting api try this
'metrics': 'ga:sessions ,ga:pageviews',
'dimensions' : 'ga:source,ga:medium'
Today my app got reject i don't understand problem.
Rejected because:
10.6 - Apple and our customers place a high value on simple, refined, creative, well thought through interfaces. They take more work but are worth it. Apple sets a high bar. If your user interface is complex or less than very good, it may be rejected
With comment:
10.6 Details
Your app’s location feature is not integrated with the built-in mapping functionality, which limits users to a third party Maps application.
Next Steps
Please revise your app to give users the option to launch the native Apple Maps application.
What i need to do? I should add Apple Maps in my app and give the user a choice?
Why they do not require such other applications.
A few words about my application: It’s social network that displays the users on map
You can see main screen with Google Maps
they say:
"to give users the option to launch the native Apple Maps..."
what you can do is show an action sheet with 3 options:
google maps
waze
maps
the user will choose ...
one of the option shoukd be maps of Apple
implement the maps option as follow:
let regionDistance:CLLocationDistance = 100
let coordinates = CLLocationCoordinate2DMake(lat, lon)
let regionSpan = MKCoordinateRegionMakeWithDistance(coordinates, regionDistance, regionDistance)
let options = [
MKLaunchOptionsMapCenterKey: NSValue(mkCoordinate: regionSpan.center),
MKLaunchOptionsMapSpanKey: NSValue(mkCoordinateSpan: regionSpan.span),
MKLaunchOptionsDirectionsModeKey: motType = MKLaunchOptionsDirectionsModeDriving
] as [String : Any]
let mapItem = MKMapItem(placemark: MKPlacemark(coordinate: coordinates, addressDictionary: nil))
mapItem.name = placeName
mapItem.openInMaps(launchOptions: options)
Inside iTunes Connect, I simply questioned the rejection, asking them why this was required, and stated that I have business logic related to Google Maps. After two days the app got accepted.
Services like Uber provide users with masked phone numbers so that they can communicate directly with one another without exposing their actual phone number. It seems to me a form of network address translation?
Does anyone have services, OSS, API/code examples or SDK links that one might use to set up a similar system?
Primarily this would entail mapping/translating a generated phone number to a user's actual number (behind the scenes), but telemetry style analytics would also be desirable.
Preferably Node Javascript, C#, or Java... but anything is better than nothing!
Many thanks
Ricky from Twilio here.
We put together a tutorial on how to build masked phone numbers with Node.js, C#, Java, Python or Ruby:
https://www.twilio.com/docs/tutorials/walkthrough/masked-numbers/node/express
In this Node.js example, here's the block of code that masks a phone call:
router.post('/use-voice', twilio.webhook({ validate: false }), function (req, res) {
from = req.body.From;
to = req.body.To;
body = req.body.Body;
gatherOutgoingNumber(from, to)
.then(function (outgoingPhoneNumber) {
var twiml = new twilio.TwimlResponse();
twiml.play('http://howtodocs.s3.amazonaws.com/howdy-tng.mp3');
twiml.dial(outgoingPhoneNumber);
res.type('text/xml');
res.send(twiml.toString());
})
});
The gatherOutgoingNumber function uses the phone call from and to to determine who the user is intending to call, once that number is found this code forwards the call to the correct phone number.
It's MIT licensed and hopefully can help you get started.
I found what Uber uses... Twilio! So that's one option at least
I'm testing the routing service in API 3.0 and I can´t find the attribute "direction" in meanuver, this attribute exists in API 2.5, it attribute indicates the direction of the instruction for example "forward, straight, right.."
Does anybody know if there is some attribute that indicates the direction of the instruccion in the API 3.0?
Thanks.
As discussed in the migration guide, there is a fundamental shift in the use of services between the 2.x and 3.0 Here Maps APIs for JavaScript - previously the Manager objects decided a fixed format of for the request to the underlying REST APIs and encapsulated the response. Whereas now the full range of parameters can (and should) be set by the developer.
In the routing case the question is not so much "What can the 3.0 API do?" as "How was the REST request fixed by the 2.x API and how can I mimic the parts of that request that I need?".
Looking at the Legacy API playground simple routing example, the underlying REST request is:
http://route.cit.api.here.com/routing/7.2/calculateroute.json?routeattributes=shape&maneuverattributes=all&jsonAttributes=1&waypoint0=geo!52.516,13.388&waypoint1=geo!52.517,13.395&language=en-GB&mode=shortest;car;traffic:default;tollroad:-1&app_id=APP_ID&app_code=TOKEN...
This can be reproduced precisely in the 3.x API with the following:
var router = platform.getRoutingService(),
routeRequestParams = {
routeattributes: 'shape',
maneuverattributes: 'all',
jsonAttributes :'1',
waypoint0: '52.516,13.388',
waypoint1: '52.517,13.395',
language: 'en-GB',
mode: 'shortest;car;traffic:default;tollroad:-1'
};
router.calculateRoute(...);
The next question here is what parameters do you really need for your application? The list for the calculateRoute endpoint of the underlying REST Routing 7.2 API includes the description of maneuverattributes showing how to obtain directions - with maneuverattributes=...,direction
So it may be possible to reduce the routeRequestParams to something like:
var routeRequestParams = {
routeattributes: 'shape',
maneuverattributes: 'position,length,direction',
...etc...
So in summary, you'll need to consult the REST Routing API documentation to define what you need first, before passing those parameters into the query of the Maps API for JavaScript calculateRoute() call.