Does Google Chrome ARC support URL Schemes? - url-scheme

Google just released ARC to run Android apps on PCs.
Does ARC support URL Schemes (e.g.; example://pass?var=hello) to launch and pass data from the Chrome browser to an ARC Android app?

No, ARC does not support this type of URI based intent. ARC is limited by what is possible on the Chrome App platform, and this functionality is not exposed to Chrome Apps currently.
The only way to launch your app based on an intent in ARC is to register an intent-filter for a MIME type or file pattern for the ACTION_SEND or ACTION_VIEW intent:

Related

Does Safari itself use WKWebkit?

Apple's App Store Review Guidelines state:
2.5.6 Apps that browse the web must use the appropriate WebKit framework and WebKit Javascript.
Does Safari itself use WKWebkit too? Does Safari have any extra ability than WKWebview?

Progressive Web App: Error Accessing navigator.mediaDevices.getUserMedia?

My app accesses the camera for purposes of webrtc, and works correctly.
I'm using pwacompat from Google Labs to add pwa features to my web app.
When running the app as a pwa, everything works fine until I access the camera. Then I get this console.log error:
getUserMedia failedObject {type: "error", msg: "undefined is not an object (evaluating 'navigat…"}
getUserMedia failed type: error msg: undefined is not an object (evaluating 'navigator.mediaDevices.getUserMedia')
What am I missing?
Update - 19/11/2020
WKWebView can use getUserMedia in iOS 14.3 beta 1.
https://bugs.webkit.org/show_bug.cgi?id=208667
https://bugs.chromium.org/p/chromium/issues/detail?id=752458
Update - 14/09/2019
There are changes to Safari on iOS 13 & Safari 13: https://developer.apple.com/documentation/safari_release_notes/safari_13_release_notes
SFSafariViewController has gained getUserMedia functionality (!!!, however I need to confirm this, please see below for reports of it working)
https://bugs.webkit.org/show_bug.cgi?id=183201
However WKWebView does not seem to gain getUserMedia functionality:
https://bugs.chromium.org/p/chromium/issues/detail?id=752458
https://bugs.webkit.org/show_bug.cgi?id=185448
iOS 13 and Safari 13 release notes:
https://developer.apple.com/documentation/ios_ipados_release_notes/ios_13_release_notes
https://developer.apple.com/documentation/safari_release_notes/safari_13_release_notes
Edit
In short: A PWA or any website being used on iOS outside of the native Safari app will not be allowed access to getUserMedia as Apple is deliberately blocking access for "Security concerns". This includes any websites saved to the homescreen and/or viewed inside another application such as Facebook. The same restrictions apply to Android however on Android the app developer can ask for Camera permissions and get around this. (This means if you are a website developer and you need camera functionality, you will need to ask Facebook, etc, to rebuild their app to allow this on Android).
See their bug tracker here: http://www.openradar.me/33571214 and https://forums.developer.apple.com/thread/88052
From web based Safari experiences to Native Android, etc. I make crossplatform Apps in web and native for a living. There are several potential problems you will encounter with getUserMedia. To workout what is causing potential problems you should follow this list in order to create a successful application.
Your problem is specifically 1. because you are not successfully querying the API. Nevertheless the MediaCapture from getUserMedia should fail because after fixing 1. you will encounter 2. and 3.
API Polyfil - Always make sure you include the latest getUserMedia adapter to stop any cross-platform inconsistencies in the getUserMedia API. Some browsers might use the old getUserMedia API (via 'navigator.getUserMedia) and have not been updated (to use navigator.mediaDevices.getUserMedia). You should also check this link for other needed polyfills.
Support - Check CanIUse for getUserMedia support for your target audience and make sure you have the necessary fallbacks. Your fallback for if (navigator && navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { return true; } else return false; returns false, and if getUserMedia throws and error ideally should be the same.
Permissions - Even though you include pwacompat it does not mean the browser window has the permissions to access the camera. This is because not all browsers are equal! iOS 11 allows getUserMedia access inside of the native Safari app only. However you cannot access getUserMedia on iOS 11 WKWebView or UIWebViews. When you save an app to the homepage it is hosted inside a WKWebView. Thus an experience which works inside of Safari will not work when saved to the homescreen or inside another application. Confusing eh?..! Thus if you want your experience to work you need to tell the user when they open upside another app that they must open the website in safari for real-time camera access. There is no way around this. On Android an app maker can override this permission and allow access to getUserMedia. If you use macOS or Windows you need to make sure the browser shell also has getUserMedia compatibility (e.g. Edge+, Chrome, Firefox, etc)
Security - HTTPS websites can only access the camera (unless on localhost). Check the location prototcol '(location.protocol === 'https:') ? true : false;' to see if you are allowed to get a successful MediaCapture request
The following is a test link I use for platform support:
https://github.com/marcusbelcher/wasm-asm-camera-webgl-test
In my GitHub there are also Android and React-native getUserMedia solutions

Using AWS for android and iphone applications

I'm trying to set up environments for my companies iphone, android, and web applications. Is AWS compatible to use if it is coded in Obj-C and the android app is in javascript but not react?
You can check this link
https://aws.amazon.com/mobile/resources/
For ios sdk on github
https://github.com/aws/aws-sdk-ios
And javascript sdk is
https://aws.amazon.com/documentation/sdk-for-javascript/
Getting started dev guide :
https://docs.aws.amazon.com/aws-mobile/latest/developerguide/getting-started.html
PS:You should always secure credentials for making these

objective-c method to open an app already installed

I've created an iPhone app in objective-c with Xcode 5. It's a simple redirect to an app on AppStore via button (UIbutton and its IBAction). Can I open directly this app if it's already installed on iOS? Because in spite of this app is already available on iPhone it's carry on to open it via AppStore!
If it is your app, or you know it well and it has a custom url scheme, you may use Application::canOpenUrl: (link) to check for its existence and Application::openUrl: to launch the application.
This will not be possible for third party applications that do not have, or of which you don't know a custom url scheme.
you need to use URL schemes, a method for sending and receiving data between applications.
A physical device is required for testing this app.look at this example .sample example
try this example . if you face any issue let me know about that.
Yeah! Problem solved...I had to use only URL Scheme of the App I want to open, and insert inside openurl method, -> https://stackoverflow.com/a/24033837/3706995

Detect Installed Application URI Handler on Webkit browsers

I have a question mainly related to the Iphone web browser but I am hoping the same solution would work on other browsers that are webkit based.
I have a application (Iphone + Android) that registers a handler for custom URI (appuri://) on the Phone. I am able to launch the application by making a link to "appuri://act/launch" from my web pages. This works only if my application is installed on the device. If the device does not have the app installed then a message comes up "Safari was not able to open ....".
What I want to do is detect if the URI Scheme is supported from the browser and then prompt my own message saying "please download the app ..blah blah blah" if the handler for the URI scheme is not found.
Is there a way I can detect or find the list of URL Scheme handlers on the Phone from the Web Browser ?
Protocol handlers are implemented below the browser, and giving foreign code direct access to operating system internals would be a pretty horrible idea, so, not without a plugin.
And since you can't run plugins in Mobile Safari, the answer's probably going to be "no."