detect all installed apps from Safari - javascript

I'm trying to detect all installed apps on an iPhone from Safari.I have a list of 3000 URls scheme.From a WebView and using javascript, I want to loop this list and save the excitant apps (URls scheme that have a response) .Is that possible?

Simply not possible, as #rckoenes said, it would launch each app you call - therefore halting your browser instance - and looping through that many URIs even if it did return a value rather than launching the app would probably make you no friends. there are ways and means of detecting if YOUR app or AN app is present and launching it via smart meta banners or look at this project: https://github.com/hampusohlsson/browser-deeplink

Related

Detecting WebView2 vs standalone Edge browser?

I have a page that needs to render differently depending on whether it's being viewed from a WebView2 component (inside another application) or from a standalone Microsoft Edge browser. I tried distinguishing the two via the user agent string, but the strings are more or less identical (both contain "Edg"). Does anyone have a method to distinguish between a WebView2 and an Edge browser?
There's no perfect way for web content to identify that is running within a WebView2 because the host app of the WebView2 can customize so many aspects of the WebView2.
For example, the host app can change the user agent via CoreWebView2Settings.UserAgent to appear to be Chrome or any other browser. Or the host app can inject script using CoreWebView2.AddScriptToExecuteOnDocumentCreatedAsync and change the DOM or other objects in script.
However, if you are trying to determine if your web content is running within your own app, you can use those same customizations I mention above as a way for the host app to signal to the web content that the web content is running within a WebView2.

How enable google chrome browser to run local commands in Windows?

I am using a web development tool called Oracle APEX 21.1 to create an app which will run on the web for some users and as desktop app for other users. The application runs in a browser in both cases. My problem is with the users that will use it as a desktop app. Sometimes I need to run a local file or run a specific program from the computer the user uses to run the app. The user is instructed to use google chrome to use the app. My question is, is there a setting of google chrome that I can set to allow my app to access local files or run Windows commands? Is there any other way i.e an add-on? If not, is there any other browser that can do the job? P.S: In my app, I can make use of JavaScript, JQuery, Oracle PL/SQL. Of course, a browser simple setting to set is the best option for me, if any.
in browser you you have to do use "href" string like this :
window.location = "notes:///server/file";
"notes:///" program name
And "server/file" parameter for programe

Is it possible to build a standalone HTML5 App *without* bundling a browser?

Solutions such as Electron require bundling an entire browser with the resulting .app build, which causes it to have several gigabytes even for a single hello world app. Most users already have Chrome installed on their computers, though. Is it possible to create a standalone .app application which uses the existing browser to open itself, hiding the frames / URL bar of the browser, and has access to system resources (fs, child processes, etc.)?
Edit: I'm thinking something on the lines of "bundle node.js + an HTML into a .app which opens an existing browser (pointing to that HTML) without the URL bar". Node.js can then access the filesystem and communicate with the App via HTTP, WS, etc. The only real problem here is opening Chrome without the URL bar, I guess.
I saw nodekit which is an attempt to use the JavaScript engine already available on each platform.
So for example on Mac it'll probably use WKWebView and on Windows 10 it'll run on the JavaScript Universal apps platform.
For most though, only having to test on electron makes developing apps much simpler and you can have a fully functional app in an installer under 40MB.

Launching another iOS app from the current app with JavaScript

How to Launch an iOS native app from the current native app
In Objective C I can write like
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"SomeApp"]]
How can I achieve the same in JavaScript?
var window = UIATarget.localTarget().frontMostApp().mainWindow();
Above code uses UIATarget,Is it possible to access the UI elements of the new app as it was launched from another app. I think it might not be possible,but I would like to use it for testing and I don't want to use Jail breaking.
If that can be done in JavaScript, Could somebody provide pointers on this ?
In Android, using some frameworks we can access the UI elements of any Application.
Is it feasible in iOS ?
URL Schemes are the only way to communicate between apps.
Communicating Between Apps
When using Instruments/cmd line UI testing (Tune_up.js) you cannot communicate with apps outside of the target testing app. When your app leaves the foreground you won't be able to get it back except for one case.
UIATarget.deactivateAppForDuration();
This will behave as though the user has hit the home button, and after the duration goes to the multi-tasking board and brings your app back to the foreground.

web app on mobiles with phonegap

I have a web application (chat room) in html + javascript that basically sends requests to the server every 5 seconds to check for new messages.
It already works on mobile but there are 2 main problems:
it does not beep (it works on pc) with new messages
when the browser is put on background, the javascript obviously stops being executed, therefore the connection to the server is lost and the client disconnected.
i was thinking of using phonegap not only to make it cross-platform but also to fix those problems stated above. would they be resolved with the use of phonegap?
thank you in advance.
phoneGap doesn't support custom push notification. it basically open a browser and expose you some native support via API.
in order to do some native actions like push notifications and/or sound playing i suggest you check out some of the plugins options available or even write your own for that.
Playing sounds can be done easily using the Media API. As for having the JavaScript run in the background it really depends on the OS. On Android the JS will continue to run if you leave the app via the home button but the back button kills the app so you would stop the JS. It is probably better to write a service that always runs in that case.
Alternatively you'd look at a push type solution to notify you of new messages.

Categories