Hi @aducom,
Thanks for your answer. It’s true that SC cannot create a PWA application, but my needs are a little different, for a while. See my answer to the previous post:
TIA,
Hi @aducom,
Thanks for your answer. It’s true that SC cannot create a PWA application, but my needs are a little different, for a while. See my answer to the previous post:
TIA,
You can still create a blank app that will do the switching and set it as the initial application when you deploy
$detect = sc_check_mobile();
if ($detect == true) {
sc_redir(‘login_mobi’);
} else {
sc_redir(‘login’);
}
From there you redirect to the right menu.
You can also create a global variable if your app have to be aware of the current display mode.
I don`t really need this code, once the app is responsive in both login and menu, as I showed you in earlier post. I’m not using the login and menu created by SC. But thank you for your help.
I never tried, but perhaps these links are a first step towards your specs?
Yes, thank you. I’ll tell you my results later.
maybe not what you are searching but let me know if it works for you
what i made was:
easyly (cheating, using app inventor) make an android app that stores user and password of the user and the web address of your scriptcase app server www.myserver.com/login.php (the app has and android installer, ca be placed on a app store, and has its own icon on the android mobile screen
then the app opens a webviewer (a web browser without url bar and all the stuff, just the web area, so the user thinks that he is whatching an app) the webview points to your web server address login app
the android app send user and passwords to your scriptcase login app
your scriptcase login app “catches” the user and password and process your login
then your user automaticly in one second gets into your scriptcase apps (just as the user would in a web browser but the user feels he is using an android app"
*** the trick… the android app is made using app inventor it is free and super easy to “learn” (you dont learn so much you can make the app in a single evening or so) with a drag and drop sistem, its free and opensource.
if it works for you let me know maybe i can send you an example
best regards
Hi @ferslash, thanks for your answer. I have worked with App Inventor and it is a good option, however it only works on Android devices and in my case I need my app runs in all platforms (Android, IOS, Windows, etc). That’s why I’m trying to create a PWA application.
deary kleyber:
if you get to make your wpa application please share with the community how you made it
fer
Hi All,
Just coming here to say that now I have my app working as a PWA. Obviously our app in SC is not a totally responsive one, but it gave me good results.
Now I am finish some details about how to install directly on the home screen, but if you add manually to the home screen it will act as a PWA.
Thanks to all for your ideas.
Regards,
kleyber:
i dont want to bother but…
share some code about your solution i think a lot of people will love to see it (at lease i will) :D:D:D:D
It’s possible install a PWA if use chrome navigator in your phone.
I recommended visit:
But keep in mind that SC does not create PWA apps natively. What I had to do was another approach to get what I needed. And it runs on any known browser (chrome, firefox, safari)
In this case:
https://medium.com/@sam20gh/how-to-add-add-to-home-screen-to-your-website-4b07aee02676
¡Hola a todos! Quisiera comentarle a Kley_Derick que recientemente se ha publicado un video de como crear una PWA aquí les dejo el enlace: Scriptcase - Creando PWA para un sistema Scriptcase. sin embargo aunque he seguido todos los pasos no logro integrar todos los requisitos para generar la App, sucede que no identifica mi SERVICE WORKER (adjunto imagen) y supongo es necesario para generar la App, Como Kley_Derick es el que ha logrado crear su PWA quisiera pedir su ayuda para saber que me esta faltando… De antemano gracias.
Theoretically, you can convert any web application into a pwa. It requires that you design your application with mobile in mind, but actually there are a few things you need to arrange. First a manifest file that contains all that is required to build a pwa: the icons, javascript and html (PHP does not run on your mobile obviously). You need an index.html that enables to install the form as an app. You need a scriptcase-less form based upon html / javascript as a ‘starter’ of your application. It is responsible to retrieve your initial app from mobile cache, verify connection with the internet, and then act accordingly. It is less complex then it sounds, but a lot can go wrong. that is why you must test it with lighthouse under chrome. It explains exactly what is missing. There are low-code tools that offer generating a pwa out of the box, but if I understand the demo right, then SC makes use of pwabuilder that can be found on github.
¡Muchas gracias por responder!
Alguna sugerencia de herramientas para generar una PWA listo para usar?
so i watched the video.
@aducom you build this app yourself, great! but what about integration with sc apps? what makes this product different from code you can find on the internet.
i don’t get the price tag. why is there a licence per year, instead of a fixed price
It was an answer to the question of JoeSF in regard to my remark that there are products that can create PWA’s out of the box. I responded to the Portuguese webinar, which I found to be confusing and messy, and tbh, I have the same remark to the English version. But you’re right, it has nothing to do with SC. I don’t understand the license remark btw. But if you have questions regarding that, then please PM me. The code you can find on the internet is way easier to use then the video of SC demonstrates. In addition, if you use a backend like PHP to support your application then you always need an active internet connection. If that fails then you need to have some fall-back scenario. Building a full native PWA requires that you build all in a javascript framework, do all kinds of caching etc. The presented solution(s) have a PWA shell that embeds the application as an app, but cannot fully run stand-alone, but report the issue that internet connection is gone (a simple ‘worker’)
I needed to do the same and managed to figure it out :). This is a complete working solution. To create a very very basic PWA (as per the original requestor asked) in Scripctase follow instructions below.
The resulting application will have the following properties,
Create a json Manifest (manifest.webmanifest)
{
"theme_color": "#f69435",
"background_color": "#ffff00",
"display": "fullscreen",
"scope": "/",
"start_url": "/",
"app_name": "MyApp",
"short_name": "MyApp",
"description": "MyApp",
"icons": [
{
"src": "MyApp192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "MyApp512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
Make sure you change the start_url to your start page.
Create Icons
Create 2 icons with a box dimension with 192×192 and 512×512 pixel dimensions (Myapp512.png and MyApp192.png).
These icons will be used as the application icons that appear on your desktop \ tablet window.
Create an External Library within the Project Space
Create an external project library called PWA and upload,
Add the External Project to your Project
Add Manifest Link to Application
Add the following into onExecute event or other event.
echo '<link rel="manifest" href="'.sc_url_library('prj', 'PWA', 'manifest.webmanifest').'" />';
I’ve tested this solution on (Desktop )Edge, (Desktop) Chrome and Android Chrome and they all install fine.