How to create a browser instance (pupeeteer) with firebase and use it in my app (node.js)? - node.js

I created a firebase project. This communicates with a mobile application (node.js). As part of this project I want to use pupeeteer.
I have no problem launching functions using pupeeteer in firebase.
The problem is that I want to make the user perform actions. So I have to display the web page (pupeeteer) in the application via a browser generated by the server (with a firebase function?)?
However I have no idea how to launch a browser instance in the background and close it at the end of processing?
Can you help me ? Is this the right solution?
I want to use this :
This library does 2 things:
Download the chromium binaries and launch a Chromium process.
Connect to this process with Websocket and send json commands to control the browser.
Due to limitations on mobile platforms (iOS and Android), it is not possible to launch an external Chromium process on iOS and Android. So, step 1) does not work on mobile.
You can still use puppeteer-dart on Flutter either with:
Flutter on Desktop (macOS, windows, Linux)
Flutter on mobile BUT with the actual Chrome instance running on a server and accessed from the mobile app using puppeteer.connect
The pub.dev website reports that this library works with Android and iOS. The supported platform list is detected automatically and can't be manually modified to express the current limitations

Related

How to listen playback/audio state change in UWP app

I am developing on a UWP app which need to listen playback/audio state change. such as: can know when other app start/stop to play a audio.
On Windows, I see there is an API "Windows.Media.Audio.AudioStateMonitor", but it only listen sound level change of app's own audio play.
https://learn.microsoft.com/en-us/uwp/api/windows.media.audio.audiostatemonitor?view=winrt-22621
On Android, there is an API that fully meet my requirement. AudioManager#registerAudioPlaybackCallback()
I want to query, is there any API on Windows that can listen playback/audio state change of whole Windows system. Like Android's AudioManager#registerAudioPlaybackCallback()
UWP runs in a sandbox and has no permission to access other app. UWP does not have related API support for this.
It is possible to use the Windows Core Audio API
IAudioMeterInformation::GetPeakValue to query whether the sound is playing.
Since UWP cannot directly use Win32 API, you need to write a project that uses Win32 API first, then package this project with the UWP project and realize the communication between the two project.
You can use IAudioMeterInformation this code in WPF, then use Windows Application Packaging Project to package WPF and UWP project. You can refer to this blog: UWP with Desktop Extension.

How to convert a Yii2 local website to a desktop executable?

I currently have a local basic Yii2 website with an external database on XAMPP. Is there a way I could convert this application to a native desktop application that can run on Windows and the Linux OS?
I wish to build the desktop app myself and not use automatic builders like Web2Desk
It'll come as an .exe file which can be run to install the app. The app would not need any 3rd-party software (for the database for example). I'm thinking kind of like the Slack desktop application.
Can you please help?

How to make a Web App that works with beacons?

I know you can work with beacons with a iOS app or Android app.
But you can work with a web app to?
(A website recognize a beacon and do something)
Unfortunately, the general answer is no. You need native components to detect Bluetooth beacons on both Android and iOS. The web browsers on both operating systems have no hooks to detect beacons via JavaScript or HTML.
Chrome OS does have Bluetooth bindings in its Chrome browser, which may allow you to build a web app on Chrome OS that does this. But this would really be a Chrome App not a general purpose web app.
The Chrome browser for iOS and Android also detects Eddystone-URL beacons, but it will not pass the detection info to a web app. Detections are sent to the user as a notification and tapping on that notification simply brings up a configured URL in the Chrome web browser. This does not allow any dynamic web app behavior based on beacon detections.

Autorun desktop app and check if it is running from a Windows 8 App

I´m developing a Windows 8 App, and it needs a desktop app running on background to work properly.
So i have two questions:
1.- The OS is a Windows 8.1 Industry Embedded. I need to autorun the desktop app and my Windows 8 app at startup.
Here explains how to do so with a Windows 8 App, but not with a desktop app, so i´m using this other solution to add the application to the Windows Startup folder, but i´m not sure if this is the best way.
2.- Then, when my app starts, i should check if the other app is running or not to work in one way or another. How can i check that? I´m developing with HTML and Javascript.
Thanks!
Yes that is the 'proper' solution to starting a desktop app on startup. Otherwise you can look at creating a windows service that manages the app lifecycle.
By design, winRT apps are not supposed to talk to desktop applications, but if you are sideloading the winRT app (i.e., not through the Windows Store), you could run a local server with your desktop app, and then enable local loopback with localhost in your winRT app and communicate that way.

Is it possible to run an Appcelerator Titanium applicatin in web browser like Flex?

Is it possible to share code between mobile and web versions of an application created with Appcelerator Titanium? I want to create a mobile application but I also want my users accessing the app using desktop Internet browser, like Flex application can be run in Flash Player or AIR. Is it possible to share code between mobile and web versions of the app?
Thanks,
Michal
There is a beta or pre release version of a web sdk that will support that functionality. Will try and track down the link, certain it can be found on the Appcelerator developer blog

Resources