Saturday, December 30, 2017

Working with barcodeScanner and Camera plugins at the same cordova project

Recently, I had to put two plugins in a particular cordova (I suppose that phonegap can has a similar issue) project:
First of all, when we started an hybrid project, is a good practice make sure that every single plugin has been working from the beginning if we don't want a headache.

I tried different ways to work with those plugins, but the only way I could do it was using some specific versions of android platform and barcodeScanner plugin.

Android platform: 5.1.1
barcodeScanner: 0.7.0

Besides, I found (and I don't know why yet) that is highly recommended (by me :) ) to install the Camera plugin first than another one, because for some reason (weird reason actually), this plugin remove all the files project in the www folder, and reset it to the fabric android template.

So, in order to make a functional project with our plugins we have to do the next:
cordova create myproject
cd myproject/
cordova platform add android@5.1.1
cordova plugin add cordova-plugin-camera
cordova plugin add cordova-plugin-barcodescanner@0.7.0
I made this on macOS High Sierra, and I don't know if this command work on Windows or another OS, but it must.

Sunday, November 19, 2017

How to make permanents changes in phpMyAdmin configuration

I was very pissed off about my phpMyAdmin configuration.

Sometimes, some configuration can be useful, but, sometimes, the same option can be a hindrance. Group databases used to be very useful for me, but, suddenly, that option started to pissed me.


Theres another option with the same experience: By default, show only 50 elements by page:
Many times I need to go inside a table, and then, go to into another table in a faster way, but jumping between one, and another....that's very disagreeable!

And yes, there is a configuration panel with many options, even that what I need to solve the dilema...but there are temporaries, so, I need to solved that issue once and for all.

I realized that there's a "help item" next to the configuration name:


When I clicked that button, a page showed up: The page with the configuration variable that I need to change:
Then, I put that variable with a higher value inside the config.inc.php file:

And that's all. We need to save the file and recharge the page:




Tuesday, September 26, 2017

Fixing Failed to install 'cordova-plugin-fcm': Error: spawn EACCES

Recently I wanted to install the cordova-plugin-fcm plugin on Mac OSX Sierra, but I got this error:

Failed to install 'cordova-plugin-fcm': Error: spawn EACCES
    at exports._errnoException (util.js:1024:11)
    at ChildProcess.spawn (internal/child_process.js:325:11)
    at Object.exports.spawn (child_process.js:493:9)
    at exports.spawn (.../platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:134:31)
    at .../platforms/android/cordova/lib/builders/GradleBuilder.js:261:16
    at _fulfilled (.../platforms/android/cordova/node_modules/q/q.js:854:54)
    at self.promiseDispatch.done (.../platforms/android/cordova/node_modules/q/q.js:883:30)
    at Promise.promise.promiseDispatch (.../platforms/android/cordova/node_modules/q/q.js:816:13)
    at .../platforms/android/cordova/node_modules/q/q.js:877:14
    at runSingle (.../platforms/android/cordova/node_modules/q/q.js:137:13)

Error: spawn EACCES

To solved that, I executed the command below this lines from the cordova root project directory:


sudo chmod -R 777 .

Thats all, so I was able to run the plugin installation again:


cordova plugin add cordova-plugin-fcm

...and run like a charm :)

Tuesday, January 3, 2017

Steam Controller doesn't work on Mac OSX El Capitan

I had the same initial problem with my steam controller reported in many sites, even in the Steam forums, so, for the record, after a headache trying many things, finally I made it this way:

  1. First, I tried to connect using the bluetooth interface. At this time, I could use the Steam Controller (SC now on) partially, and wasn't cool....I could not even play a game. 
  2. Next, I figured out that in the Big Picture Mode there's an option to add the control, and in fact, it tried, but it didn't work. A window asked me to press Steam button + X button at the same time, but it didn't work neither.
  3. Next, I read that turning off and on the computer might help, and yes it worked a little bit. Restarting the system made that Steam asked for the controller the next time I opened it. But, still didn't work properly, so that, I read on Steam FAQ that connecting a miniUSB wire could help. And yes, definitely it's started to work.
  4. After connecting the wire, the "Add SC" started to work, but there was one last step left.
  5. In order to make it work better, the SC has something called "templates", that it's nothing else than a preconfigured settings depending on the game, or kind of game, shooter, platform, etc.
  6. So, I selected the best I could see and that's all.
Hope it helps who's still a lost soul like I was once.