Learn the powerful enterprise adaptable database:

Getting Started With ADABAS & Natural

Saturday, March 30, 2013

Sakai Project: Test Drive Sakai at testdrivesakai.com


1) Go to the url, http://testdrivesakai.com/portal.
Click Create Account.


2) Fill up the form.
Click Sign Up.


3) Get Registration Successful page.


4) Check Email.
Click Log In.


5) Enter login credentials.


6) Get Welcome page.


Further reading: Sakai Vs Moodle

Wednesday, March 27, 2013

PhoneGap: Inserting into Eclipse on Windows



1) Download and unzip.


2) Copy the following structure only:


3) In Eclipse, Create New Android Application.


4) Accept Configuration.


5) Accept Launcher Configuration.


6) Create Blank Activity.


7) Set Activity Name.


8) Test.


9) First create a new folder called www and a new file called index.html. both in the project folder assets


10) Go back now to the PhoneGap structure





11) Copy now the point 1) 2) and 3) in the project structure the way you see bellow.




12) Prepare the Activity-Class
In the eclipse locate the src-folder and open the MainActivity.java class in it and change it that way you'll see bellow: (I leave the comments so you can see what I've changed)
import org.apache.cordova.DroidGap;

import android.os.Bundle;
import android.view.Menu;

public class MainActivity extends /* Activity */DroidGap {

    // @Override
    // protected void onCreate(Bundle savedInstanceState) {
    // super.onCreate(savedInstanceState);
    // setContentView(R.layout.activity_main);
    // }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.loadUrl("file:///android_asset/www/index.html");
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }

}



13) Content of Index.html


 copy paste this HTML-Code into the index.html file we've created in the assets-folder

<!DOCTYPE HTML>
<html>
  <head>
    <title>First App</title>
  <script src="cordova-2.2.0.js"></script>
  <script>
     function onLoad(){
          document.addEventListener("deviceready", onDeviceReady, true);
     }
     function onDeviceReady(){ navigator.notification.alert("PhoneGap is working!!");
     }
  </script>
  </head>
  <body onload="onLoad();">
       <h1>Welcome to PhoneGap</h1>
       <h2>Edit assets/www/index.html</h2>
  </body>
</html>


14) Prepare the Manifest-File before launching
In the manifest file called AndroidManifest.xml make sure you have inserted the following code in it:(Tip: in order to not do it all by hand, look at C:\development\phonegap-2.2.0\lib\android\example\AndroidManifest.xml and copy/paste it from there.)



15) Running the App


Select your MainActivity.java file and run it as Android application. (make sure you've an AVD installed as we have seen in the post How to install PhoneGap on Windows) If everything goes well you'll see that picture bellow. Thats all. From here you can now develop your app further.





16) Alternative Setup


Ok there is a even better way to do this.(I've shown all steps first so we do not overwhelm us with to much stoff)  Delete the folder www in the eclipse project. Then look into PhoneGap directory C:\development\phonegap-2.2.0\lib\android\example\assets There you'll encounter a sample structure. Just copy it into assets folder like i did bellow instead of doing it by hand. It should look like this if you run it:



Monday, March 25, 2013

Spoon.net Virtual Desktop System



At the time of this writing spoon.net is offering free account registration for Basic Applications. Good enough for you to try out the service.

1) Go to spoon.net
Click Sign Up.


2) Fill-in the details.
Click Sign Up.


3) Add Console Plug-in to your PC.


4) Entering Main Application Window.


5) Run spoon-plugin.exe.
Allow.





6) A login window pops up.
Enter your credentials.



7) Double-click Notepad++ 6.2.
If this is the first time running, you have to agree to EULA.



8) Notepad++ pops up and run on your desktop.
Magic!

Sunday, March 24, 2013

Android Developer Tools (ADT) Bundle for Windows

Android - Building Your First App


1) This tutorial is based on 
http://developer.android.com/training/basics/firstapp/creating-project.html.

2) The Integrated Development Software used for this tutorial (ADT) is downloadable from 
http://developer.android.com/sdk/index.html#download (32 bit edition).

3) Download and extract the ADT software at the step (2). The top-level directory is as shown below:


4) Go into eclipse directory and locate Eclipse executable file.


5) Run eclipse.exe. An ADT Splash Screen pops up.


6) A Workspace Launcher dialog box appears. Set your Workspace directory, preferably "../workspace") which means it is located at top level of the ADT directory. Optionally, Tick "Use this ad the default and do not ask again".


7) Click Menu/Help/About ADT.


8) The About ADT window pops up.
A number of installed components are shown as icons. The green icons are those related to Android Development kit.
Checking the installed components is necessary during the first time running of Eclipse to ensure that you have the required Android Development kit. Without these, you cannot use Eclipse to build Android apps.
Click OK.


CREATING AN ANDROID EMULATOR

9) Before you develop an Android app, you need to setup an Android Emulator so that you can test your app on it.
10) Click Menu Window/Android Virtual Device Manager.


11) Set the machine configuration.
11.1) Click "Edit..."
11.2) Enter the required details. Click OK.
11.3) To test the machine, click Start…


12) Set Launch options.
12.1) Accept the default and click Launch.


12.2) The Starting progress windows pops up.


12.3) The Android emulator starts loading.


12.4) You have to wait for logon screen to appear. Use your mouse to tap on the padlock icon and drag it to the right to unlock the machine.


12.5) Look at the title of the window, 5554:WQVA33
5554 is the port number of the emulator that allows it to communicate with other software.
WQVA33 is the name given in Step (11).

13) You can leave this emulator window open while building the app.

CREATING NEW ANDROID PROJECT

14) Click Menu File/New/Android Application Project






15.1) The explanation as stated on the above website:
  • Application Name is the app name that appears to users. For this project, use "My First App."
  • Project Name is the name of your project directory and the name visible in Eclipse.
  • Package Name is the package namespace for your app (following the same rules as packages in the Java programming language). Your package name must be unique across all packages installed on the Android system. For this reason, it's generally best if you use a name that begins with the reverse domain name of your organizationor publisher entity. For this project, you can use something like "com.example.myfirstapp." However, you cannot publish your app on Google Play using the "com.example" namespace.
  • Minimum Required SDK is the lowest version of Android that your app supports, indicated using the API level. To support as many devices as possible, you should set this to the lowest version available that allows your app to provide its core feature set. If any feature of your app is possible only on newer versions of Android and it's not critical to the app's core feature set, you can enable the feature only when running on the versions that support it (as discussed in Supporting Different Platform Versions). Leave this set to the default value for this project.
  • Target SDK indicates the highest version of Android (also using the API level) with which you have tested with your application.
As new versions of Android become available, you should test your app on the new version and update this value to match the latest API level in order to take advantage of new platform features.
  • Compile With is the platform version against which you will compile your app. By default, this is set to the latest version of Android available in your SDK. (It should be Android 4.1 or greater; if you don't have such a version available, you must install one using the SDK Manager). You can still build your app to support older versions, but setting the build target to the latest version allows you to enable new features and optimize your app for a great user experience on the latest devices.
  • Theme specifies the Android UI style to apply for your app. You can leave this alone.
15.2) Click Next.
16) Configure New Android Application Project.
16.1) Click Menu Window/Android Virtual Device Manager.
16.2) Accept the default configuration and click Next.
17) Configure Launcher Icons.
17.1) Accept the default and click Next.
18) Create Activity.
18.1) Accept the default (Create Activity/Blank Activity) and click Next.
19) Set options for New Blank Activity
19.1) Accept the default and click Next.
20) Project Created
20.1) Look at the Package Explorer Panel. The file activity_main.xml is highlighted.
20.2) Look at the Design Panel. The draft of the application screen layout is shown.
20.3) Notice the text "Hello world!" at the center of the screen layout.
21) The project creation is done. 


RUNNING APP ON EMULATOR

22) Right-click the Project Name. Select Run As/Android Application.
23) The app is launched to the emulator.
23.1) Notice that the look of the app screen is similar to the layout in Step (20)
23.2) Notice the name "My First App"


24) Click Return Button to exit from My First App.