Apache - Tomcat - Installation

Today a new tutorial for installing Tomcat 7 on Windows 7. You must have, at least, the JRE 6. Apache Tomcat installation on Windows 7 Let’s get started by downloading the last version on the official Apache Tomcat website: http://tomcat.apache.org/ Choose the 32-bit/64-bit Windows Service Installer. Run it and in the Choose Components choices, select the type of install Full in the combo box. Click Next and in Configuration, let all ports by default. In the Tomcat Administrator Login set a User Name and a Password if you want, or let it empty. Then Next > Next > Install. ...

September 25, 2011

Symfony 2 - Installation - On Windows Operating System

You already played with Symfony 1 or you never used it (SHAME ON YOU), and you want to install a fresh new 2.0.1 version of Symfony2 on Windows 7. You are in the right place! To be honest this new version is really easy to install. Download a copy on the official website of Symfony2: http://symfony.com/download We will install the 2.0.1 in the ZIP format. Symply open the ZIP file and place all in the root of your web server, generally it is C:\www. ...

September 24, 2011

Android - Error - DeviceMonitor

The following error occurs when you try to restart your Android Virtual Device too quickly during another launch, with the Run command of Eclipse: This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Error during Sync: timeout. Adb connection Error:An existing connection was forcibly closed by the remote host Connection attempts: 1 Connection attempts: 2 Connection attempts: 3 Connection attempts: 4 Connection attempts: 5 To resolve it, close your ADV and restart your application. 😜

September 16, 2011

Android - Error - ActivityManager

There, errors took from the ActivityManager within the Eclipse Console for the Android plugin and of course some explanations. 1. Error 1 1.1. The console text ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.badprog/.Tutorial } ActivityManager: Warning: Activity not started, its current task has been brought to the front 1.2. The solution This error occurs when you run your application without modifying anything before. To remove it, just add a space in your code and save it. Restart your application and this error should have gone. 😊

September 15, 2011

Android - Tips'n Tricks - Creating components

Today I will show you how to create 3 Buttons with 3 different ways and how to display them on the layout. It will be the Tuto 3 that can be found on the Android Market for free, of course. First of all, let’s explain what we will do. We want to display 3 Buttons. For this example, I will use BadprogTutorial instead of the complete one I used to create the application (Tuto_3_BadprogTutorialCreatingComponentsActivity). ...

September 15, 2011

Android - API Google Maps - Using MapView

This is the Tuto 2 of the Android tutorial series. You can find the application made here on the Android Market. Just follow the link on your right. The MapView class of the Android Google Maps API is designed to display a map with data obtained from the Google Maps services. If you never created a Google Maps application on Android, and for a full description and files needed, take a look at this tutorial: ...

September 9, 2011

Android - Application - Using Google Maps

As the Google Maps API v1 is now obsolete, I could recommend to check this tutorial for the new version of Google Maps API v2. This Tuto 1 could be found on the Android Market and the direct link is on your right, in the menu. The Android API allows us to use the Google Maps library. So, in this tutorial, for beginners, we will create a first application with some examples of the Google Maps. ...

September 8, 2011

Android - API - CharSequence

CharSequence is a native Java Interface. Its path in the package is android.content.Context.getText(resId) The class Context extends Object. We will see this with an Hello World! example. 1. CharSequence getText() The Android API uses it to create a getText method. Let’s take an example. The Java class: // src/com.badprog.mobile/BadprogActivity.java package com.badprog.mobile; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class BadprogActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); CharSequence myString = getText(R.string.hello_world_smile); tv.setText(myString); setContentView(tv); } } Then the XML file: ...

September 7, 2011

Android - API - Activity

Each Android application has one or more Activities. Each Activity has a lifecycle. Each screen we want to use as an interactive component is an Activity. So this application component must extends the Activity class. Interactive component is a component that the user uses to do something, for example, send an email, take a photo, etc. 1. Lifecycle of an Activity There is below their fundamental methods: public class ExampleActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // The activity is being created. } @Override protected void onStart() { super.onStart(); // The activity is about to become visible. } @Override protected void onResume() { super.onResume(); // The activity has become visible (it is now "resumed"). } @Override protected void onPause() { super.onPause(); // Another activity is taking focus (this activity is about to be "paused"). } @Override protected void onStop() { super.onStop(); // The activity is no longer visible (it is now "stopped") } @Override protected void onDestroy() { super.onDestroy(); // The activity is about to be destroyed. } } So an activity may be used in interaction with several activities. When an activity starts another one, the first is always in the stack (the back stack). The second one may send data to the first with, for example, a return value and after the end of the second one, the first activity receives this data to use it. ...

September 4, 2011

Android - Application - First application for beginners with an Hello World tutorial

Let’s play a bit with Android and create our first application, in this tutorial for beginners. We can call this tutorial: Tuto 0. You could find it on the Android Market. Open Eclipse. On the Package Explorer, right click and select: New > Other > Android > Android Project > Next. Write the Project Name: HelloWorld. On the Build Target area, select the version of Android you would like to use. We are selecting the Android 3.2 one for this example. ...

September 4, 2011