How to ask for forcefully update android app in webview - android

I have develop android app with webview which convert my website into android app. After launch there are some improvements in app. so I have done those improvements and again release with new version. Now i want my customers to update app forcefully. But app is develop fully in webview. So how can i do that?
Do I need to do code level changes in my website?
Do I need to create API to check app version and then ask for force update?
Is there any native code for this? if any let me know.

This is what you can do:
1. In you android code, add a HTML Element in the webview
programmatically and set the app version.
2.When you load the webapp on the server side, check for this element
3. If the element is set, then the webrequest is coming from the app
4. Then Check the version and show them a message if the version is not upto date.

Related

Use custom WebView Engine in ReactNativeWebview

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 ?

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

Checking if this is Android or web app version?

I used AppsGeyser to create the Android version of my web app.
I'd like the web app to show an Android button linking to the app on Googleplay, but not show it on the web-app version.
I'm unsure how to do this, since Appsgeyer needs to use my web app to build the Android app.
Is there HTML or other code I can use to check if this is the Android or web app, and display accordingly?
Thanks for your time and help.
Check UserAgent in javascript. Here's a solution of how to detect mobile browsers.
It can be shortened to something like
if (navigator.userAgent.match(/Android/i)) {
showButton();
}

Click Button on Web Page programmatically/Get Element Tag Name using Android Browser

Let me start by saying StackOverflow has been a great tool for me as I learn Android development.
What I am trying to figure out is how to click on the ‘OK’ button when I am using the default Android web browser and the following message appears: (Sorry, I can’t post pics yet)
“You are using an unsupported version of Mozilla.
Please upgrade your browser to the latest version before logging in.”
I can’t use Chrome Debug because the “unsupported version” message doesn’t appear when I use the new version of Chrome. I don’t want the users of my app to have to download Chrome to be able to use my app.
I know I can use “document.getElementsByTagName('OK Button Element Tag Name').click();” but how would I find the Element Tag Name without the use of Chrome Debug?
Thanks in advance,
Ken

loading html file from web server using phone gap

i am planning to develop an hybrid application using phone gap. i want to download html pages,images & other resources from a web server instead of keeping it inside the phone gap application bundle.
is it possible to do so
is it the right way to avoid updating the application in the App Store frequently or
will android, iPhone, windows reject our application
Yes it is possible with phonegap, nothing can prevent you from loading html file from remote source. Here's my other answer on this question: https://stackoverflow.com/a/13996437/1848600
Unfortunately no. While we can say this is true, every error will brake every available app version, while if you create version by version customers will always be able to use previous ones. Also Apple apps store will ban such app.
Android/Win7-8 app will not be rejected, iOS will be rejected immediately. Here's my other answer on this question: https://stackoverflow.com/a/14436328/1848600, no point in repeating.
Yes, it's possible.
you have 2 choices to implement it. simple way is just start on web server url. but, you need a code for including cordova script file that matched target device.
another way is check & download files.
In this case, you need to write some code of phonegap for update-check, download contents & change start URL.
During you have no reason for changing native code, my answer is Yes.
exactly Apple doesn't allow to update app logic without AppStore or load page in web server, but i don't know really it is.

Categories

Resources