Monday, December 10, 2012
Tuesday, September 04, 2012
Monday, August 13, 2012
ADT setup on Eclipse IDE on Ubuntu
Custom plugin for the Eclipse IDE, called Android Development Tools (ADT).
If you need to install Eclipse, you can download it from http://www.eclipse.org/downloads/.
Android recommend the "Eclipse Classic" version.
Download the ADT Plugin
Start Eclipse, then select Help > 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 following URL for the
Location: https://dl-ssl.google.com/android/eclipse/ >> (Click OK)
Note: 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. Click Next.
Read and accept the license agreements, then click Finish.
Note: 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 Eclipse.
Configure the ADT Plugin
After you've installed ADT and restarted Eclipse, you must specify the location of your Android SDK directory:
Select Window > Preferences... to open the Preferences panel (on Mac OS X, select Eclipse > Preferences). 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. For the SDK Location in the main panel, click Browse... and locate your downloaded Android SDK directory (such as android-sdk-windows). Click Apply, then OK.
If you haven't encountered any errors, you're done setting up ADT and can continue to the next step of the SDK installation.
Source: http://developer.android.com/guide/faq/troubleshooting.html#installeclipsecomponents
Android on Linux (Ubuntu)
First download this package a .tgz. Unpack it to a safe location on your Ubuntu machine.
Package Name: Linux (i386) >> android-sdk_r20.0.1-linux.tgz
By default, the SDK files are unpacked into a directory named android-sdk-linux_x86.
Make a note of the name and location of the SDK directory on your system—you will need to refer to the SDK directory later, when setting up the ADT plugin and when using the SDK tools from the command line.
Troubleshooting Ubuntu• If you need help installing and configuring Java on your development machine, you might find these resources helpful:o https://help.ubuntu.com/community/Javao https://help.ubuntu.com/community/JavaInstallation
- Here are the steps to install Java and Eclipse, prior to installing the Android SDK and ADT Plugin.
1. If you are running a 64-bit distribution on your development machine, you need to install the
ia32-libs package using apt-get::apt-get install ia32-libs
2. Next, install Java: apt-get install sun-java6-jdk
3. The Ubuntu package manager does not currently offer an Eclipse 3.6 version for download,
so we recommend that you download Eclipse from eclipse.org (http://www.eclipse.org/
downloads/). A Java or RCP version of Eclipse is recommended.
4. Follow the steps given in previous sections to install the SDK and the ADT plugin.
• The Android SDK separates tools, platforms, and other components into packages you can download using the Android SDK Manager. The original SDK package you've downloaded includes only the SDK Tools. To develop an Android app, you also need to download at least one Android platform and the latest SDK Platform-tools. You can update and install SDK packages at any time using the Android SDK Manager. If you've used the Windows installer to install the SDK tools, you should already have the Android SDK Manager open. Otherwise, you can launch the Android SDK Manager in one of the following way.
- On Mac or Linux, open a terminal and navigate to the tools/ directory in the Android SDK, then execute android sdk.
When you open the Android SDK Manager, it automatically selects a set of recommended packages. Simply click Install to install the recommended packages. The Android SDK Manager installs the selected packages into your Android SDK environment.
The following sections describe some of the available SDK packages and more about which ones we recommend you install.Once you have installed your packages, continue to the next page.
Figure Alpha. The Android SDK Manager shows the SDK packages that are available, already installed, or for which an update is available.
Source: http://developer.android.com/sdk/installing/index.html
Tuesday, July 31, 2012
Saturday, June 30, 2012
JellyBeans, 4.1, r20 SDK is out :)
JellyBeans AKA 4.1, r20 SDK is out for users.
API level is 16, yesterday I configure it on my Ubuntu machine running Eclipse IDE.
For this upgrade I need to update my SDK (I had r18) previously changed to r20 + updation of ADT zip
And after that the Android Emulator start running on my machine.
I will update the screen-shot next week :)
JellyBeans SDK: http://developer.android.com/sdk/index.html
Thursday, May 31, 2012
New Session Track 1 (Android Basics)
How to install Android SDK on Ubuntu 11:
1.) Download this SDK for Linux (Ubuntu) http://dl.google.com/android/android-sdk_r18-linux.tgz
2.) Un-zip or extract in a folder ADK or any name.
3.) In this folder (e.g android-sdk-linux) go to "tools" and than look for " android " script.
4.) Double click on that and select "Run in Terminal"
5.) this leads to a android software downloader kind of tool UI
6.) Select SDK tools, Goolge API as main and rest on your own selection if you have some idea.
7.) That's it update the selection by selecting "Install", so here we are with updated Android SDK on Ubuntu 11 (Linux) OS.
Soon add screen-shots for better understanding, till than happy Android hunting :)
Labels:
Android,
Android framework,
basics,
Linux,
Mobile,
Open Source,
SDK,
setup,
tool
Wednesday, April 18, 2012
Android NDK
The Android NDK is a companion tool to the Android SDK that lets you build performance-critical portions of your apps in native code programming in C or C++.
For overview of Native Development Kit (C, C++) :
The native system headers, libraries that will be supported in the Android platform, starting from Android 1.5 onwards.
Tuesday, March 06, 2012
Mockito:
It lets you write beautiful tests with clean & simple API.
Mockito tests are very readable and they produce clean verification errors.
Some features:
1.) Mocks concrete classes as well as interfaces
2.) Little annotation syntax sugar - @Mock
3.) Verification errors are clean - click on stack trace to see failed verification in test; click on exception's cause to navigate to actual interaction in code. Stack trace is always clean.
4.) Allows flexible verification in order (e.g: verify in order what you want, not every single interaction)
5.) Supports exact-number-of-times and at-least-once verification
6.) Flexible verification or stubbing using argument matchers (anyObject(), anyString() or refEq() for reflection-based equality matching)
7.) Allows creating custom argument matchers or using existing hamcrest matchers
Distribution:
Single-jar distribution includes cglib, objenesis and source code
Zip distribution contains all jars, javadoc and source code
1.) Mocks concrete classes as well as interfaces
2.) Little annotation syntax sugar - @Mock
3.) Verification errors are clean - click on stack trace to see failed verification in test; click on exception's cause to navigate to actual interaction in code. Stack trace is always clean.
4.) Allows flexible verification in order (e.g: verify in order what you want, not every single interaction)
5.) Supports exact-number-of-times and at-least-once verification
6.) Flexible verification or stubbing using argument matchers (anyObject(), anyString() or refEq() for reflection-based equality matching)
7.) Allows creating custom argument matchers or using existing hamcrest matchers
Distribution:
Single-jar distribution includes cglib, objenesis and source code
Zip distribution contains all jars, javadoc and source code
Thursday, March 01, 2012
Working with Android Test Projects:
The testing framework has these key features:
- Android test suites are based on JUnit. You can use plain JUnit to test a class that doesn't call the Android API, or Android's JUnit extensions to test Android components. If you're new to Android testing, you can start with general-purpose test case classes such as
AndroidTestCaseand then go on to use more sophisticated classes. - The Android JUnit extensions provide component-specific test case classes. These classes provide helper methods for creating mock objects and methods that help you control the lifecycle of a component.
- Test suites are contained in test packages that are similar to main application packages, so you don't need to learn a new set of tools or techniques for designing and building tests.
- The SDK tools for building and tests are available in Eclipse with ADT, and also in command-line form for use with other IDES. These tools get information from the project of the application under test and use this information to automatically create the build files, manifest file, and directory structure for the test package.
- The SDK also provides monkeyrunner, an API testing devices with Python programs, and UI/Application Exerciser Monkey, a command-line tool for stress-testing UIs by sending pseudo-random events to a device.
Wednesday, August 31, 2011
Unit Tests Android :
Test parts of the application in isolation with little connection to the underlying system.
In such cases we have to select a base class that is high enough in the hierarchy to remove some of the dependencies but not high enough for us to be responsible for some of the basic infrastructure.
The candidate base class in this case is possibly AndroidTestCase.
For example: Android CTS test suite (http://source.android.com/compatibility/cts-intro.html)
Its a group (batch) of unit tests for H/W devices on which Android OS planned to be shipped.
It shows the basic compatibility of H/W to run Android OS.
Next step is to run Android CTS unit test, will shared in next session how to run CTS on emulator or Android device.
Monday, July 11, 2011
Android Sandbox:
A sandbox is a testing environment that isolates untested code changes and outright experimentation from the production environment or repository, in the context of software development including Web development and revision control. Sandboxing protects "live" servers and their data, vetted source code distributions, and other collections of code, data and/or content, proprietary or public, from changes that could be damaging (regardless of the intent of the author of those changes) to a mission-critical system or which could simply be difficult to revert.
Sandboxes replicate at least the minimal functionality needed to accurately test the programs or other code under development (e.g. usage of the same environment variables as, or access to an identical database to that used by, the stable prior implementation intended to be modified; there are many other possibilities, as the specific functionality needs vary widely with the nature of the code and the application[s] for which it is intended.)
Tuesday, April 26, 2011
Are the processors 64-bit on Ubuntu?
A 64-bit processor will have lm ("long mode") in the flags section of cpuinfo. A 32-bit processor will not.
e.g.,
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8legacy ts fid vid ttp tm stc
e.g.,
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8legacy ts fid vid ttp tm stc
--------------------------------------------------
Are the processors dual-core (or multi-core)?
$ grep 'cpu cores' /proc/cpuinfo
cpu cores : 2
cpu cores : 2
cpu cores : 2
cpu cores : 2
"2" indicates the two physical processors are dual-core, resulting in 4 virtual processors.
If "1" was returned, the two physical processors are single-core. If the processors are single-core, and the number of virtual processors is greater than the number of physical processors, the CPUs are using hyper-threading. Hyper-threading is supported if ht is present in the CPU flags and you are using an SMP kernel.
cpu cores : 2
cpu cores : 2
cpu cores : 2
cpu cores : 2
"2" indicates the two physical processors are dual-core, resulting in 4 virtual processors.
If "1" was returned, the two physical processors are single-core. If the processors are single-core, and the number of virtual processors is greater than the number of physical processors, the CPUs are using hyper-threading. Hyper-threading is supported if ht is present in the CPU flags and you are using an SMP kernel.
----------------------------------------------
CPU Information:
cat /proc/cpuinfo
-----------------------------------------------
Installing Eclipse and the Android SDK (Ubuntu 8.04/8.10):
http://androidforums.com/developer-101/2321-installing-eclipse-android-sdk-ubuntu-8-04-8-10-a.html
Tuesday, December 07, 2010
MonkeyRunner Testing on Android - Kapil Sharma
The android monkeyrunner tool provides an API for writing programs that control an Android device or emulator from outside of Android code.
With monkeyrunner, you can write a Python program that installs an Android application or test package, runs it, sends keystrokes to it, takes screenshots of its user interface, and stores screenshots on the workstation.
The monkeyrunner tool is primarily designed to test applications and devices at the functional/framework level and for running unit test suites, but you are free to use it for other purposes.
With monkeyrunner, you can write a Python program that installs an Android application or test package, runs it, sends keystrokes to it, takes screenshots of its user interface, and stores screenshots on the workstation.
The monkeyrunner tool is primarily designed to test applications and devices at the functional/framework level and for running unit test suites, but you are free to use it for other purposes.
The monkeyrunner tool is not related to the UI/Application Exerciser Monkey, also known as the
monkey tool. The monkey tool runs in an adb shell directly on the device or emulator and generates pseudo-random streams of user and system events. In comparison, the monkeyrunner tool controls devices and emulators from a workstation by sending specific commands and events from an API.
The monkeyrunner tool provides these unique features for Android testing:
- Multiple device control: The monkeyrunner API can apply one or more test suites across multiple devices or emulators. You can physically attach all the devices or start up all the emulators (or both) at once, connect to each one in turn programmatically, and then run one or more tests. You can also start up an emulator configuration programmatically, run one or more tests, and then shut down the emulator.
- Functional testing: monkeyrunner can run an automated start-to-finish test of an Android application. You provide input values with keystrokes or touch events, and view the results as screenshots.
- Regression testing - monkeyrunner can test application stability by running an application and comparing its output screenshots to a set of screenshots that are known to be correct.
- Extensible automation - Since monkeyrunner is an API toolkit, you can develop an entire system of Python-based modules and programs for controlling Android devices. Besides using the monkeyrunner API itself, you can use the standard Python
osandsubprocessmodules to call Android tools such as Android Debug Bridge.You can also add your own classes to the monkeyrunner API. This is described in more detail in the section Extending monkeyrunner with plugins.
The monkeyrunner tool uses Jython, a implementation of Python that uses the Java programming language. Jython allows the monkeyrunner API to interact easily with the Android framework. With Jython you can use Python syntax to access the constants, classes, and methods of the API.
Location:
Panchkula, Haryana, India
Android 2.3 SDK :
http://developer.android.com/sdk/android-2.3.html
New User Features:
1.) UI refinements for simplicity and speed
2.) Faster, more intuitive text input
3.) One-touch word selection and copy/paste
4.) Improved power management
5.) Control over applications
6.) New ways of communicating, organizing
New Developer Features
1.) Enhancements for gaming
2.) New forms of communication
3.) Rich multimedia
New Platform Technologies
1.) Media Framework
2.) New Linux Kernel
3.) New Dalvik runtime
http://developer.android.com/sdk/android-2.3.html
New User Features:
1.) UI refinements for simplicity and speed
2.) Faster, more intuitive text input
3.) One-touch word selection and copy/paste
4.) Improved power management
5.) Control over applications
6.) New ways of communicating, organizing
New Developer Features
1.) Enhancements for gaming
2.) New forms of communication
3.) Rich multimedia
New Platform Technologies
1.) Media Framework
2.) New Linux Kernel
3.) New Dalvik runtime
Tuesday, June 08, 2010
Apps on sdcard -- can't install apps anymore: Tips for installation.
Try this trick:
kash@ubuntu:- /xyz$ adb shell
# cd system/app
# exit
kash@ubuntu:- /xyz$ adb install kash.apk
And the the .apk installed on Android device.
Monday, May 24, 2010
Android Froyo 2.2 SDK release.
Froyo >> 2.2 New SDK
1.) Dalvik JIT, improve CPU performance 2-5 times
2.) V8 JavaScript engine, improve browser JavaScript performance by 2-3 times
3.) 3G tethering via USB and Wifi
4.) New camera UI for controlling zoom, flash, white balance, geo-tagging, focus and exposure.
5.) Microsoft exchange support, incl remote wipe
6.) Bluetooth: share contacts, voice dialing
7.) Android market: app crash/freeze report, auto app update
8.) App2SD
9.) Option for automatic app data backup
10.) Android Cloud to Device Messaging
11.) Supports Macromedia Flash 10.1
12.) Enable/disable data access over Mobile network
13.) Multiple keyboard languages
14.) Voice recognition for 7 dialects of English, Mandarin Chinese, and Japanese
15.) PIN screen lock
Subscribe to:
Posts (Atom)


