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.
Related
I am creating a React JS PWA web app, so that the users can install it on their mobile devices. Now the client ask to find out a way to push these PWA apps to amazon app store. So my query is whether we have tools for converting the Progressive Web Apps as APK or HTML5 Web app files so that we can put them to amazon app store.
I googled a bit and I am confused, but I am not sure which one is the right one to use and whether we can publish a PWA app to the amazon app store
Any help on this will be very grateful.
Thanks.
PWA needs a browser to be executed. So if you want yo package your pwa as apk(android) you will need to implement a kind of mini-browser with pure android.
Fortunately, this task is very common and there are even online services to do that:
https://appmaker.xyz/pwa-to-apk/
https://pwatoapp.com/
Or if you know java:
https://github.com/xtools-at/Android-PWA-Wrapper
Or c++
https://github.com/RikudouSage/PwaToTwa
Or nodejs
https://github.com/pwa-builder/CloudAPK
You can use the Amazon Web App Tester to verify how your Web app behaves when Published to the Amazon App Store: https://developer.amazon.com/docs/fire-tablets/webapp-app-tester.html
If it performs correctly in the tester, you can then publish the URL directly or upload your files. The full process is described here: https://developer.amazon.com/docs/app-submission/publish-app-webapp-files.html
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.
So this maybe a silly question, but i guess I'm missing something.
I host my meteor app in modulus.com.
The goal is to have a single code-base for all devices and the web, fetching from the same database.
So everything happens in the web is immediately synced with the mobile app or vice versa.
Should i provide different builds (different modulus projects [web, ios, android]) all connected to the same db to make it all work as one application?
A single build will do?
How will this work?
thanks
Yes, you can use the --server option to specify which Meteor server your built mobile app should point to. This way, you have one Meteor backend running the web app, Android app, and iOS app. This should work just fine with Modulus.
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
I'm familiar with SQLite from having worked with it using the System.Data.SQLite provider for .NET and also Adobe AIR using ActionScript. I've been asked to investigate what is involved in creating offline data-driven apps for mobile devices (iPhone+iPad and Android for now, maybe Blackberry). The database would have to be available locally on the device because users would often be in rural areas with very unreliable and spotty cellphone reception.
Will the same javascript codebase run unchanged on iDevices and Android devices? Or will separate versions be required for each mobile OS? I see the W3 has discontinued the standards process for local web SQL database(s) because there's only one SQL contender at present and it takes at least two to tango. Is the webkit javscript SQL API in a state of flux?
Hello Tim,
When developing database centric applications for Android and IPhone, you are not locked in to using Sqlite. There is another alternative, which in many cases might be even better; namely CouchDB.
In both cases there are solutions available which makes it easy to develop database centric applications for Android and IPhone using the same code.
CouchDB
CouchDB, although written in Erlang, is basically a JSON based database using javaScript as its default interface. CouchDB can be extremely fast. However, CouchDB is not a relational database.
License: Apache license, 2.0.
Official site: http://couchdb.apache.org/
CouchDB for Android: https://github.com/couchbase/Android-Couchbase
CouchDB for IPhone: http://www.macworld.com/article/159606/2011/05/couchbase.html
Sqlite
PhoneGap is the choice if you prefer working with Sqlite. Using PhoneGap you can use the same javaScript code for both IPhone and Android for communication with Sqlite, and simply replace the middleware to match the OS you are compiling.
For Android the middleware is phonegap-version.jar, whereas for IPhone the file is named phonegap-version.dmg.
In addition to Android and IPhone, PhoneGap makes it possible to port the same applications to Blackberry, WebOS, Symbian and Bada.
License: BSD/MIT.
Official site: http://www.phonegap.com
SQLite is the only option when developing HTML5 Web Apps (if I understood you correctly).
You can check information about IndexedDB, which is already implemented in WebKit (Chrome 12) as window.webkitIndexedDB and also Firefox has implemented it.