View RSS Feed

All Blog Entries

  1. Launching Android Applications on a Device

    by , 02-11-2012 at 01:44 PM
    To load Android application on your device, plug your Android device using USD data cable to your computer. Also check you debugging setting to confirm that you have configured this device for debugging. Follow these steps to make sure that you are using correct settings for debugging.

    • From Java perspective, select Run -> Debug configurations.
    • Double click your configurations.
    • Change your “Deployment Target Selection Mode” to manual on Target tab. You can get ...
  2. Simulating Incoming Calls to the Emulator

    by , 02-11-2012 at 01:40 PM
    Using DDMS Emulator control tab, incoming voice calls can be simulated. It is not a real call and no voice or other data is transmitted between the 2 parties. It is just a simulation of incoming calls as shown in below figure.

    Name:  1.JPG
Views: 954
Size:  25.1 KB
    Simulating Incoming Calls to the Emulator

    Follow below steps to simulate incoming call on your emulator that is running on your server.
    • Select emulator instance to call in the DDMS perspective. ...
  3. Debugging Android Applications Using DDMS

    by , 02-11-2012 at 01:38 PM
    In Eclipse there is DDMS perspective added by ADT plug-in, in addition to other normal Debug perspective. It supports code debugging and stepping through code. When your application is running, you can view this perspective in Eclipse. Click the Android DDMS icon in top right corner to launch DDMS perspective. If you want to switch to any other perspective, simple choose it from the right top corner of the Eclipse.

    Name:  1.JPG
Views: 1308
Size:  18.4 KB
    Debugging Android Applications
    ...
    Tags: android ddms Add / Edit Tags
    Categories
    Android Debug
  4. Launching Android Applications Using the Emulator

    by , 02-11-2012 at 01:36 PM
    To launch the application using Android, you can launch it by clicking the “Debug” button from launch configuration screen. Also you can launch it by clicking the button on Eclipse toolbar. Then select the created debug configuration from the list. When you will click the “Debug” button, the emulator will launch as show below. It may take some time.

    Name:  1.JPG
Views: 652
Size:  13.6 KB
    Android Emulator


    Your application will run as shown in figure below. It’s just easy ...
  5. Creating Debug and Run Configurations in Eclipse

    by , 02-11-2012 at 01:32 PM
    To run or debug an application in Eclipse, you have to create configuration for this. To create run or debug configuration, follow these steps.

    1. Select Run -> Debug Configuration from menu. Also you can select debug configuration option from the Eclipse toolbar.
    2. To create a new entry, double click Android Application item.
    3. Edit “New_configuration” entry.
    4. Rename the configuration.
    5. Click the “Browse” button and set the project.
    6. ...
  6. Android Project Files in Eclipse

    by , 02-11-2012 at 01:29 PM
    In this section we will explain different files automatically created with a new android project in eclipse.

    • AndroidManifest.xml: Main configuration’s file for the application.
    • default.properties: Build file used by Eclipse and Android ADT plug-in.
    • proguard.cfg: Build file used by Eclipse, ProGuard, and the Android ADT plug-in. You can edit and configure this file to optimize your code.
    • src folder: This folder contains all the source code.
    • Activity.java: ...
  7. Creating Hello World Android Project in Eclipse

    by , 02-11-2012 at 01:28 PM
    In this section, we will create a simple Hello World Android Project in Eclipse. Launch you Eclipse and follow these steps to create a simple project.

    • Click File -> New -> Android Project.
    • Enter a project name. For example “Droid1”.
    • Select a folder for the project source.
    • Next you need to select build target for your Android Project. Select most suitable for your target audience and application. For example if you want to use Google Maps, then ...
  8. Performing Fragment Transactions

    by , 02-11-2012 at 01:25 PM
    You can add, remove, replace or perform actions with fragments in your activity in response to user interaction. A transaction is a set of changes you perform to an activity and these can be performed using APIs in FragmentTransaction. These transaction can be saved on back stack and allow the user to navigate these changes.

    To get an instance from FragmentManager, following code is used.


    Java Code: This is the code to create a fragment
    FragmentManager fragmentManager = getFragmentManager()
    ...
  9. Building and Running Android Application from Eclipse with ADT

    by , 02-11-2012 at 12:09 PM
    Details of the build process are hidden when using Eclipse and ADT. Build process in running continuously in background and automatically build application when you make changes to code. Following topics will explain how to run application.

    Running on the emulator

    Create an AVD when you are running your application on the Android Emulator. Follow these steps to run your application

    • From Eclipse menu bar select Run > Run (or Run > Debug) from the ...
  10. Building and Running an Android Application

    by , 02-11-2012 at 12:04 PM
    An Android project is compiled and packaged into “.apk” file. It is the container for application binary. It contains following information that is necessary to run your application on a device or emulator

    • Compiled “.dex” files
    • Binary version of Manifest file
    • Compiled resources
    • Uncompiled resource files for your application

    If Eclipse is being used as development IDE, the ADT plug-in is responsible for building your project when source ...

    Updated 02-11-2012 at 12:06 PM by Android Development

    Categories
    Build Application , Run Application
  11. Android Manifest File

    by , 02-11-2012 at 12:00 PM
    Whenever an Android Application is loaded, the application's AndroidManifest.xml file also called “manifest file” is read by the Android system. All the components are declared in this file by the Android application. Also it is placed at the root of application project directory.

    Following are the major tasks that are performed by the manifest other than just declaring the application’s components.

    • User permissions such as Internet access or read access to user’s
    ...
  12. Android Application Framework

    by , 02-11-2012 at 11:58 AM
    Android Application Framework supports development of rich and innovative mobile applications. Android Application Framework is open source and uses Java Programming language. Android developers can take benefits of the hardware device, access location information, background services, alarms, ability to add notifications and many other benefits.

    Core applications uses framework APIs and developer complete rights to those APIs. The architecture of application is based on reusability ...
  13. Referencing Application Resources

    by , 02-11-2012 at 11:53 AM
    All the application resources are compiled at build time and are stored in “res” project directory structure. These resources can also be used programmatically. Also they can refer to other resources in application. These application resources are accessed using class file R.java programmatically. Get the application’s resource object and call getResource() method to reference a resource in your activity class. After this call the appropriate method to access your desired resource.

    ...
    Categories
    Android Resource
  14. How to access Android Application Preferences?

    by , 02-11-2012 at 11:51 AM
    You can use getSharedPreferences() method of your application context to get your application preferences. Also SharedPreferences class support saving of application data like configuration settings. You need to assign each SharedPreferences object a different and unique name that enables you to arrange preference values in different categories and can store all preferences in on large unnamed set.

    For example, if you are interested in storing user name and game statistics like how ...
  15. Android Application Context

    by , 02-11-2012 at 11:43 AM
    For all the core application functionality, application context is central location. It is used to access resources that are shared between activity instances and is used to access settings. Use getApplicationContext() method to get the application context for current process.

    Java Code:
    Context context =  getApplicationContext()
    You can also use this object when writing code in your Activity class because Activity class is derived from the Context class. After ...
  16. Managing Android Virtual Devices

    by , 02-11-2012 at 11:40 AM
    Android Virtual Device (AVD) is configured in order to execute an application in the Android Emulator. In AVD profile, the type of device is described that you want to simulate in the emulator and it also includes Android platform to support. Different screen sizes and resolution are specified and also can specify an SD card. Follow these steps to create a basic AVD:

    1. In Eclipse launch Android SDK and AVD Manager by clicking the Android icon in meny bar. Also you can select it from ...
  17. Edit a String Resource

    by , 02-11-2012 at 11:38 AM
    Open an Eclipse Android project and examine main.xml file. You will find that it has a TextView control layout. This TextView control interface simply displays a string. The string displayed in this case is defined in string resource called “@string/hello”.

    If you want to edit this string resource using string resource editor, follow these steps:

    • Double click strings.xml file in package explorer of Eclipse and it will open in the resource editor.
    • Select String
    ...
  18. Edit Android Manifest File

    by , 02-11-2012 at 11:09 AM
    Manifest information is managed in different tabs by file editor. These tabs are as follow:

    • Manifest: This tab is used for application general settings such as version information, package name etc.
    • Application: Application details such as name, icon and “guts” are defined under this tab. Like what application can run and what other services application can provide.
    • Permissions: Application’s permissions are defined under this tab. If application wants to read a contact from
    ...
  19. Android Activity Lifecycle

    by , 02-11-2012 at 11:00 AM
    All fundamental lifecycle methods of an activity are given in below code skeleton.

    Java Code: This is the code to manage lifecycle of an activity
    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.
    ...
  20. Starting an Android Activity for a Result

    by , 02-11-2012 at 10:56 AM
    Start the activity using startActivityForResult() when you want to get a result from the activity. Implement the onActivityResult() method to get the result from activity. In this method, subsequent activity will return result in Intent.

    In below code, we want to pick the contact.

    Java Code: This is the code to start an activity for a result
    private void pickContact() {
        // Create an intent to "pick" a contact, as defined by the content provider URI
        Intent intent = new Intent(Intent.ACTION_PICK,
    ...
  21. Starting an Android Activity

    by , 02-11-2012 at 10:53 AM
    startActivity() method is called when a new activity is started. Intent object is passed as parameter and it describes your activity. What actions you want to perform are described by this intent. Also data used by an activity is carried by this intent.

    For launching a new activity, create an intent that describes the activity using the class name. Following code explains how one activity can start a new activity.

    Java Code: This is the code to create a new Intent
    Intent intent = new Intent(this, SignInActivity.class);
    ...
  22. Android Activities

    by , 02-11-2012 at 10:44 AM
    A single screen in Android application is provided by an activity. You can move these Activities into background and then resume.

    It is just like a screen where a user interacts and performs some actions such as dial the phone, view map, send email, take a phone etc. User interface is drawn into an Activity window. Screen is usually filled by the window or it may float on top of different other windows.

    Different bounded or integrated activities create an application. ...
    Categories
    Android Activity
  23. Android Introduction

    by , 02-11-2012 at 10:40 AM
    Android includes following at its core:

    1. Key Applications
    2. OS
    3. Middleware

    Android SDK consists of different APIs & tools to start developing mobile applications on Android platform. The programming language is Java that is being used for development of these applications.

    Core Features

    1. Application framework: It is used to replace and reuse different components
    2. Dalvik VM (Virtual Machine): An optimized ...
    Tags: android, tutorial Add / Edit Tags
    Categories
    Tutorial
  24. Making your own class Iterable.

    by , 02-09-2012 at 08:21 PM
    Java Code:
    package myPaackkage;
    
    import java.util.*;
    
    
    public class SomeClass implements Iterable<String> 
    {
    	@Override
    	public Iterator<String> iterator() 
    	{
    		System.out.println("Hello!!");
    		
    		return new Iterator<String>()
    				{
    			private int i = 0;
    
    					@Override
    					public boolean hasNext() {
    						while(i<words.size())
    							return true;
    ...

    Updated 02-21-2012 at 11:33 PM by fatabass (Code tags.)

    Categories
    Uncategorized
  25. Checking for Randomness of Java with HashMap

    by , 02-07-2012 at 11:19 PM
    Java Code:
    package myPaackkage;
    
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.ListIterator;
    import java.util.Random;
    
    public class SayisalGenerator {
    	
    	static Random myRandomGenerator = new Random();
    	
    	public static void main(String[] args)
    	{
    		HashMap<Integer,Integer> myHashMap = new HashMap<Integer,Integer>();
    		
    		for(int i=0;i<1000;i++)
    		{
    ...
    Categories
    Uncategorized
  26. A little on Containers. ( Collections + Maps )

    by , 02-07-2012 at 08:39 PM
    Java Code:
    package myPaackkage;
    
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Collection;
    import java.util.Collections;
    import java.util.HashMap;
    import java.util.HashSet;
    import java.util.LinkedHashMap;
    import java.util.LinkedHashSet;
    import java.util.LinkedList;
    import java.util.List;
    import java.util.Map;
    import java.util.TreeMap;
    import java.util.TreeSet;
    
    public class
    ...
    Categories
    Uncategorized
  27. Start writing a plug-in for Eclipse

    by , 02-06-2012 at 06:13 AM
    The Eclipse IDE has an open architecture which allows third party developers to extend or add new functionalities to the Eclipse’s core platform. This architecture follows the OSGi framework which is a specification for application and component life cycle management.

    This article will guide you to develop a sample plug-in from creating fundamental blocks to testing and installing as a feature to the IDE. The version of Eclipse targeted by this article is the 3.7 (Indigo).
    ...
    Categories
    Plug-ins
  28. Using WindowBuilder to design GUI in Eclipse

    by , 02-06-2012 at 04:57 AM
    WindowBuilder is a great Eclipse plug-in that allows developers to visually design graphical user interface (GUI) for Java applications. It supports developing both Swing and SWT applications. In addition, it also supports Google Web Toolkit (GWT) and XML Windowing Toolkit (XWT). This article introduces this plug-in to Java developers about installation and working within Eclipse IDE environment.

    Install WindowBuilder plug-in

    WindowBuilder is already integrated into ...
  29. Using of Inner Classes

    by , 02-06-2012 at 01:15 AM
    Java Code:
    package myPackage2;
    
    public abstract class Event 
    {
    	private long eventTime;
    	protected final long delayTime;
    	
    	public Event(long delayTime)
    	{
    		this.delayTime = delayTime;
    		start();
    	}
    	
    	public void start()
    	{
    		eventTime = System.nanoTime() + 2*delayTime;
    	}
    	
    	public boolean ready()
    	{
    		return System.nanoTime() >= eventTime;
    	}
    ...
    Categories
    Uncategorized
  30. Working with databases in Eclipse using QuantumDB

    by , 02-05-2012 at 01:32 PM
    Database is an important part of a software program. There are a number of tools/editors for popular RMDBS such as MySQL Query Browser, SQL Server Management Studio, TOAD… for database administrators and/or developers. For those who are working with Java and database using Eclipse IDE, a plug-in for database integrated in an IDE would be a necessary tool, and QuantumDB is such a plug-in. It is easy to setup and helps developers working with the most popular database systems smoothly.
    ...
Page 25 of 48 FirstFirst ... 15232425262735 ... LastLast