is it Possible building an Ionic app into existing Native app - android

I have a problem. I need to build an ionic application but it has to be able to build a native app.
The idea is that the Ionic app can be used the kind of standalone. The data with the app needs has to come from the native language. But still, have to feel like it's a mobile app.
So let's say we already have an existing Native mobile app on Android. We just make a new tab there with a Webview. In the Webview, I can run my Ionic app but it still has to communicate with the Android app. Let's say the app needs local storage. Then the Ionic app needs to use the Native local storage from Android. So I have to config the local storage Native. Jet I only want to make the app only once for all the different platforms.
Is this possible? Are they any known ways to make this or any good plugins who can help me doing this?

no, webview not let code to communicate with android native functionality. your code in android webview cant communicate with you app's other functionalities.

Related

How can I put a web site into a mobile native application?

First, I have a web app made with angular + angular material that looks like a mobile app, now I "ported" this webapp to a native mobile app using capacitor + cordova plugins and works fine, all the features work fine.
My deployment proces is:
Build angular app, sync to android, build android and then publish in play store (same for ios), it works, but, every time I make a change to my web app, I have to repeat this process and you know, the user has to download the new version of the app, install, and use, I would like to avoid this.
Since my app is web, located on a site (It can be accesses via web too) I would like to know if there is something that inside my webview opens the url of my site (without exiting the app, I tried making a redirection but it opens a web browser), so, the end user won't have to download the new version of the app every time I make a change and I won't have to upload the build to play store and app store.
I know that it can be done because my bank app does something like this but I don't know how to do it or how to search for it
How can I achieve this?
Thanks and sorry for my english, I hope I have explained what I want to do
"Live updates" are one way to solve this. Live updates allow you to send patches to your app and actually change the app code to some extent without going through app store review. Big updates will still have to go through app store review, but you can make lots of little updates "live" by using a live update service.
You can do live updates with Ionic. Ionic is open-source, but the live updates are part of the Ionic team's Appflow package, which is a paid service. Pricing currently starts at $499/month for 25,000 updates.
In this same space, there's Capgo, which is cheaper and works with Capacitor in general (does not require Ionic).
More info: Long discussion on this topic in the capacitor-community github repo
Ionic is the framework that would fit your use case. You can build apps in angular and ionic wraps it in a webview of native android apps. If you need to access native android feature, you can install capacitor lib too along with ionic. Capacitor is a library to interact with mobile's api (IOS and Android) with javascript.
Anoter approach to build native android apps with JS would be reactnative. It is different from ionic. You would have to be familiar with react sytax to get statrted easily. React native is not a webview app rather it is compiled to native platform code.
Look into flutter too. It uses dart but apps perform faster made with flutter and it can build both for android and IOS with same codebase
CONCLUSION
If you want to stay in angular code, go with IONIC

Can I use react on android? (not react native)

This might be a naive question but I want to know if it's possible to run react on android devices?
I'm new to react - I only know the basics of it. I know that react-native does not use html but native-ish objects as markup.
I just want to create a really simple app which I want to be able to access per browser but also as app.
So yeah. It's kinda hard to google this question beacuse you'll get flooded with react-native answers. Or well - maybe I just haven't tried hard enough.
Yes, although this should not be considered good practice.
You can create an app that shows a WebView where you load your react code from the local file system. See also adding ReactJS in android Webview
Yeah absolutely you can run react on an Android device!
A very common way that mobile apps implement this (outside of React Native), is to have the app open a WebView – which just opens a view of a website (running React).
These apps are slower than native-ly written apps or React Native, because there's an extra layer of translation. They are typically the simplest version of an app – all they do is open the WebView and let a responsive web app take over from there.
There's even a few tools to compile a single set of source code into apps for multiple operating systems (Android and iOS at once).
Cordova and Electron(desktop) are a few popular options.

Have difficulty understanding phonegap android vs webview

I have a problem understanding how phonegap works and i cannot find the answer in docs.
I installed phonegap on windows and phone device and played around with codes in www/* folder.
However, when I use phonegap-build to make my android app it extracted the files from platforms/browser but not the www/*
I know it sounds stupid but should i make different apps for different devices in different folders?, i know this cannot be true. so my question is:
If I make an app inside www/index.html how can I convert them to android .apk app?
Android WebView used to display web pages in native applications. But, Phonegap is a tool which is used to develop hybrid applications using html and javascript. Don't confuse with Android webview and phonegap. Both used for different purpose. You have to use separate folder for each projects.
Converting Your Phonegap App to an Android App w/ PhoneGap
Difference between a native application and a cross-platform mobile application

Use Phonegap for SDK developement

I am developing a native SDK which is integrated into a native app ("host app"). The app is calling my SDK method and this method will open a Webview (both for iOS and Android).
I looked into Phonegap as a solution, and saw that it gives me a platform for opening a Webview and communicating with the device. While this is ok, I cannot find a way to build this as the "SDK app" that I wanted, triggered by host native app, without writing the native code for that myself (duplicating my code for iOS and Android and dealing with native code).
Does Phonegap (or other platforms) have the ability to add a native logic (and not only webview) without the need to duplicate my code?
tnx!
Yaniv
PhoneGap is for developing apps. It is not really for third parties to create a library for others to use. While you can try to twist PhoneGap (and similar solutions) to serve that role, that will add extra baggage for anyone who would want to integrate with your library.
Hence, I suggest that you just create a library, sans PhoneGap.

Xcode iPhone app to Android app using PhoneGap

I already build an iPhone app in Xcode,i came to know that we can open the Xcode app in PhoneGap.
Is it possible to build Android app with some minimal changes from iPhone app code.
Or any other suggestion related to this.
PhoneGap is to create web-based mobile applications. The logic behind is that, you make mobile web page and PhoneGap packs it for Android, iOS etc.
You can not convert Native iOS App to Native Android App.

Categories

Resources