HTML5 Android Development - javascript

I am interesting in making an android application, while my primary hobbies is web development. Now the thing that is confusing me is that people make applications in HTML5/CSS3/JavaScript languages, are those apps running on web browsers on android mobile or running like an installed application on android?

Well you can design and develop your app in 3 ways
Native: full Java code in Android case, or Objective-C or Swift now in iOS
Web: HTML5, CSS3, JavaScript
Hybrid: a mixture of the two
If you are a web developer you can design your app in HTML5 and then use a wrapper like PhoneGap or Apache Cordova which will simply wrap or package your app in a WebView (a Webview is like a simple browser inside a native app).
Then you will have your APK like any other app in Google Play, so yes it's a full application that can be installed, updated and deleted of course, in any Android device
But there is a difference between the two, like the speed varies depending on the app type:
previously, web apps couldn't gain access to the accelerometer, camera, gyroscope etc, but now with the bunch of APIs available, you do have the ability to access them in very simple ways.
A full definition of a webView
The WebView class is an extension of Android's View class that allows
you to display web pages as a part of your activity layout. It does
not include any features of a fully developed web browser, such as
navigation controls or an address bar. All that WebView does, by
default, is show a web page.
More info about WebView Here

Yes they can be opened in web browsers. Those mobile application that is written in HTML5 are really web applications that have Mobile user interface. You can create and experience these projects using Visual Studio 2012. Go to new project -> Web -> ASP.Net MVC 4 Web Application -> in "select a template" choose Mobile Application

Related

Can I publish a Cordova app for browser

I'm on a project cross-platform where the client wants a website, an iOS application and an android app. I chose cordova to realise it.
But I have one question, can I host my application like a classic website on a distant server ?
Maxime
While you might be able to reuse parts of your HTML, CSS and JavaScript for the website, Cordova apps run on physical devices like phones and tables and interact
(access device capabilities) with the underlining operating system like Android and iOS.
When you have an existing server-based web app, and you want it running in a Cordova app, you'll have to migrate it. Depending on what your application does you could use a thin Cordova client (think of it as a web browser embedded in a native app) that automatically redirects to your web site.
Link to officially supported platforms.
https://cordova.apache.org/docs/en/latest/guide/support/index.html
EDIT: the following is only for testing, not production
Cordova supports the browser platform.
By running cordova platform add browser you add it to your project and with cordova run browser you run your app in a browser. To run it in a specific port, you need to run cordova run browser -- --port=1234.
You can add, build and run the iOS and Android platforms in the same project.
Take a look here https://www.raymondcamden.com/2016/03/22/the-cordova-browser-platform/

How to run a java applet on windows 8 mobile application using Phonegap / WinJs / C#

I am developing one windows application for mobile and tablet devices.
I want to run one applet in the background or on web view and need to read some data from card reader (no other options or SDK available for this custom reader to read the data).
Using Applet, it's reading data and working fine but I want to run this applet in the background without moving the focus from my application or in a web view.
am using Cordova, WinJS for development. and its only for windows 8+ devices.
I have tried using in-app browser and applet is not running on the in-app browser.
Not possible, windows phone doesn't have a java virtual machine, so it's absolutely impossible to run java applets.

Database for 2 android apps (one Java, the other Javascript)

I'm currently developing an app (via Intel XDK) that reads a .csv file that was created by another app (via Android Studio). The Android Studio app is mainly for capturing sensor data, whereas the Intel XDK app should display the data fancily. Since saving everything as .csv and reading it all later on is incredibly naive performance and storage-wise, I was thinking about creating a database that manages the data. Now, setting up a database for each app seems easy enough, and there are also solutions for two Android Studio apps. But how can I create and manage a database that can be used by an Android Studio as well as by an Intel XDK app?
OK, I think you want to have your Native Android Database to be accessible from another Application so your solution will be ContentProviders.
You should build a ContentProvider layer above your SQLite database in the native android application then you can easily contact the ContentProvider from any other application included PhoneGap or any cross platform one.
To learn more about ContentProviders in android check that.
To learn how to expose or use ContentProvider from CrossPlatform phonegapp applications check that.
You can use the Content Provider mechanism of Android, as described in http://developer.android.com/guide/topics/providers/content-providers.html.
You decide on one of the two apps to actually manage the database and play the role of content provider to the other. The other accesses the data via the interface provided by the content provider.
This works if both apps are on the same device. For cross-device synchronization of data look at Couchbase Lite, a database that offers this feature out-of-the-box.

What's the difference between Cordova and Windows 10 Javascript Apps?

In Visual Studio 2015 I go:
New Project -> Under Javascript/Windows -> Blank App (Universal Windows)
It then creates a new app that has an .html file, a .js, .css, etc.
I then can access system level things via an object that's exposed to javascript.
Now in order of Microsoft to have implemented this I'm guessing my app is hosted within a webview of some sort.
Now let's take Cordova (or Phonegap), I create a windows cordova app and this is a windows app that has a hosted WebView within it. (or does it? atleast that's what it does in iOS and Android).
So isn't this redundant? If my app itself can be a WebView (by making a javascript windows 10 app). Why would I want to host ANOTHER webview like cordova?
Or maybe I'm not understanding something..
Windows 10 Javascript Apps (Also known as WinJS) is a way of building native Windows apps with web based technologies. WinJS provides libraries that provide direct access to the device, underlying OS and framework.
Cordova apps are also built with web based technologies and run inside an embedded web view. Cordova provides a set of libraries for accessing details on the device but these go through another layer that is specific to the OS. While WinJS is only for Windows apps, Cordova apps can, for the most part, be easily rebuilt to run on different platforms.

GoogleTV publishing web applications

I think for the web application (HTML/CSS/Js) to be published on Google Play for Google TV 2.0 platform the only way is to use the Java WebView wrapper (or more mature solutions like PhoneGap) – is that correct?
Are there any other ways to publish directly the web applications or are any plans like those known?
There is no current way for a web app to be published to Google Play. YOu can wrap your app in a webView like PhoneGap does, or you can create a simple launcher that opens Chrome. Both of those are unlikely to be featured, however.

Categories

Resources