I am developing android app using xamarin. And I want to use the azure ad b2c to implement my log in funcation. I refer to the sample https://github.com/Azure-Samples/active-directory-b2c-xamarin-native
.
When I try to finish the sample, I find it worked fine in uwp and iOS, but not android. In android, it always try to open the url with chrome, if there is no chrome in the android device, the app is crashed.
So can I change the browser instead of the chrome in default? Because I can't ask my end users to install the chrome.
I understand this is very important for developers. Usually, MSAL in Android or iOS requires support for Custom Chrome Tabs for displaying authentication prompts.
So, if you don't want to use the Chrome , you need to use different library, not MSAL. Such as AppAuth for Android. But using different library will need you change the way of authorization.
I also suggest you can post this idea in this Feedback Forum, the Azure AD Team will see it. I will also report this feedback to Azure PG.
Hope this helps!
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.
Embedded webview support in MSAL will be an option in the near future.
Here's a link to the issue in the MSAL repo.
Related
I am developing a website which requires camera and microphone for communication.
The site uses Twilio communication for audio/video calls.
Twilio device setup is failing and is giving an error as:
Twilio.Exception: twilio.js 1.3+ SDKs require WebRTC/ORTC browser support. For more information, see https://www.twilio.com/docs/api/client/twilio-js. If you have any questions about this announcement, please contact Twilio Support at .
To which I tried to debug and found that for my website in Google settings, microphone, camera and location settings are set to Block and is Disabled.
I have tried,
Resetting the Chrome browser
Upgrading to latest version of Chrome
Re-installing the Browser
But to no success.
This is how the chrome settings looks like:
Note: This seems to happening on 2 of my laptops, although on some machines it is working properly and the settings to these items is Allow in those machines. I have a customer demo and will have to use my laptop for it.
Any help is highly appreciated!
The getUserMedia API which allows access to the camera and microphone requires a secure context, i.e. https. See this blog post for background information. Recent versions of Chrome do not make getUserMedia available on http anymore.
Switch to https which should work out of the box on Heroku.
I've followed this doc to
Create a wrapper Android app based on this sample project for my UI application which runs in non-public domain in our corporate servers.
Add assetlinks.json in my Angular 6 PWA application, with SHA256 fingerprints of my release key.
Deployed the signed apk to a Android 4.4.3 device running Chrome Dev 69 and Google play services - 12.8.74.
When I run the application, everything works fine except hiding the address bar, which makes it as a regular custom tab and not the "Trusted web" content.
I don't see any error in the log and not sure how to debug this scenario. Any help on this is appreciated.
Got confirmation from Chrome team that they are using TWA assets link validation in server side using an API call and so this solution wont work for Private web apps. Said that, they are also considering to move that logic to browser to support this use case. Will update here when I have any update on this.
Update: As of Chrome Version 72, TWA(Trusted web activity) if available in Chrome stable version and the web asset validation(to make sure the web page is yours/same as the app its loaded to) happens in browser. So this solution can be implemented for private web apps for hosting inside enterprise environment.
Also, now PWAs can be packed as regular app using TWA solution and uploaded to Play store as an apk file. Documentation on this is still being updated as per one of Chrome developer. But the solution as such is ready for use.
Understandably, PWAs (Progressive Web Apps) are added to home screen after the user visits the web app in a supported browser and clicks on "Add to Home Screen". This works fine for publicly available PWAs.
Thinking of Enterprise Android applications, which needs to be installed to thousands of devices via some app push tools like Airwatch, its practically not possible to have someone open the browser, put the URL and then add to home screen in all thousands of devices.
Is there any other way to automate this deploy/add icon to home screen of a Progressive Web App, not needing the user to visit the web app in a browser, and clicking on "Add to Home Screen" ?
One option we thought about is wrapping in Cordova, but we're trying to find a solution without such wrapper.
Chrome for Android generates and signs .apk file on the fly using WebPack, when the user clicks on "Add to Home screen" (from menu or install banner) option and if the site has a valid manifest.json and service worker.
Extracting and distributing APK: This .apk can be located and exported to desktop using file explorer tools. For some reason, some of default file explorer tools couldn't locate this .apk file. Once exported, this .apk can be used to distribute in controlled environment..like in enterprise devices, where you can enforce the deceive to have Chrome Browser. If this .apk is installed to devices which don't have Chrome browser, user will get a message saying "Chrome" is required to open this app. Once installed, installed PWA apk can be used.
For distributing PWA apps through Play store, google is streamlining the process. A google engineers repose on building APKs (March-2018), when we reached out to them for our enterprise needs.
"Well done extracting the APK and deploying it, it should give a good experience to end users, but I agree it shouldn't be that complicated to deploy web apps on Android.
We are currently working on a streamlined web apps feature, with which you wouldn't need to manipulate or build APKs. This feature will be available on managed devices using Play to deliver apps"
Alternate options: If you think your user base may not have Chrome or don't want to rely on that dependency, wrapping with Cordova kind of hybrid solution is the only way to build your PWA apps for distribution in app stores. With this option, if the "webpack" in the device has the version 40+, user will get PWA benefits. Otherwise, it will still work as a regular hosted web app.
Update on TWA - Trusted web activity is the official way to pack PWA for Android and its available in Chrome 72 and it also supports private/enterprise web apps as the digital assets validation happens in browser now(it use to happen in cloud, making this solution not possible for private web apps).
You can upload the PWA to Playstore using tools like PWA2APK. Just need to share the play store URL to the users, from which they can download PWA app like normal Android App.
Trusted Web activities are a new way to integrate your web-app content such as your PWA with your Android app using a similar protocol to Chrome Custom Tabs.
Trusted Web activities
I have an app made in xamarin (for Android, iOS and Windows Phone) which requires deep linking which should open and internal page on receiving an url.
This url will be sent by sms to the user with http protocol. I tried the solutions provided by OneLink and Branch Metrics and they work with Android and iOS. The only problem is with Windows phone (8.1).
Both of them are not able to detect if windows phone is installed and if yes open the app and not take to the store.
Is there any solution to this (maybe third party solution).
NOTE: i have tried directly clicking myapp://open and it works on windows phone but what i need is using http and not my app as the above custom protocols are non clickable within Sms's.
Yes, deep linking is possible on Windows Phone. Shortcut Media offers a third-party solution for this (disclaimer: I work for Shortcut Media).
Have a look at this answer to see how to implement it manually...
NPAPI plugins are not supported on Microsoft's new browser Edge.
Google Chrome developed Chrome Native Messaging in order to interact with an executable installed on the computer provided its link on the registry (for Windows OS).
Firefox seems to want to support Chrome extensions in the future, and we can assume the browser will eventually support Chrome Native Messaging as well.
Internet Explorer will continue to support NPAPI until 2020 (from what I heard).
For Edge, no solution has yet been developed (or is there one?)
I'm willing to work with URL handlers (myapplication://mydata) in order to compensate for this lack. Is there a better approach so far?
https://msdn.microsoft.com/en-us/library/aa767914%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
My intent is to communicate through an HSM installed on the computer, and use the Crypto API interface, or a PKCS#11 driver in order to sign data and send back the result to the browser. With a chrome native messaging extension, it actually works well. With a URL Handler, I will be able to send data to the executable, but I won't get the result, so I will have to think to post the result to a web specific URL, but this can result in a security hole to my perspective.
Thanks in advance,
EDIT : 2017-01-14 : The following link shows the progress of the adaptation of the Microsoft Edge Extension API :
https://developer.microsoft.com/en-us/microsoft-edge/platform/documentation/extensions/api-support/extension-api-roadmap/
EDIT: as Beckyang posted recently, there is a link where you can vote for the feature to be developed in priority, here :
https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/13612338-native-messaging
After reading some recent news:
https://github.com/david-sabata/web-scrobbler/issues/678
http://www.theverge.com/2015/7/30/9072271/microsoft-windows-10-updates
http://news.softpedia.com/news/microsoft-wants-google-chrome-extensions-to-work-on-edge-with-zero-work-to-do-488282.shtml
It seems like the adaptation of the initial Chrome extension will be possible as soon as Microsoft has implemented a "Chrome-Extension-like" API. So, eventually, It won't be necessary to develop something completely new.
The Native APIs are supported in Windows 10 Insider Preview Build 15002.
Native messaging in Microsoft Edge.