Edge/Chrome allows "install website as an app", which allow launch website in separate window as standalone application, with its own icon, be able to pin to taskbar/start menu, basically creating a web app.
Is there a way detect when website is viewed in such "app"?
Why I need this, is because these windows display both title you gave when created the app (which by default is the website's title) and title of the website, more ofthen than not, it will show double title. So, I'd like automatically change title on website when it's viewed in the app.
I've tried research and people suggested use navigator.standalone or matchMedia('(display-mode: standalone)').matches but I think it's for websites opened in a webView of nodejs or such (?), both method return false
Related
I'm making a Web-view moblie application with java and javascript
What I want to do is
when people click the download link, i want to check whether they have my application or not, so
if they have, i want to open the application and if not, open the playstore to download.
I want to know how to make react native handle all clicks/ calls to my website link.
E.g. Any time I click or open my website address, say mysite.com/post/:postId, there should be a pop up that asks if I want to open the link with my app or browser.
I have been able to achieve this with my custom link myapp://myapp/post/:id using Linking api and react-navigation and works perfectly, but I would like to achieve this with a normal website url.
I am building a messaging web application where I want to add a functionality to capture and upload the screenshot of any of the opened windows selected by the user.
Complete Use case: On the web app instead of uploading an image user will click a button (called capture) which will enable the user to take a screen capture of any of the selected window. This is similar to screenshot/screen clipping in outlook or office products. We need this functionality to be embedded in the web app running on the browser.
Example: A user is using my web app and wants to share a painting art s/he made using the paint application, s/he clicks on the 'capture' button and select the paint window which is opened and take a screenshot of that paint window and upload that image in the web app.
Is there any javascript library which can help me perform this action?
It is different from this question (Using HTML5/Canvas/JavaScript to take in-browser screenshots) as I am looking for the screenshot on different window rather than on the browser window.
Thank you.
It is not possible to capture screenshot, or do anything at all, outside of the DOM content in one tab/window.
Refer https://en.wikipedia.org/wiki/Same-origin_policy
A web page can only access its own contents. Not other web pages. Not things outside the window.
If you're looking for some tool to capture screenshots of any window and any web page, it should be a native application of that OS (windows app, android app, etc) and should use the tools/api's provided by that OS. That cannot be integrated directly into a web page.
The closest option is to let the user take a screenshot using whatever tool necessary and upload/paste that image onto your web page.
I am converting a web application to Mobile App where I have selected Ionic as the framework of my choice. In one particular section, the app loads HTML content (user entered) from backend. Since the content at times is very large client is asking for a search feature within the page. Something similar to the browser's search.
I tried to use window.find but that doesn't work within the mobile app.
Is it possible at all to make such feature ?
I'm working on an app built in Titanium that has a few "Tweet about this" buttons. Since I can't use the Javascript part of a Tweet button as described in Twitter API, I just use a plain URL with parameters.
On Android, this causes problems. When users click this link, they get a choice how to open it: always the native browser, and additionally any app that has registered for this kind of link. So if the user has the Twitter app installed, Twitter will be shown as one of the options.
That would be great, except the Twitter app is awful. Most types of suggest-a-tweet URL cause the app to crash, and the few that do work don't pass the status text.
I'm looking for a way to force the URL to be opened by the native browser. (Or way to prevent the Twitter app from being among the options presented to the user, but that seems harder to do)
Is this possible using only the URL itself, or maybe a little Javascript? Since I'm using Titanium, Java won't help me.
I can't give you what you want but give you an alternative suggestion.
What you are trying is hard (often impossible to do without errors) even with native code as your trying to work against the OS. Intents are used in android as a way to let the user decide which program should handle a certain request. If you don't want the user to take this decision I'd suggest opening the url in a embedded browser.