Use custom WebView Engine in ReactNativeWebview - android

I am using react native webview for my app show my website built on React & Vite.
The probl is that some users complain about the app showing a blank screen, after further investigation I found that the user should update 'Android System Webview' app and then every thing works fine.
But the other problem is that I am targeting a zero-tech experience users who might don't event know how to update apps.
So I thought about using custom engine for ReactNativeWebview like mozilla or using my own updated android system webview, maybe ?

Related

PWA - Android, iOS, MacOS, Windows Store, Chrome Add to Home Screen - Problems with multi tenancy app with multi domains

I have couple questions about generating PWA App. Maybe at the first step I explain something about app for better understanding my problems with generating app for multiplatforms.
Multi Tenancy App
I can't say much more about application. This is application where users can create own account. Accounts is separated at servers, eg. app1, app2, app3 etc. Every server has his own domain, eg. app1.example.com etc. Every user can upgrade his account to premium type and define own domain, which can be go on and login to his account without using global domains (here is a problem with PWA app, multi domains). I think it is everything what you need to know, if you need more specific info, give me a feedback, I will try to help you. I need to use WebView because app need access to localStorage.
My problems
Problem is with multi domains. In manifest.json configuration is possible to define one domain, which app will be use to display application and authorize it (with assetlinks.json) to don't display URL Bar (for "Add to Home Screen" - with android app is possible to add wildcard).
I need possibility to use application with multi domains (I achieve it on android - explanation in the following part of post).
Problem is too with adding application from mobile Chrome "Add to Home Screen" and on the desktop "Install app...". After redirect to other URL, URL Bar is shown.
Next problem is to compile Windows Store app from Visual Studio (explanation in the following part of post).
I need more info about compiling app for iOS and MacOS - is this possible to compile and test it without Apple devices? I tried to use pwabuilder.com, but after download MacOS package folder is empty. Maybe virtual machine could help me with that? What you recommend too use to make that application? I tested what I found in google, but it wasn't what I expect.
Installation from Chrome browser
Is possible to change user URL without showing URL Bar? Now after autorization user and redirect him on the properly his premium address url bar is showing - i don't want users to have to go on properly domain and install app from "Add to Home Screen" - they should install it from any domain and use it like Native App.
Android
Partially solved problem with subdomains for every account. It's working properly, but maybe someone has any other authorization solution where I don't need custom subdomain for authorize app.
Windows Store
I installed Visual Studio, make new application with this documentation but I getting error
Error Project must have a reference to an application. Please add a reference under the 'Applications' node in the Solution Explorer.
Here is an issue - Maybe problem is with newest version of Visual Studio? Next question is, even if I compile the App, what with multi domain - URL Bar will be visible when user will be redirected? What if Chrome don't be installed?
iOS and MacOS
Maybe someone has good documentation how to create apps on this platform and where can I test it? What with multi domain? URL Bar will be shown? Is possible to make it invisible like an Android App eg. wildcard or other solution?
My questions
How to create PWA app for iOS and MacOS. Maybe is nice documentation for it.
How to build application for Windows Store. I made app with Microsoft documentation, but it doesn't work - problem was open on GitHub Issue, but without solution.
Is possible to use multi domains and don't show URL Bar for applications installed from mobile Chrome like a "Add to Home" or desktop Chrome "Install app...".
What if Chrome don't be installed on device? Application will be working properly? I know from android 8.1 is possible to remove chrome from android. I don't know if after remove Chrome application will be working?
Thanks everyone for help and your patience, I counting on much help from you.
I'm recently building a PWA with Vue and I'm trying to find a way of making the IOS package out of It. So far I haven't done yet but for Windows, Android & MacOs are pretty easy ... There a lot of blog tutorials for that and if you don't want to go through much of coding then the PWA Builder is the best option for you.
For your 4th question if you want to run a PWA from a browser the browser you have must support standalone desktop apps.
I wanted to try my PWA on iPhone from Chrome and couldn't because that chrome does not have the feature to pin an app to screen so I had to rely on safari only

where is the default browser locted and how do i update that in cordova android application?

What is the default browser used by cordova to load the HTML page?? where is that browser located and how do I update that browser if it is using older version?? Server Sent Events not working in cordova android application.
Does cordova on Android uses chrome or something else?
It uses WebView, which is a part of the Android OS. On older Android versions (before 5.0) it is impossible to update it. On never versions it is updated same way as any other app - using google play.
Starting from Android 6.0 there is a way to choose a WebView service in developer options, but most part of users are unable to do it by default (because it requires turning on developer options).
Starting from Android 7.0 Google Chrome WebView is set as default WebView service, so WebView is updated together with Google Chrome updates.
Unfortunately, some manufacturers (e.g. Meizu) prefer to reinvent a wheel, and embed their own WebView service into their firmware. Sometimes it works not the way it should.

Disappearing mobile navigation menu items on android stock browser

The mobile navigation menu link items disappear or don't show when my website is viewed on a mobile phone. The theme is Tesseract responsive. This only seems to happen in android stock browser and only when google translate plugin is added. There is clearly a clash between the theme and google translate. I've tried to debug it but am getting cross-eyed. I really need the translation plugin to work. Any help would be appreciated. My website is at http://englishteacher.direct
The problem you are having is most likely due to the fact that the android web view is out dated and fragmented. Depending on the version of android and the device itself you will get tons of different problems in the android web view. For example I build hybrid mobile apps. We had to build in a third party web view in order for all of our apps to run the same on different android devices. As of now I am guessing the only way to fix this issue is to alert your users (if they are on a android device) not to use the stock android browser.

alternative for web worker in android-phonegap?

can any one suggest me an alternative for phone gap web workers because i want my application to run successfully from android 2.2 to 4.2.
As i know web workers support for 4.0 and above.
I tried Android Google cloud messaging and that is working perfectly fine.
but i am looking for phone gap options not native android options.
You could try https://crosswalk-project.org, which enables you to use an modern version of a Chromium-based Webview and get rid of the system webview. It's an Intel project, the documentation is complete and concise, and it includes many examples of how to use it along Apache Cordova.
Note Web Workers API is listed as supported: https://crosswalk-project.org (as well as WebRTC, WebGL, or other less unheard-of niceties like Web Notification API, which would free you of using a Cordova plugin for launching system native notifications).
The Chrome team also made a tool for packaging Chrome Apps with Cordova via the Crosswalk Webview: https://github.com/MobileChromeApps/mobile-chrome-apps
Using Crosswalk has some caveats, though. See https://github.com/MobileChromeApps/mobile-chrome-apps/blob/master/docs/Crosswalk.md For me, the more important one is: "An increase of about 17MB in the size of the .apk file". Depending on the app type (mainly if it's not a game), I, as an Android user, won't install such big app.
You could try a combination of inappbrowser and the localStorage/'storage' events.
For example. YOur background processes could run in your index.html which would bind an event handler for 'storage' using window.addEventListener('storage', function callback, true/false)
When the page loads, before hiding the s splash screen, launch another browser instance using window.open directed to ui.html (containing ui thread/html/css ect) be sure to configure the browser to be full screen with all tool/ location bars hidden.
Now in the ui.html javascript when you want to send data to the bg thread you just create it in local persistent storage. Ex localStorage.setItem ('item', data);
Now an event should fire in the original window (bg layer) triggering your callback function which will be passed an event object that contains (amoung other things) the data value that changed.
If youd like more detailed instructions let me know. I got this working in android 2.2+
Use push notification plugin https://build.phonegap.com/plugins/3 that encapsulate Google cloud messagging on Android

Using iFrames in Phonegap And App Crashes

I have created an app with PhoneGap 2.0.0 for Android on Eclipse but when I try run the application either on an emulator or my phone(signed application with no errors) it only shows up the static html pages. When I go to a page where I have used iFrame to load another webpage into it, it simply crashes.
This is the screen I get on the emulator and the same message is displayed on my phone as well(SE Xperia X10)
Screenshot of Emulator with The error :
After showing the message the app crashes instantly. Please let me know if I need to add any other permissions or add other settings or make any changes for this to function because the iFrame functions properly outside Phonegap on browser(including phone/desktop browsers)
At least some versions of PhoneGap use an iframe to communicate with the native layer.
I'm most familiar with the iOS version, where there are definite bugs in the browser's support of iframes ( https://issues.apache.org/jira/browse/CB-593 ). I don't know if there is a similar system level issue on android, but there could easily be some part of your code that doesn't expect that second iframe to be there.

Categories

Resources