Deep linking from Web to PWA (Standalone Version) - progressive-web-apps

I have a web app that it can be installed as standalone application in the homescreen thanks to PWA standard.
When a user forget his password, a email is sent to him with a link to reset the password.
Can I deep-link to the already-installed standalone version instead of the web application in chrome browser? I'd like to achieve this behaviour:
User clicks in email link from gmail application.
OS check if link matches with any url schema pre-registered in the system (This is the step that I don't really know if it's possible from web right now)
If found, open the standalone version. Otherwise, open the browser.

There is an example of describing intent filters in json here. The relevant section of the manifest is intent_filters
{
"manifest_package": "org.chromium.webapk.test",
"scope_url": "https://pwa.rocks/",
"intent_filters": {
"scope_url_scheme": "https",
"scope_url_host": "pwa.rocks",
"scope_url_path": "/"
},
"start_url": "https://pwa.rocks/",
"display_mode": "standalone",
"orientation": "portrait",
"theme_color": "2147483648L",
"background_color": "2147483648L",
"icon_urls_and_icon_murmur2_hashes": "http://www.pwa.rocks/icon1.png 0 http://www.pwa.rocks/icon2.png 0",
"web_manifest_url": "https://pwa.rocks/pwa.webmanifest",
"version_code": "1",
"version_name": "1.0",
"bound_webapk": {
"runtime_host": "org.chromium.chrome",
"runtime_host_application_name": "Chromium"
}
}

If you set your scope properly in the manifest.json file, all links in other applications will open in the standalone version instead of the browser. Note that links in the browser will still prefer the browser version instead of the standalone. For example:
"start_url": "/",
"scope": "/",
"display": "standalone"
Note: Navigating directly to https://example.com/app/ from the address
bar will work exactly as the same as it does for native apps that have
an intent filter. Chrome assumes the user intended to visit the site
and will open this site.
Source: developers.google.com/web/fundamentals/integration/webapks

Configure the Android Intent Filters in Web App Manifest as shown here

Related

upload .well-known/assetlinks.json to Firebase Hosting on Mac

I am setting up a Firebase Dynamic Links using App Links for a website that is also hosted in Firebase Hosting. I need to upload a .well-known/assetlinks.json to my Firebase Hosting website.
I am working on Mac, and if I try to create the .well-known folder on my Mac's drive it says:
This makes it for me impossible to create, and then of course also upload the assetlinks.json (using the Firebase CLI which is the only tool that allows you to publish files to Firebase Hosting).
How can I install the required .well-known/assetlinks.json on my Firebase Hosting?
I found the following work-around:
(1) Create a well-known/assetlinks.json locally => notice its without the . at the beginning which made it impossible on my Mac to create this folder originally
(2) Update the firebase.json file to add a rewrite rule :
"rewrites": [
...
{
"source": "/.well-known/assetlinks.json",
"destination": "/well-known/assetlinks.json"
},
...
],
(3) Publish to firebase hosting
Its not an ideal solution, but it works...

Add Custom SAPUI5 Library to SAP Cloud Platform Fiori Launchpad (Portal Service)

I've created a custom SAPUI5 library with the SAP Web IDE and deployed the library to the SAP Cloud Platform. The library is used by multiple SAPUI5 applications and works perfect when the apps are launched from the SAP Web IDE. The dependency to the library is defined in the manifest.json of each application:
"dependencies": {"libs": {"custom.library"}: {}}}
Furthermore I've already added the correct path to the file neo-app.json.
Now I've registered the SAPUI5 applications to the SAP Cloud Platform Fiori Launchpad. I can start the Launchpad and see the tiles for the apps. But when I start an app the following error occurs:
Error: failed to load 'custom/library/library.js' from https://sapui5.hana.ondemand.com/1.52.17/resources/custom/library/library.js: 404
How can I register the custom UI5 library to the Fiori Launchpad?
On SAP Community, you’ll find this blog about the SAPUI5 Custom control library.
There it says that you need to add an entry into “routes” array of neo-app.json file for your newly deployed library.
The entry shall look like this:
{
"path": "/webapp/resources/my/custom/control",
"target": {
"type": "application",
"name": "mycustomlib",
"entryPath": "/"
},
"description": "Custom control library"
}
Here, “path” is the path you use in the dependency definition of your controller JS file.
“name” in “target” clause contains the name under which you deployed the library into SAP Cloud Platform.
As SAP Fiori Crew pointed out, you need to create a route entry in neo-app.json for the SAP Cloud Platform router to know where to serve your library files from when requested by the applications.
A good way to find out the exact URL that needs to be added is checking the Network requests in your browser's Developer Tools, when trying to load the application in the Launchpad:
In the example above, adding this entry to neo-app.json solved the problem:
{
"path": "/sap/ui5/1/resources/vplanner/common",
"target": {
"type": "application",
"name": "vpfioricommon"
},
"description": "Common Library"
}

Sap ui5 and xsjs

I have created an SAP UI5 app in Web IDE and also a XSJS app using HANA web based tools. But I am unable to call the xsjs service directly from my Web IDE application using ajax call giving the full URL.
If anyone can give an idea it would be great.
First, you need to create a HTTP destination that includes the xsjs URL and the information of authorized database user from SAP Cloud Platform Connectivity section. Then you'll add that destination to your neo-app.json file like below, to be able to call it using "/customPathToUse". It's done.
{
"path": "/customPathToUse",
"target": {
"type": "destination",
"name": "NameOfTheDestination"
},
"description": "XS Destination"
}

OpenUI5: offline documentation in SDK not working?

When I download "Latest stable release: 1.28.16 (2015-08-18)" from here the documentation is not working. By clicking on \openui5-sdk-1.28.16\index.html the page opens up with empty content.
With older versions I also had non working offline documentation, the navigation page was showing, but the "details pane" was empty.
Is it only with me (using windows 8.1 and chrome Version 44.0.2403.157 m) or is this something general?
It is related to the browser security when index.html loads its resources (Same-Origin Policy)
So you have two options:
deploy the content on a (local) web server (as already pointed in the readme.txt) and open the index.html via http (for instance http://localhost:/openui5-sdk-1.28.16/index.html>)
run your browser with disabled web security and directly open the index.html

Facebook connect

I have an asp.net site and I use log in to facebook calling
http://www.facebook.com/login.php?api_key=API_KEY&connect_display=popup&v=1.0&next=http://localhost/site/login.aspx&cancel_url=http://www.facebook.com/connect/login_failure.html&fbconnect=true&return_session=true&skipcookie=true
Logs in very well, returns to my site, I see session parameter in url, but I can't catch any postback or something.
Could you help me, please?
Thank you
A couple of things to check:
Make sure that http://localhost/site (or whatever the url for the root of your app is) is set in your application's connect settings
If you're using the Visual Studio development studio development web server (Cassini), your app's url will include a port (for example, http://localhost:34256/site). This url (including the port) will need to be specified in your connect url in your application's settings on Facebook.