how to access data base in framework7/cordova? - android

I want to use framework7 cordova to write an app, but at the same time, I want to store some data with data base, is that possible?
I have heard about the cordova-sqlite-storage plugin, does it use the window.localStorage? Is there a better solution?

The cordova-sqlite plugin is a good choice. Much simpler to develop and test than using file for example. With this plugin, in intel XDK, you can test in the emulator directly.

Related

What is the recommended Cordova way to store sensitive keys on Android?

I'm using the Cordova Keychain plugin (http://plugins.telerik.com/cordova/plugin/keychain) to store some sensitive keys in the iOS keychain from my Cordova app. I would like to know of the best way to do this on the Android. I haven't had much luck finding any Cordova plugins for this purpose. I'm assuming I should find a plugin that leverages this : http://developer.android.com/reference/java/security/KeyStore.html
The only one I've found which I think might work is : https://demo.a-sit.at/apache-cordova-cryptography-plugin/
What's the best way to do this? I need to store the key to my local sqlite encryption.
Thanks
Sam

Why to use Phonegap if you only develop on one platform

I've been checking out a lot of open source projects for a SQLite map database I'm getting ready to develop and have seen a lot of finished Phonegap applications that are just primarily written natively for one platform with an index that just have references. Why do I see this so much? What the advantage to this?
If you don't know the language+the sdk&apis you need to know to build native apps
If you think maybe oneday you will have to target an other platform
if you want to use some libraries available in javascript
if you want to share code between your app and a webapp
Ok, there are also many disvantage as speed or the need to test with many devices because you rely on the webview. If the target is android maybe using crosswalk can remove many of the disadvantages.

Easier way for use SQLite in Phonegap

I need use SQLite in my Phonegap application, but I'm new in Phonegap
What is easier way for work SQLite in Phonegap?
My application is focused for Android device
Try this plugin https://github.com/litehelpers/Cordova-sqlite-storage. This is supported by phonegap build also. Refer how to use and limitations section before using it.
If you are planning to use phonegap builds and need any other alternative plugins visit https://build.phonegap.com/plugins and search for sqlite plugins.

How to automatically update resources in a Cordova application?

I have a cordova hybrid application and mobile web application. I came across a problem while application upgrade. Mobile web application works perfectly as all the static files which are modified are fetched from web server. But my hybrid application is not upgraded. I can push a new version to PlayStore or iTuneStore, but users has to manually update the application. Is there any way to update the resources(such as JavaScript, JSON or CSS) in assets folder? I gave a try, but failed. Assume that as part of a WebService request or push notification, I will get a list of files that are modified on the web server. How can I get these files in my hybrid app?
Please help if any of you faced the same problem.
You will need to check out the FileSystem and the FileTransfer APIs
I still did not get a concrete answer . But there is a tool called TriggerIO which offers this feature. Also PhoneGap cloud provides this for collaborative testing.
I believe behind the scene they may be using ApplicationCache to check for the resources.
Depends on your app usecase there is another way too. If you are okay for lesser performance, rather than packaging your static files along with the bundle, refer it from web. In config.xml, content src="mydomain.com/index.html". I use this for a specific product implementation.
You can remote update your hybrid apps with codova-app-loader, please refer https://github.com/markmarijnissen/cordova-app-loader.

how to use android database in/as a phonegap database

I want to use android database into same phonegap apps.
more descripation:
I created phonegap application, but phonegap application is not supporting services so, we have created application that in java for android and will create for iPhone also.
But the problem is that i need to check store data into android(.java) for service. but how can we use that database into phonegap(.javascript)
sorry for my grammar.
You need to write phonegap plugins for same. Please refer link for more details.
I think that persistenceJS will fit your need

Categories

Resources