Translate

    Monday, October 19, 2015

    A few days ago I had to use phonegap to make a mobile app, so I started from the beginning: Installation. I was hoping to find a next-next wizard who did the job for me pretty easy but I couldn't find it, so this was the plan B:
    There are a few simple requirements you'll need prior to installing the PhoneGap CLI:
    • node.js - is a JavaScript runtime to build your JavaScript code



    Node.js installation is pretty straight forward, here are some screenshots:







    We can check if Node.js package manager was installed successfully typing npm on windows console


    • git - is used in the background by the CLI to download assets. On some operating systems it comes pre-installed. To check if you already have it installed, type git from the command line and if you get something like this you are good to go...



    Whene you reach this step you should select this option so you get the enviroment variables automatically configured, but don't worry if you missed it, I will show you how to fix it



    After installing these tools you may find that git command line is not working still depending on the options you choosed in the wizard, so lets fix it:






     Go to Advance system settings


    If you already have a variable called path just like me, the you just have to Edit... it, other way press New...


    Find the git installation path on your pc and copy the path of the cmd folder



    Then paste it in the path variable. Note: if you already have other paths in the variable, you should add a semi-colon (;) before pasting the git path  ;). Then press Ok button



    Now, if you type git on the command promt everything should be working now. 
    Tip: I recommend openning a new cmd console before trying a command who depends on enviroment variables because already openned consoles (in my case at least) don't get the enviroment variables updates

    Install the PhoneGap CLI via npm typing the following command in the cmd
    npm install -g phonegap@latest

    Then we will get something like this

    Whene the proccess finish we should be able to type phonegap on the console a get something like this:


    Create phonegap project with the command phonegap create <path> --name "<app name>"


    Now we get the following folder structure of a working out of the box phonegap project 


    This is where we can build our hybrid app using the old html, js and css we already know plus all phonegap capabilities we get throught its plugins



    Now lets add a platform to our phonegap project. First, set your location to our phonegap project folder: cd MyFirstApp

    Then type the following command phonegap platform add android


    And our project should now contains the android platform, just check inside X:\Path\To\Project\MyFirstApp\platforms



    Now that we got our "hello world" phonegap project, lets build the .apk using phonegap build....but...we may get this error about the ANDROID_HOME, so lets fix it.


    First thing we need to do is download the android sdk, we some options:
    • Download the Android Studio IDE which already includes android skd and is a next-next proccess. This takes longer but you will be ready to develop native apps if you ever need to.
    • Download just the Android SDK, this is the fastest.

    I will show you the second one ;)


    Accept terms and then press download button and wait a few minutes


    Execute the installer



    Maybe, you will get this error if you haven't installed the Java Development Kit


    The JDK installation proccess is outside of this post scope, but don't worry, here is another tutorial for that

    After solving the java sdk issue, we will get something similar to this on the installer


    Select the option that fit best to your needs, I´m leaving the deafult option


    Choose the sdk destiny folder


    Click Install button


    Wait the proccess to complete


    Then click Finish


    Unfortunatly, we need to make one step more. That's because we haven't installed the android targets needed for compilation, right now, if we execute again the phonegap build command, we'll get this


    But...there is a hint inside the error message that tell us how to get the android targets installed by running the following command:

    C:\Users\<user_name>\AppData\Local\Android\android-sdk\tools\android.BAT


    This is what we get, the Android Package Manager. Here I show you what packages did I choose:


    Accept license terms and hit Install


    Now, put yourself confortable and wait :)


    Now...finally... everything should be up and running, so lets give it try phonegap build


    Everything was fine, so, lets see where our .apk is 

    C:\Users\<user_name>\MyFirstApp\platforms\android\build\outputs\apk\



    That's all guys, I hope it has helped you. Comment please, see you in the next post
    Category: articles

    Sunday, October 18, 2015


    In the software development world, many cool frameworks and libraries like maven or Andrioid needs the Java JDK to work. If you move in this world you probably already have it or certainly will, so this installation tutorial will come usefull for you.

    Java JDK installation is pretty simple and straight forward first thing you need to do is go to Java SE Download Page and select the Java Platform option:


    Accept terms and select the option tha fits your OS





    Wait the download to complent and double click the installer exe


    You could choose to not install the Source Code if you don't want to


    Wait a few seconds


    Then you will be able to change the installation folder, we will just leave the default value


    Wait until proccess completes and press close button


    Now, lest check if JAVA_HOME was correctly set. Open a windows console and type java, you should see something like this 


    I hope this helped you guys, tell me if this was usefull to you or if think I missed something. 

    Have a good day


    Category: articles

    Thursday, September 3, 2015



    Hi beginners friends, today I'll show you show to install and LDAP Active Directory on Windows, the steps are simple


    To get Active Directory installed you need to go:
    o   Star> search bar >dcpromo.



    We will get this wizard. Select create a new domain in a new forest option



    Type your domain name:





    Set database location



    Choose the Active Directory working level, in our case will be Windows Server 2008.


    Type your recovery password:

    Then restart and login:

    To populate LDAP database you can go to Active directory users and computers:



    Create your Organization Units with the desired structure:



    Create users inside the Organizational Units:


    If you wish, you can stablish policies for your organizational units:

    o   Star>Administrative Tools>Groups Policy Management.


    Make click on the organizational unit right click >Create a GPO in this domain, and link it here


    For policy editing you can right Click over the polícy > Edit…


    In the new window navegate to User configuration>Policies>Administratives Templates>[desired folder]. The folder names guide us on the configurations types and registrictions we have for our users and group in our database.


    After adding our policies we need to link and force them so they becom active.


    Other option we have at hand to force our policies is going to Start menu > (Click)Run...

    Type gpupdate /force

    Authors: Sara. y David.
    Category: articles