How to open PWA from a button within the web-app? - reactjs

I want to add a button to my React Web App that opens our PWA.
I was able to get the "Install" dialog to open by caching the "beforeinstallprompt" event and triggering it with a button but now I'm looking for a way to open the "Open with" dialog in chrome that allows the user to launch the (already installed) PWA, or open the PWA itself on the click of the button within the app but I'm unable to find any resources.

There is a way to do this, you could do the following:
<a href='https://myappurl.com' target='_blank'>Open PWA</a>
The target='_blank' is important, also the url specified in the href attribute needs to be the same as the one specified in the scope, if the scope is "." then any url within your app will open the PWA, this will work in Android with Chrome browser, I haven't tested this on iPhone.

Related

HTML input type=“file” in iframe breaks the file select dialog in Chrome and Edge

I'm working on a React web app that has an iframe component to embed another web app. The parent app has functions to open or close (unmount) the iframe component. And the parent app uses real-time data subscription and it has the behavior to automatically close the iframe when it got a specific event. So it means that the iframe can be closed anytime.
Now onto the problem, both of the apps have input type="file" to upload file. If the iframe got unmounted while I have a "file select dialog" opened from within the iframe, the dialog would still be displayed unless I click the "cancel" button. But the thing is, after closing the file dialog and click Choose File in another input type="file", the file dialog will never show up again unless I refresh the page.
For more info:
the bug won't happen if I run any of the parent or iframe app in localhost, it only happen on the deployed site
Both of the apps is from same domain but with different pathname (ex. https://hello.com/parent and https://hello.com/iframe)
I'm not sure if this is a Chromium bug because it happens in Google Chrome and MS Edge, but not in Safari and Firefox.

Inject React as a content script AND as a popup in a Chrome extension

I see many tutorials on how to inject a React app as a content script OR as browser action popup for a Chrome extension, but I want to do both: I want to be able to inject certain React components as content scripts, but then also have certain other components render as the popup when you click on the extension icon. Is this even possible?

unable to access chrome://apps or chrome://extension using button click from a react chrome extension

I want to add a button on my react new tab chrome extension and on button click I want to redirect to Chrome://apps or extension page. But it's not working its showing unable to access local resources.

How to disable back button when open browser using InAppbrowser in Ionic3

I am using InAppbrowser component in Ionic3 for the open browser in ionic App. Please suggest me, how to disable hardware android back button when open browser. when I am using custom back handler or this .view.showBackButton(false), it's working perfectly in any ionic page but in not working in the browser.

when click on button or icon i want to open uber mobile application in my mobile using angular js in ionic

I Want to use Uber Ride Requests via click on icon or button in my mobile application which is in ionic-angularJS so if user want he can book his Ride using from my mobile application.
That can be done with a cordova plugin, called StartApp (https://github.com/lampaa/com.lampa.startapp).
You will need to know the schema for both Android and iOS of the app that you want to open.
This link might be useful:
http://www.gajotres.net/how-to-launch-external-application-with-ionic-framework/

Resources