How to launch apple maps with multiple stops in flutter - ios

I was able to launch apple maps using url_launcher package with this url "https://maps.apple.com/?saddr=18.519513,73.868315&daddr=18.518496,73.879259"
But I am unable to find any resource or a way to have stops in between the source and destination. Is it possible for apple maps to have multiple stops between source and destination? If yes, how?
Thanks.

By passing multiple daddr query string parameters you can setup a mutli stop trip, I couldn't find this documented anywhere however.
Example:
https://maps.apple.com/?dirflg=d&daddr=OXFORD%2C%20FL%2034484&daddr=FRANKLIN%2C%20TN%2037064

Related

How to create custom AR button

Does someone have any examples how to generate AR URL?
Reading Web SDK documentation, seems that there is no functionality to do that.
Found https://github.com/Roomle/roomle-button but not sure that`s still way to go since it has not been updated for 2 years.
If you are using the Roomle SDK you can use saveCurrentConfiguration to get the configuration id (hash) of the current configuration. Not sure what you used at the moment to obtain a configuration id but you need to call this in order to save it on the Roomle server and open it in another place.
Also make sure to set the configuratorId URL param when linking to the AR site.

Cordova Custom-URL-scheme plugin not working

The only plugin I can find is this one https://github.com/EddyVerbruggen/Custom-URL-scheme
I try to install it and check its iOS implementation, it is empty inside plugins/cordova-plugin-customurlscheme/src/ (no ios folder found, only android and window). I check the plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js, the content is:
"use strict";
/*
Q: Why an empty file?
A: iOS doesn't need plumbing to get the plugin to work, so..
- Including no file would mean the import in index.html would differ per platform.
- Also, using one version and adding a userAgent check for Android feels wrong.
- And if you're not using PhoneGap Build, you could paste your handleOpenUrl JS function here.
*/
It doesn't make sense, based on my understanding, it should implement func application(_application: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:] ) -> Bool in the AppDelegate, but it is empty. In this case, how come overwrite handleOpenURL in the JS will work?
I really couldn't find others, can anyone advise similar workable plugin? My scenario is, when A app call B app, my B app is a cordova app, and I need a listener/callback to capture the url content.
Updated:
added in MAF tag, as the issue was caused by Oracle MAF framework, didn't expect that, thought the issue coming from Cordova.
It should not implement something in iOS. Custom URL scheme only updates Info.plist in iOS. So, it's fine. It REGISTERS custom URL schemes.
To handle the URL them you need to right your own code. How plugin will know what you need when custom URL is opened?
Alright, I know why there is no such implementation in https://github.com/EddyVerbruggen/Custom-URL-scheme
That is because in cordova-ios CDVHandleOpenURL.m, it already contained such implementation, it will consume the notification which is posted by the CDVAppDelegate.m, and in the CDVHandleOpenURL.m, it will execute handleOpenURL in the WebView JavaScript namespace.
The reason why my apps is not working, it is because Cordova was wrapped in the Oracle MAF framework, and it overwrite the custom URL mechanism provided by Cordova, which is not what I expected, so I forgot to mention MAF in my original question, I will add in related information.
reference:
https://docs.oracle.com/middleware/maf210/mobile/develop-maf/maf-ui-remote-url.htm#ADFMF24147

Can I Use Google Tag Manager in Electron?

I am trying to integrate Google Tag Manager into an Electron app,
but it doesn't seem to be working. it seems like gtm codes I planted in the app are NOT sending the analytics data anywhere.
I found this issue on Electron github repo. Seems like some people are having the same issue.
I wonder if it's impossible at all to integrate GTM on Electron, or is there any way around to do this?
[Update]
While reading Alexander Leithner's answer, a further question popped up.
on Google Tag Manager - Dev Guide - Security, it says:
While most of the tag templates in Google Tag Manager are also
protocol relative, it's important to make sure that, when setting up
custom tags to fire on secure pages, those tags are also either
protocol relative or secure.
Does file:// protocol matters because GTM is protocol relative? Wouldn't it be possible to bypass this with GA's forceSSL=true option which can be set on GTM Interface?
[Final Update]
I found the perfect answer in this blog post:
Run Google Tag Manager And Google Analytics In Local Files.
Thank you Eike Pierstorff, for giving me the hint of setting storage to none, it led me to this post.
GTM by default used to use the same protocol as the webpage - that's what "protocol relative" means. I.e. there is a bit of code that loads the GTM library, and if this uses the file protocol (as per the embedded wegpage) it will try to load the library as a file, which does not work. However GTM has switched from protocol relative to https by default, so I don't think GTM is your problem here.
You mention Analytics data, and if this refers to Google Analytics then your problem is not with GTM, it is that GA does not work on local files. Google Analytics uses a cookie to store the clientId (which is needed to aggregate individual hits into sessions/users), and since you cannot set cookies on a local file this does not work.
A possible workaround would be to go to your GA tag in GTM, to the "set fields" settings, set "storage" to "none" (which means that no cookie is set) and pass in a clientId manually.
As this comment by Samuel Attard (MarshallOfSound), who is an Electron developer, states that Google Tag Manager does not work when the including webpage is loaded using a file:// URL.
If you'd instead load your application via http:// (or more preferably via https://), you would be able to use Google Tag Manager.

XCUIApplication replacements for UIATarget captureScreenWithName()

We are trying to migrate from UIAutomation to XCUITests and did use the captureScreenWithName() API to programmatically generate screen shots.
What is the replacement in the XCUITests ?
(I know that automatically screenshots are taken in case of error, but we have a special test which runs forever in a loop and evaluates QA click,tap commands via network similar to the appium-xcuitest-driver https://github.com/appium/appium-xcuitest-driver)
Do I need to rip out private headers (XCAXClient_iOS.h) like the appium guys did in order to get a screenshot API?
Edit
I used the actual code line for the accepted solution from
https://github.com/fastlane/fastlane/blob/master/snapshot/lib/assets/SnapshotHelper.swift and its just this for IOS
XCUIDevice.sharedDevice().orientation = .Unknown
or in objC
[XCUIDevice sharedDevice].orientation =UIInterfaceOrientationUnknown;
I use a process on the host to lookup in the "Logs/Test/Attachments" directory all Screenshot_*.png files before the call , and find the new shot then after the call as the new file added in this directory.
Gestures (taps, swipes, scrolls...) cause screenshots, and screenshots are also often taken while locating elements or during assessing expectations.
Fastlane's snapshot tool uses a rotation to an unknown orientation to trigger a screenshot event (which has no effect on the app): https://github.com/fastlane/fastlane/tree/master/snapshot - you can use this if you want to be in control of some screenshots.

Launch intellij via URL

Would it be possible to register some protocol
and then launch IntelliJ via an URL. I am
thinking of submitting the URL via Desktop.browse()
from within a JVM.
My idea is that the URL would consists of
a file name parameter and a line number parameter.
And IntelliJ would then open this file name and
scroll to the given line number. Here is an
example:
intellij:/mypath/myfile#99
Has this already been done?
Bye
P.S.:
java.awt.Desktop Class
http://docs.oracle.com/javase/6/docs/api/java/awt/Desktop.html
Check IDEA-65879 for existing workarounds or vote for the issue so that it's available out of the box in the future versions.
One of the suggested solutions is the Remote Call plug-in.
You could use IntelliJ Platform REST API.
Example to check: http://localhost:63342/api/about
Use Postman to send these requests.
For me, it works on IntelliJ Idea but unfortunately, on Android Studio it doesn't work.
Asked this question about it.

Resources