8

I have a pwa and with localhost I can install on desktop, but I can't with my samrtphone andorid. Is it possible install a pwa without upload in a http server?

UPDATE: I founded a work around that works, I putted a server on a port on my android smartphone using Dory - node.js (I have installed also express package)

https://play.google.com/store/apps/details?id=io.tempage.dorynode

Opening chrome in that port I see the "add to home screen popup".

4
  • 2
    I would recommend checking out ngrok. Commented Nov 11, 2018 at 4:29
  • make sure to meet the criteria for a chrome browser Commented Nov 13, 2018 at 13:49
  • This is my manifest { "name": "PWATEST", "short_name": "pwatest", "icons": [{ some icons .... } ], "start_url": "/index.html", "display": "standalone", "background_color": "#3E4EB8", "theme_color": "#2F3BA2" } Commented Nov 14, 2018 at 19:22
  • Hi, can you or someone else add more information about what you meant by "I putted a server on a port on my android smartphone using Dory - node.js (I have installed also express package)"? I installed that app on the device but am unclear what to do after installing it and it really doesn't hold your hand at all. Commented Oct 16, 2024 at 17:47

2 Answers 2

6

It is possible with connecting the mobile phone via USB debugging and enable port forwarding in Google Chrome.

  • Run the dev server on i.e. http://localhost:3000
  • configure port forwarding in Google Chrome for port 3000 and ensure port forwarding is active
  • connect you phone via USB and enable debugging
  • on the mobile open a browser and browse to http://localhost:3000
Sign up to request clarification or add additional context in comments.

Comments

4

This is unfortunately not an entire solution but an advice on where to look:

  1. Make sure you are in the same wifi network with your Desktop and your phone.
  2. Find out the local IP address of the Desktop PC (probably something like 192.168.0.x). You can find it under ipconfig (Windows) or ifconfig (Unix)
  3. Host your PWA with the http server (remember to use ssl)
  4. Try to access your hosted website from the phones browser, using the IP address and the port, probably something like 192.168.0.x:8080
  5. If you serve your web page through another port (ex. 3000) make sure you configure Port Forwarding through your Router default config IP address

You should be able to open the website. So far I was not able to call the install event, but I will update my answer if I find out more.

1 Comment

On requesting 192.168.0.x:port, well pwa requires https or localhost, however will still work with 127.0.0.1:port. But on other ips without "cert" https will not work. Thats the issue (without solution)(its a feature 😆)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.