...
Showing posts with label android. Show all posts
Showing posts with label android. Show all posts

Monday, 22 December 2014

Android & iOS App Store Summary

When it comes to major apps, the line between Android and iOS is starting to blur rapidly. Choosing a smartphone or tablet platform should be a well-considered decision because switching from iOS to Android or vice versa will require you to buy apps again in the Google Play (or Apple app) store. Android is now the world’s most commonly used smartphone platform and is used by many different phone manufacturers. iOS is only used on Apple devices, such as the iPhone.
iOS and Android both use touch interfaces that have a lot in common - swiping, tapping and pinch-and-zoom. Both operating systems boot to a home screen, which is similar to a computer desktop. While an iOS home screen only contains rows of app icons, Android allows the use of widgets, which display auto-updating information such as weather and email. The iOS user interface features a dock where users can pin their most frequently used applications. A status bar runs across the top on both iOS and Android, offering information such the time, Wi-Fi or cell signal, and battery life; on Android the status bar also shows the number of newly received emails or messages.
The bottom line when comparing Google and Apple's app stores is that most popular apps are available for both platforms. But for tablets, there are more apps designed specifically for the iPad while Android tablet apps are often scaled up versions of Android smartphone apps. Developers at startups often focus on one platform (usually iOS) when they first launch their smartphone app because they do not have resources to serve multiple platforms from the get go. For example, the popular Instagram app started with iOS and their Android app came much later.

Thursday, 18 December 2014

How to Install Android SDK? (for Linux)

This tutorial will prepare you to install and configure Android on your Ubuntu Linux system. You must have Oracle Java JDK or OpenJDK on your system before installing Android SDK. OpenJDK (aka Open Java Development Kit) is a free and open source implementation of the Java programming language. You can download Oracle Java JDK from here. Now, follow these 6 steps to install Android SDK on Linux operating system.

Step 1

  • First, boot up Ubuntu Linux,make sure you have an implementation of the Java JDK installed on your system, whether it is OpenJDK or Oracle Java JDK, which lays the foundation for the Android SDK. You have choice between installing Open JDK or installing Oracle Java. I recommend installing Oracle Java because it is usually the most well maintained and up to date version of Java. Type this command "sudo apt-get install openjdk-7-jre". This command installs OpenJDK JRE( Java Runtime Environment ) on your system.
  • If you are running a 64-bit distribution of Android SDK on your machine, you need to install the ia32-libs. The command (sudo apt-get install ia32-lib) will install additional libraries needed for development with the Android SDK and the command (javac -version) will check the Java JDK on your system. The Java JDK command must respond back with java 1.7.0 or something similar to this. The command (java -version) will check the Java JRE ( Java Runtine Environment ) on your system.

Step 2 

  • Make sure you have the Eclipse Integrated Development Environment (IDE) installed on your system. For example, select Eclipse Classic and download the version for your system architecture such as 32bit or 64 bit version for Linux. If your computer system has 4GB or more of memory most likely it is a 64 bit computer.
  • The command (file /sbin/init) will download the Eclipse IDE into your /home/"your_user_name"/Downloads. Select the correct bit version for your corresponding system architecture. For example, if you are on 32-bit Ubuntu Linux select 32-bit Eclipse IDE and if you are on 64-bit Ubuntu Linux select 64-bit Eclipse IDE.
  • This is an example of a 64-bit Eclipse IDE setup on 64-bit Ubuntu Linux operating system. The command (cd /home/"your_user_name"/Downloads) will change you in your Downloads directory. The command (sudo -s cp -r eclipse-SDK-3.7-linux-gtk-x86_64.tar.gz /usr/local) will copy the Eclipse IDE to the /usr/local directory. The command (cd /usr/local) will change you into the eclipse directory. Then, the command (sudo -s chmod a+x eclipse-SDK-3.7-linux-gtk-x86_64.tar.gz) will make the eclipse binaries executable for all on the system. Now, the command (sudo -s tar xvzf eclipse-SDK-3.7-linux-gtk-x86_64.tar.gz) will unpack your Eclipse IDE compressed binaries and the command (exit) will take you out of root user.
  • Open up a terminal and enter the command (cd /home/"your_user_name"/Desktop) which will
    change you into your user Desktop, make sure you are not root. Now the command (ln -s /usr/local/eclipse/eclipse) and (chown "your_user_name" eclipse) will make the Eclipse symbolic link located on your desktop belong to the user. It is very important to make sure that you are not root when you create this symbolic link from your Eclipse IDE /usr/local/eclipse directory to your Desktop /home/"your_user_name"/Desktop

Step 3

  • Download the Android SDK, click on the Linux tarball, android-sdk_r22-linux.tgz and save it to your /home/"your_user_name"/Downloads directory. Now, open up a terminal and the command (cd /home/"your_user_name"/Downloads) will change you into your Downloads directory. The command (sudo cp -r android-sdk_r22-linux.tgz /opt) will copy the android sdk to /opt. The command (cd /opt) will change you into the Android working directory. Now, the command (sudo tar xvzf android-sdk_r22-linux.tgz) will unpack your Android SDK and the command (sudo -s chmod -R 755 /opt/android-sdk-linux) will make the /opt directory and the Android SDK writable and executable for all users on the system. When these steps are complete you will have Android SDK located at: /opt/android-sdk-linux on your Ubuntu Linux system.
  • Open up a terminal and add Android SDK to your system wide PATH on Linux. Type the command (sudo nano /etc/profile) or (sudo gedit /etc/profile). Now add the following lines below to the end of the system PATH file.
    • export PATH=${PATH}: /opt/android-sdk-linux/tools
    • export PATH=${PATH}: /opt/android-sdk-linux/platform-tools
    • Save the /etc/profile file and exit.
  • Now, reload your system PATH /etc/profile by using the command (. /etc/profile). This command informs the Linux system of the location of the Android SDK development tools.

Step 4

  • In order to install the Android Development Tool (ADT), you will have to install the Android ADT tool for the Eclipse IDE as root. The command (sudo -s /usr/local/eclipse/eclipse) will install the ADT plugin tool for all users on the system.
  • Install the ADT Plugin for Eclipse, the ADT is a plugin for the Eclipse IDE. Before you can install or use ADT, you must have a compatible version of Eclipse installed on your system. Start Eclipse, then select Help and Install New Software. Click Add, in the top-right corner. In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the URL (https://dl-ssl.google.com/android/eclipse/) for the Location. Now, click OK. If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).
  • In the Available Software dialog, select the checkbox next to Developer Tools and click Next. In the next window, you'll see a list of the tools to be downloaded and Click Next. Read and accept the license agreements, then click Finish. If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.
  • When the installation completes, restart the Eclipse. Configuring the ADT Plugin, after you've successfully downloaded the ADT as described above.
  • Now, modify your ADT preferences in Eclipse to point to the Android SDK directory as given below:
    • Select Window > Preferences... to open the Preferences panel.
  • Select Android from the left panel. You may see a dialog asking whether you want to send usage statistics to Google. If so, make your choice and click Proceed. You cannot continue with this procedure until you click Proceed.
  • For the SDK Location in the main panel, click Browse and locate your downloaded SDK directory, which should be /opt/android-sdk-linux. Click Apply, then OK.

Step 5

  • Adding Platforms and other components, in setting up your SDK is using the Android SDK and AVD Manager (a tool included in the SDK starter package) to download essential SDK components into your development environment. The SDK starter package, which you've already downloaded, includes only a single component: the latest version of the SDK Tools. To develop an Android application, you also need to download at least one Android platform and the associated platform tools. You can add other components and platforms as well, which is highly recommended.
  • Open Eclipse and click Window->Android SDK and AVD Manager->Installed packages and click update all. Simply click Install to accept the recommended set of components and install them.
  • On Linux, open a terminal and navigate to the /opt/android-sdk-linux/tools directory in the Android SDK. Type the command (sudo -s) and (cd /opt/android-sdk-linux/tools) to change you into the android sdk tools directory. The command (./android) will run the Android graphical user interface. In most cases you will have to be root user in order for the Android SDK to download updated components to the opt/android-sdk-linux directory. To download components, use the GUI (Graphical User Interface) of the Android SDK and AVD Manager to browse the SDK repository and select the new or updated components. The Android SDK and AVD Manager installs the selected components in your SDK environment.

Step 6 

  • Once all the components for Android have been updated you will need to create an Android Virtual Device.
  • Click on Window->Android SDK and AVD Manager->Virtual Devices in order to create a Android Virtual Device ( emulator ).
  • Click on Window->Android SDK and AVD Manager->Virtual Devices in order to create a Android Virtual Device ( emulator ).
  • Now, click on the box that says target and use the arrow button and scroll down and select appropriate Android version you want to develop with such as, Android 3.2-API Level 13.
  • Now, scroll down to the box that says Skin and Click on Resolution, enter the numbers 420x580 and select Create AVD, this will create your Android Virtual Device ( emulator ), for program testing.

Monday, 15 December 2014

How to Install Android SDK? (for Windows)

The Android Developer Kit, simply named as Android SDK is what all the advance users of Android should have installed on Windows running computers. In fact this tool stands behind each developer who is working in developing and testing new apps for improving, updating or unchaining different version of the Android OS. Basically, you are dealing with some codes that will be inserted in the command prompt window and through which you will be able to interact and access the system and in built programs from your handset. Eclipse is being the language in which the codes are written. Before beginning the proper operations there should be applied some pre-requisites.
  • The Android SDK has some basic system requirement; before going any further check them by using the link from here.
  • Also, on your computer you will have to download JDK, the Java Development Kit; use the link from here.
  • Now, if you are looking forward in developing new apps for the Android OS, then, you need to download the Eclipse IDE (use the link from here) and the ADT plug-in which can be downloaded from here.
  • Install Eclipse on your PC, run the same and then go to “Window -> Android SDK -> AVD Manager”. By completing this you will be able to stay up to date with all the platforms.
  • If you don’t want to use Android SDK for developing and testing apps, you can skip the Eclipse IDE section.
You can start the installation procedure now. But, remember that this tutorial is posted only for those who have a Windows running computer. Now follow the given steps and install the Android SDK for Windows.
  1. Download the Android SDK from here and save the file on the desktop.
  2. Extract the file and place it to the root of the C driver. You should get something like “C:\ android-sdk-windows”.
  3. Go to the mentioned folder (C:\ android-sdk-windows) and open SDK manager.
  4. From there select “Android SDK Platform-tools, revision 6” along with anything else you want and start the installation procedure.
  5. Then, go to path “Available Packages -> Third party Add-ons -> Google Inc. add-ons -> check Google USB Driver package, revision 4 and install this too.
  6. You can close the manager now.
  7. Up next, on your computer click on “Start / Windows button -> Control Panel -> System proprieties”.
  8. Choose “Advance System settings” followed by “Environment Variables”.
  9. Now we will set down the variables; in order to do so, scroll down until you see “Path” – click on the same.
  10. Into the Value field, on the end of the line add the following “;C:\android-sdk-windows\platform-tools;C:\android-sdk-windows\tools”.
  11. Click “OK” and exit.
  12. Now, take your Android based device and enable the USB debugging option on it: “Settings-> Applications-> Development”.
  13. Connect your handset with the computer by using its USB cable.
  14. Install the proper drivers for your phone / tablet.
  15. Open command prompt on your computer (“Start > Run > cmd”).
  16. On the cmd window type “adb devices”.
  17. Your device should now be listed in cmd meaning that you are done.
In case you are not getting the expected outputs, then something might went wrong. Anyway, try to do the following steps to resolve the issues:
  • Right click on the “My computer” icon and then open the Device manager.
  • A yellow exclamation mark should be near the Unknown Device group.
  • Right click on ADB and select “Update Driver Software > Browse > Let me pick”.
  • Click on “Have disk > browse”.
  • Head to path “C:\android-sdk-windows\extras\google\usb_driver and choose android_winusb.inf.” and click on the Android ADB Interface.
  • Ignore the warnings if such is displayed.
  • When the installation procedure is over, re-open the cmd on your computer, type “adb devices” once more; this time everything should be working perfectly.
Now you've learned how to install Android SDK / ADB on Windows running computer. You can now install a custom ROM on your device, root or unlock its boot-loader, or why not you can even develop a new app for the Android OS.

Wednesday, 3 December 2014

Introduction to Android Developing

What is Android?

Android is the world's most popular operating system for mobile devices and tablets. It is an open source operating system, created by Google, and available to all kinds of developers with various expertise levels, ranging from rookie to professional.
(The term 'open source' sounds pretty familiar, doesn't it? Well, open-source means software with source available for modification and bound to an open source license agreement. More about open source terminology can be found here).
From a developer's perspective, Android is a Linux-based operating system for smartphones and tablets. It includes a touch screen user interface, widgets, camera, network data monitoring and all the other features that enable a cell phone to be called a smartphone. Android is a platform that supports various applications, available through the Android Play Store. The Android platform also allows end users to develop, install and use their own applications on top of the Android framework. The Android framework is licensed under the Apache License, with Android application developers holding the right to distribute their applications under their customized license.
Android is the operating system that powers more than one billion smartphones and tablets. Since these devices make our lives so sweet, each Android version is named after a dessert. Whether it's getting directions or even slicing virtual fruit, each Android release makes something new possible. Like most software, Android is released in versions. Google has also assigned names to its versions. Below are all the versions of Android released to date:

Version       Name   Device
1.0  Android Beta    Phone
1.1  Android    Phone
1.5  Cupcake    Phone
1.6  Donut    Phone
2.0/2.1   Eclair    Phone
2.2.x  Froyo    Phone
2.3.x  Gingerbread    Phone
3.0/3.1/3.2  Honeycomb    Tablet
4.0.x  Ice Cream Sandwich    Phone / Tablet
4.1/4.2/4.3  Jelly Bean    Phone / Tablet





4.4                Kit Kat                         Phone / Tablet
5.0                Lollipop                        Phone / Tablet

As we can see in the table above, various versions of Android are supported on phones and tablets. There are umpteen Android devices available in the market from manufacturers like Samsung, HTC, Motorola and others. Google itself also has phones made in conjunction with OEMs, branded as the Nexus series.

Understanding Android:

To begin development on Android even at the application level, I think it is paramount to understand the basic internal architecture. Knowing how things are arranged inside helps us understand the application framework better, so we can can design the application in a better way.
Android is an OS based on Linux. Hence, deep inside, Android is pretty similar to Linux. To begin our dive into the Android internals, let us look at an architectural diagram.

http://www.android-app-market.com/wp-content/uploads/2012/02/Android-architecture.jpg
Android Architecture Diagram
 The above diagram illustrates the Android architecture. As you can see, it is a software stack above the hardware that is provided by the OEMs. Let's start with the topmost layer, i.e., the applications.

Applications:

The diagram shows four basic apps (Home, Contacts, Phone and Browser), just to give the idea that there can be multiple apps sitting on top of Android. These apps are like any user interface you use on Android; for example, when you use a music player, the GUI on which there are buttons to play, pause, seek, etc is an application. Similarly, is an app for making calls, a camera app, and so on. All these apps are not necessarily from Google. Anyone can develop an app and make it available to everyone through Google Play Store. These apps are developed in Java, and are installed directly, without the need to integrate with Android OS.

Application Framework:

Scratching further below the applications, we reach the application framework, which application developers can leverage in developing Android applications. The framework offers a huge set of APIs used by developers for various standard purposes, so that they don't have to code every basic task.The framework consists of certain entities; major ones are:
  • Activity Manager
    This manages the activities that govern the application life cycle and has several states. An application may have multiple activities, which have their own life cycles. However, there is one main activity that starts when the application is launched. Generally, each activity in an application is given a window that has its own layout and user interface. An activity is stopped when another starts, and gets back to the window that initiated it through an activity callback.
  • Notification ManagerThis manager enables the applications to create customized alerts
  • Views
    Views are used to create layouts, including components such as grids, lists, buttons, etc.
  • Resource ManagersApplications do require external resources, such as graphics, external strings, etc. All these resources are managed by the resource manager, which makes them available in a standardized way.
  • Content Provider
    Applications also share data. From time to time, one application may need some data from another application. For example, an international calling application will need to access the user's address book. This access to another application's data is enabled by the content providers.

Libraries:

This layer holds the Android native libraries. These libraries are written in C/C++ and offer capabilities similar to the above layer, while sitting on top of the kernel. A few of the major native libraries include
  • Surface Manager: Manages the display and composting window-ing manager. - Media framework: Supports various audio and video formats and codecs including their playback and recording.
  • System C Libraries: Standard C library like libc targeted for ARM or embedded devices.
  • OpenGL ES Libraries : These are the graphics libraries for rendering 2D and 3D graphics.
  • SQLite : A database engine for Android.

Android Run-time:

The Android run-time consists of the Dalvik Virtual Machine. It is basically a virtual machine for embedded devices, which like any other virtual machine is a byte-code interpreter. When we say it is for embedded devices, it means it is low on memory, comparatively slower and runs on battery power. Besides the Dalvik Virtual Machine, it also consists of the core libraries, which are Java libraries and are available for all devices.

Kernel:

The Android OS is derived from Linux Kernel 2.6 and is actually created from Linux source, compiled for mobile devices. The memory management, process management etc. are mostly similar. The kernel acts as a Hardware Abstraction Layer between hardware and the Android software stack.

Android SDK:

As already mentioned, Android is open source and hence the source code is available for all developers. In totality it is called the Android SDK. You can download, build and work on Android in a number of different ways--it all depends on what you want to do. If your goal is to develop an Android application, you don't necessarily need to download all the source. Google recommends the Eclipse IDE, for which there is an available Android Developer Tools (ADT) plugin, through which you can install the specific SDK, create projects, launch emulators, debug, etc. To see more details of Eclipse and ADT through Android's official website for developers click here.

Twitter Delicious Facebook Digg Favorites More

 
Design by MA Technologies | Bloggerized by Computer Science Prevails