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.
Related
I am sorry if this is not the correct place to ask these questions but I cannot find the answer anywhere. I have built/building an app that basically displays a leaflet map and tracks users in real time with node and socket.io It has various functions but everything is contained either on or over the map. What I need to know is.
Will this run properly in a WebView app?
Can it run when the app is on but in the background (This has to run to keep the connection open and update location with the watch.position function)?
Can it access the HTML5 location features?
Can I access things like if I want to send a SMS from it via a button on the webapp?
Can I access the camera?
Whats the quickest software to use to develop this and could a similar app be made for iOS?
Sorry if a lot of questions but from what I have read WebView should be good enough as most of the work is back-end and map/browser based anyway. Or should I go down the native route?
I have done a couple of cross platform apps for iOS and Android with Cordova. To answer your questions: In a nutshell, I think you can do most of what you are trying to do with a framework like Cordova.
No.
Not with the webview, but maybe with Cordova (there is a plugin for background services).
Not with the webview, but yes with Cordova.
Not with the webview, but yes with Cordova.
Not with the webview, but yes with Cordova.
I am now a native developer for both iOS and Android. I would probably not do an app cross platform again unless it was really simple. I was always able to make things work in Cordova, but with a lot of hacking involved. Since you are familiar with javascript/html Corodova or Phonegap would probably be fastest in terms of development time for you.
I need help?
Can i make android apps using only html5, javascript and css and from
scratch.
Yes. Build your web application with responsive view features and add a json manifest file to let the android browser add it to the home screen as an app. The next time your users opens your app by clicking on your app icon in the home screen it will work like an app(full screen,no address bar etc.,) . You don't have to even put your app in web store.
But the API's supported are minimal compared to a full fledged native app.
The complete list of supported api's here . You might be surprised to see some api's like the battery api, offline storage so have a look.
Real world example:
visit aliexpress in your mobile browser and add to home screen.
React Native is probably the most popular library for developing Mobile Apps using Javascript. Note that it doesn't exactly use Javascript, but is built on top of the React library.
Alternatively, there's a framework called Electron that uses Javascript,HTML, and CSS to build an application. It is built on top of Node.js. It was primarily made for building Desktop Apps. But you can use their Native Node Modules for building Mobile Applications.
You can find Electron here: https://www.electronjs.org/
The docs for the Native Node module for Electron: https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules
yes, you can do. please check following:
http://phonegap.com/products/
It will help you.
Lets say I have a RESTful web api as a backend, and a seperate client side react app. Ideally I'd like that react app to run on android/ios mobile devices. What are my options?
The ones I am already aware of:
Create a "shell" app that is basically a WebView/UIWebView that loads the web app. You could go further and add some other functionality like navigation to make the app feel more native. This would be quick to implement but the downside is the app wouldn't feel as nice as a proper native app.
Use Apache Cordova or similar tool (hybrid app). The advantage over WebView is that it has a standard api/set of plugins to access that allow use of device features like camera or geolocation that work across different platforms.
Just create a completely native app. One option would be to use react-native as this would be a similar developer experience to react, but AFAIK this would still involve the creation of a separate app - existing react code could not be re-used (is this correct?). A great user experience could be provided here but the downside would mean slower development time because another app would need to be created.
Does anyone know if there are any options I've not considered here? Also, any comments on getting some kind of code re-use between react and react-native apps would be great.
What I am trying to do might not be quite difficult but I am confusing myself. I am trying to build an app only for Android that will play videos for my company.
As I am not an native Android developer what I did is using html, jquery and phonegap to create and bundle my app as a web view which will help the end user installing the app instead of going to a URL and then open it.
Now here the challenge starts for me, I am looking for touch optimized design which should look like a native app. I can use twitter bootstrap , foundation or any other CSS framework to make my design responsive. I also know how to make ajax based animated page loading which will help me in preventing complete page load.
The real issue: is css the only and right way to design a mobile app? Does apps like Facebook , Youtube also make use of Css to design their native apps?
I do not want to use jquery mobile because I simply don't like their design patterns.
Again, my question might seems to be foolish. What I want to use are industry standard tools to build my app, even if I have to dig into Android tutorials and learn it from scratch.
Any help ,links or guidance will be helpful.
Native apps do typically not use HTML/CSS, and instead use the widgets etc provided by the platform. That's what native means. Facebook recently switched from a web view/HTML5 implementation to native (at least on Android).
I already have working iPhone & Android application. We are planning to add more features/pages and we're also planing to extend the application with PhoneGap to support multiple mobile platform.
How I can utilize PhoneGap with my existing iPhone application? Whether PhoneGap is plugable, is there any other idea otherthan rewriting the entire Application with PhoneGap?
I don't think this is possible. Your best bet is to re-write the application using PhoneGap.
You could use PhoneGap with a webView, in your existing project.
See this link.
I've never personally used phonegap, but couldnt you just add in the phonegap sdk, and just use a webview in any activities/view controllers that you add? That way you can keep all your old ones the same, but add new ones that will be the same for ios and android.
As per my knowledge, what you're asking for is not possible or at least -- not reasonable.
If I'm getting you right, you have written a native mobile applications for iOS (in ObjC) and Android (in Java) whereas Phonegap applications are HTML5-based applications embed in their own container.
These are two completely different worlds with no (useful or profitable) way of mixing them.
You can consider some tricks (with webview, as mentioned in other answers) to include new code, written in Phonegap in your existing native applications. But, there is no chance, you can reuse native code (i.e. current functionality) inside Phonegap.
The only thing, I can think of is, that you can consider proting existing applications as native plugins and using inside Phonegap. But, you will require a lot of work to change existing code to fit plugins' standards and I'm not sure, if rewriting entire application from scratch in Phonegap wouldn't be better solution, as in terms of time and money spent on this process.