PhoneGap Build pre-populated SQLite DB - sqlite

I've successfully used PhoneGap Build with pre-populated SQLite DBs in the past via the https://build.phonegap.com/plugins/2368 plugin. However, Adobe deprecated the use of all plugins from the PG Build repository. Thus, I've been forced to use the npm alternatives.
https://www.npmjs.com/package/cordova-sqlite-storage is the recommended alternative to brodybits' original plugin. However, it's not compatible with PG Build due to them not honoring before_plugin_install hook.
https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free and https://github.com/litehelpers/Cordova-sqlite-legacy-build-support are the recommended PG Build solutions. These work successfully to create and save/load to a new SQLite DB. However, they do not inherently support pre-populated DBs. It seems the solution to this was to copy the directory from the www/ directory to the app's DB dir before opening the DB. This is made possible by using https://github.com/an-rahulpandey/cordova-plugin-dbcopy. I've had success using this plugin, but have also experience the app initially crashing (likely due to some case where the DB was trying to be opened before it was copied..?).
It's frustrating to now have to use two plugins to do what one accomplished simply because Adobe deprecated use of its repository. Furthermore, I find it strange that the newer versions of Cordova-sqlite-storage don't support pre-populated DBs anymore when version 1.0.6 did.
I tried adding https://github.com/litehelpers/Cordova-sqlite-storage/tree/a97198d as the plugin source in my config.xml file. However, I can't seem to be able to specify a tag for the git repo (it only seems to pull the master version). Also, I tried adding https://github.com/litehelpers/Cordova-sqlite-storage/tree/a97198d as a custom plugin for PG Build and got an error for invalid url.
Does anyone know a possible solution to this? I'd really just like to be able to use the same plugin I've used for almost two years. Thanks!

was the right way to add the plugin to my config.xml file

Related

Qt Installer Framework - Update control script

The problem
I have a Qt IFW installer with an online repository, from which users fetch data to install and update the software.
My installer has a "root script" defined in config.xml:
<Installer>
<!-- ... -->
<ControlScript>controllerscript.qs</ControlScript>
</Installer>
Now I want to change the content of controllerscript.qs and deploy it on the online repository.
when a new user installs the software for the first time, it works as expected
when a user updates its software from a previous version using MaintenanceTool.exe, it does not get the update
Possible solution
I realized that when you create the installer, it generates a file named MaintenanceTool.dat which seems to contain controllerscript.qs (+ other things). I managed to manually copy that file and push it to the online repository (inside a package). That way, the maintenance tool is able to see the package update, and correctly gets the new MaintenanceTool.dat. After that, the maintenance tool is indeed using the new code from controllerscript.qs.
Question
Is there another (cleaner) way to achieve that?
If not, is it really safe to provide a manual update to MaintenanceTool.dat? That file contains many other things, so is there a risk to interfere with the rest?
Thanks,

There are no Views in the 2sic App-Media Directory application sample

I've downloaded App-Media Directory 1.0.0.7 from https://2sxc.org/en/apps/app/media-directory-app-for-dnn-dotnetnuke, and install it fine, but when I go into Apps Management I do NOT see any Views (or Queries or WebAPIs), and I believe I've seen references to List View and Press Release View. I also don't find this on GitHub to see if they might be there somehow.
Any ideas? I've not looked at older releases yet.
I posted a quick response to this on the same git-hub question. basically it's a very old ZIP format with an old XML inside it.
Importing it into a 2sxc 8 and re-exporting it fixes stuff, but since the app is very old and uses AngularJS, I don't recommend it.

OpenRefine SQLite addon

I just started to use OpenRefine and I wonder if there is any SQLite addon I could use.
I found a bunch of addons on main download site but SQLite is not between them.
On the other hand there is a pull on github, that claims OpenRefine to support also SQLite. I tried to load data both from "This Computer" and "Database" option and I was not able to load SQLite in neither way.
And finally I found that there is a SQLite directory with JAVA files in the github extensions folder, that might be that above mentioned support. Is this meant to be installed the easy way (just create sqlite directory inside extensions and put all the *.java files there) or do I need some other trick to achieve support on SQLite within OpenRefine?
For future reference: The SQLite importer has been added to OpenRefine in version 3.4 (https://github.com/OpenRefine/OpenRefine/wiki/Changes-for-3.4) (as Ettore Rizza already mentioned)

Dart Packages folder not existing anymore how do I integrate with symfony now for development

Back in the times of dart 1.9.x I made a dart frontend with symfony rest backend. Today I wanted to setup a development environment to do some more work on that app.
Unfortunately it turned out that dart 1.21.x does no longer create a packages folder where all the dart files are. This not only breaks the way integration worked up until now for development but it also breaks how template Urls are resolved by anything other than pub serve
Appart from creating the packages folder symlinks myself or completely rewriting the App. Does anybody know a good way to integrate the latest dart with Symfony?
You can opt-in
pub get --packages-dir
but the option is planned to be removed eventually, therefore try to find a way your application works without it.
The migration to code generation, DDC, and bazel might make this easier (none released yet)
There are also the packages
https://pub.dartlang.org/packages/package_resolver
https://pub.dartlang.org/packages/package_config
that help with the .packages file that replaces the packages directory and symlinks.
The sass package (which most often causes issues with the missing packages directory) also should become available in a version that doesn't depend on the packages directory soon.

Prepopulated database in cordova app: too slow and splashscreen shown too late

I'm using cordova 3.4.0 and the sqlite plugin (https://github.com/brodysoft/Cordova-SQLitePlugin) to develop an android app with a prepopulated database. I configured the plugin and the database following this post: http://www.corporatezen.com/2012/11/shipping-prepopulated-database-phonegap/
The problem is that the first time the app is launched, it copies the database from the assets folder to the database folder and on old devices with android 2.3.x it can take more than 10 seconds (I have a 90MB database). During this time the screen is black and users may think the app doesn't work and close it.
I tried to look for a faster way to copy the file, but I couldn't find anything.
I tried also to set a splashscreen, using the splascreen plugin (https://github.com/apache/cordova-plugin-splashscreen/blob/dev/doc/index.md) but it appears only after the black screen phase.
Do you have any suggestion?
Solved with this plugin: https://github.com/an-rahulpandey/cordova-plugin-dbcopy
With this, the java code to copy the db is called by the plugin and it's easier to show to the users a warning message created with HTML & Javascript.
I also agree with Sergio.
"dpcopy" is a simple, but a powerful tool.
https://github.com/an-rahulpandey/cordova-plugin-dbcopy
And I also recommend you to apply "Cordova-sqlite-evcore-extbuild-free."
Currently, I'm designing my apps with Cordova, IONIC in Visual Studio 2015 and I applied those two plugins above for prepopulated DB.
The following Git also will solve your question.
https://github.com/ymochi/prepopulated-DB-for-hybrid-applications

Resources