Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] javascript – How do you deploy React (non-Native) app to Android?

Posted on November 11, 2022 By

Solution 1 :

Forgot about this question. As the OP in 2021, I resolved this by using Capacitor – A Javascript library that converts your app to Android and iOS builds.

Install Capacitor: npm install @capacitor/core @capacitor/cli

Initialize it: npx cap init

Add Android and (optionally) iOS support: npx cap add android npx cap add ios

Create an Android app: npx cap sync

Open Android Studio with your new app (to build a .APK): npx cap open android

Optional: Open Xcode to build an iOS app: npx cap open ios


Source: https://capacitorjs.com/docs/getting-started

Problem :

I’ve created a React app that looks great on mobile, but rather than a user just visiting my website URL I also want them to be able to install it as an apk through the playstore.

Is there any trivial way to port it to Android, that would allow me to continue to develop just one version of the app? I looked into porting it to react-native, but much of it would need to be recoded. I also considered just opening the app URL in a browser popup, but I’m wondering if there’s a better way.

Thanks –

Edit: Based on Michael’s comment, I’m trying out turning my app into PWA compliant, then using Capacitor to deploy on Android & iOS. I’ll see how this goes and write my own answer if this works out (and no one else answers =o)

Comments

Comment posted by blog.logrocket.com/from-create-react-app-to-pwa

You’re wanting to build what is called a PWA / progressive web app. There are many blog posts detailing this for react such as

READ  [FIXED] The countdown timer is not reaching 0 Android Firebase
Powered by Inline Related Posts
Android Tags:android, javascript, reactjs

Post navigation

Previous Post: [FIXED] java – How to handle large amount of animated vector drawables?
Next Post: [FIXED] c# – Call a self hosted web api from an Android app through a DDNS

Related Posts

[FIXED] android – How to hide apps on google play store as a devoloper Android
[FIXED] Android Mapbox Mapview shows white screen before rendering maps Android
[FIXED] android – Camera2: Should createCaptureRequest() be called on a background thread Android
[FIXED] android – Application.onCreate() not called in debug build Android
[FIXED] linux – Unhandled error message while accessing android phone Ubuntu 19.10 Android
[FIXED] java – how to set opacity on a button with a transparent background color programmatically Android

Archives

  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • Can Vicks humidifier be used without filter?
  • What color is Spanish green?
  • How old is Jamie in The War That Saved My Life?
  • When should I use scalp massager for hair growth?
  • Can I put polyurethane over liming wax?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme