I'm developing hybrid application and want to access to HERE map url from any device (android / ios / windows phone / web)
I tried to follow this answer : Create URL to here.com
But It's not working in all cases.
In my case, i tried this url : https://www.here.com/directions/drive/start:48.85,2.35/end:52.51,13.38
Android without Here map app installed : open m.here.com -> ok
Android with Here map installed : open m.here.com but do not find app installed -> failed
iOS without Here map app installed : open m.here.com -> ok
iOS with Here map app installed : open m.here.com and ask if we want to use app installed, but if i click yes, app say me 'cannot find itinerary' -> failed
Windows Phone 10 without Here map app installed : ask me to install Here map app, if i say yes, redirect to store with no result (failed), if i say no, error page -> failed
Windows Phone 10 with Here map app installed : open app but say me 'cannot find itinerary' -> failed
Web : ok
I have more errors than success cases, so i can't use this kind of url.
Is there a different kind of URL that I can use to open m.here.com if there is no installed application, and launch application if it is installed?
(or open m.here.com in all cases at least)
The deeplinking developer guide has been recently made public, you could use that.
https://github.com/heremaps/map-linkbuilder-app
http://heremaps.github.io/map-linkbuilder-app/
So, try creating share urls
(You'll get something like this: https://share.here.com/r/52.51607,13.37699,Berlin%2C%20Germany/51.05364,13.74082,Dresden%2C%20Saxony%2C%20Germany?m=d&t=normal)
Related
I have an Angular 9 + Ionic 5 application, deployed as PWA, Android and IOS apps.
We use google's universal, cross-platform URL to launch Google Maps,
as described here: https://developers.google.com/maps/documentation/urls/get-started
Function open a location in google maps:
export const openMaps = (lat: number, lng: number) => {
const url = `https://www.google.com/maps/search/?api=1&query=${lat}%2C${lng}`;
return window.open(url, '_top').focus();
};
This works fine in PWA and IOS app, however in Android after the address is loaded in browser as expected, it fails to launch Navigation after supporting start location in Route planner and tapping on "IN APP NAVIGATION". (Same happens if i provide the link with Directions to start navigation automaticly).
Error shown after tapping "IN APP NAVIGATION":
The webpage at intent://maps.app.goo.gl/?link=https://www.google.com/maps/dir//50.253722,10.958954/#49.9145812,10.9626145,8z/data%3D!4m2!4m1!3e0!11m1!6b1?entry%3Dml&apn=com.google.android.apps.maps&amv=914018424&isi=585027354&ibi=com.google.Maps&ius=comgooglemapsurl&utm_campaign=ml_promo&ct=ml-nav-nopromo-dr-nlu-wv-msc&mt=8&pt=9008&efr=1#Intent;package=com.google.android.gms;scheme=https;S.browser_fallback_url=https://play.google.com/store/apps/details%3Fid%3Dcom.google.android.apps.maps&pcampaignid%3Dfdl_long&url%3Dhttps://www.google.com/maps/dir//50.253722,10.958954/#49.9145812,10.9626145,8z/data%253D!4m2!4m1!3e0!11m1!6b1%3Fentry%253Dml&min_version%3D914018424;end; could not be loaded because:
net::ERR_UNKNOWN_URL_SCHEME
Does someone have an idea what went wrong here? The URL syntax should be correct, but seems like the google maps intent loads an unknown scheme on Android.
Solved! Problem was window.open(url, '_top').focus();
These link should be used with target: _system.
And in case of hybrid Ionic app, the following plugin is also recommended!
https://ionicframework.com/docs/native/in-app-browser
I have developed a xamarin form app that it uses MS Graph in order to user sign in. I have used samples of GitHub that open a new browser activity where user sign in and then the app goes to home activity. It works correctly. But some users have blocked or deleted Chrome app in order to use MS Edge as default browser, and then when app tries to start the browser activity, it launches an error because it can’t find chrome activity. I have asked on MS Graph GitHub (https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/242 ) but they and I are thinking that it isn’t problem of SDK but I don’t know how I could fix it. How should I fix it in order to work with any installed browser?
Thank you
It is done by design. The Microsoft Identity Client library uses Custom Chrome tabs and does not have any fallback strategy to run using a WebView.
You are probably encountering this exception thrown when it doesn't find Chrome installed: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/blob/dev/src/Microsoft.Identity.Client/Platforms/Android/AuthenticationActivity.cs#L131
string chromePackageWithCustomTabSupport = GetChromePackageWithCustomTabSupport(ApplicationContext);
if (string.IsNullOrEmpty(chromePackageWithCustomTabSupport))
{
string chromePackage = GetChromePackage();
if (string.IsNullOrEmpty(chromePackage))
{
throw new MsalClientException(MsalClientException.ChromeNotInstalledError,
"Chrome is not installed on the device, cannot proceed with authentication");
}
#Cheesebaron is correct, this is by design. Currently, Xamarin Android in MSAL can only launch chrome or chrome custom tabs. If the device doesn't have them, it will cause an exception, as you noted above.
#cansado2930 This part of the error message pkg=com.android.chrome means Chrome is not installed on the device.
Embedded webview support in MSAL will be an option in near future.
Here's a link to the issue in the MSAL repo.
I am using launchmyapp plugin to create scheme url for my cordova android app. I have created myapp:// as my scheme and am using intent://scan/#Intent;scheme=myapp://;S.browser_fallback_url=https://play.google.com/store/apps/details?id=org.myapp;end
inside an <a>tag to open the app from web browser.
Now when I want to open any specific page (like settings page) of my app using the scheme URL.
I tried using myapp://settings as suggested on the plugin's page but it doesn't seem to work. Again the homepage of my app is only getting opened.
I have tried this answer, but it doesn't seem to work. Any help is much appreciated.
I had achieved this using cordova-universal-links-plugin
step 1 : install cordova-universal-links-plugin
step 2 : add below tag in your project's config file
<universal-links>
<host name="yourappname.com" scheme="http">
<path event="launchedAppFromLink" url="*" />
</host>
</universal-links>
step 3 : Subscribe the above event "launchedAppFromLink" on device ready event. by adding below code
universalLinks.subscribe('launchedAppFromLink',
onApplicationDidLaunchFromLink);
function onApplicationDidLaunchFromLink(eventData) {
console.log('Did launch app from the link: ' + eventData.url);
}
after this your app link will be like : http://yourappname.com/
step 4 : on clicking above link if your app is installed in device then it will open.
step 5 : to open app specific register on branch.io
step 6 : register your app. After app registration it gives a link which is used to redirect or open the app.
step 7 : after that link just add your page name for example "myappname.app.link/yourapppage.html" and it will open that same page in mobile if your app is installed and if not then it will redirect to playstore with your app link
Hello everybody I have a problem a long time and decided to post , on some devices I can not write anything , this happens especially in mobile phone android(4.1-4.4) that does not have sdcard.
Some phones usually work ( especially with android 5.0 ) with or without SDCARD .
My routine is:
CHECKS(READ) localStorage ->
IF OK : AUTH AUTOMATIC -> UPDATE LOCALSTORAGE -> GO HOME PAGE.
ELSE : USERS INFORMATION LOGIN AND PASSWORD -> AUTH -> SAVE LOCALSTORAGE -> GO HOME PAGE.
ALREADY TRIED USE : SQLITE AND FILE.
but in some phones especially with android ( 4.1 - 4.4 and without SDCARD ) he finds no content in LocalStorage , so every time the User open the app it needs to inform login and password.
OBS:
1. I checked the AndroidManifest and i HAVE WRITE_EXTERNAL_STORAGE and READ.
when installed on an emulator android 4.1 without SDCARD , I encounter the following error in CMD " rm failed for -f , Read only file system"
My permissions
whitelist
camera
media-capture
device
statusbar
file
file-transfer
imagepicker
media
network-information
file-opener2
sqlite-storage
ms-adal
x-toast
socialsharing
Thank you in advance
I'm developing a cordova application that find a particular retailer on the map near to the user's current GPS coordinates. I used the navigator.geolocation.getCurrentPosition to get the user's current position and use the Google Maps API v3 javascript to do a text search to find the retailer on the map.
I have the standard and recommended settings in both Android and iOS config files, it works find on iOS but not on Android. I exported the APK file and installed on Moto G, the application name is listed in Settings -> Location -> Current Location Requests but the browser still throws Timeout error.
Any ideas what could be wrong and why unable to detect the current position?
EDIT: To add more info, sometime the application opens up and stays blank without any timeout alerts.
You must add the geolocation plugin to your project using the following command. This sets the appropriate permissions in your platform config.xml file to allow the APK to speak with the OS:
cordova plugin add org.apache.cordova.geolocation
More: http://docs.phonegap.com/en/3.2.0/cordova_geolocation_geolocation.md.html