Sunday, 23 December 2012

Untag yourself from facebook pictures at once

For those annoyed by your slly friends thoughtlessly tagging you in pictures of trees, animals or scenery on Facebook, it's time to heave a sigh of relief! The new privacy policy introduced by facebook yesterday promises to make privacy matters simpler for the user.

The new tool - Request and Removal tool lets users untag multiple photos at once. Users can see this tool in the updated Activity Log.




Here is how you can take actions on multiple photos you are tagged in -
>Go to your Timeline
> click the Activity Log button on your timeline, under your cover photo
> Click on photos link on the left
> and select multiple photos you want to take actions on.
>Users can either ask friends to take down the shots they don't like - they can even include a message about why this is important to you, or they can use the tool to untag multiple photos at once, keeping in mind that while untagged photos don't appear on your timeline, they can still appear in other places on Facebook, such as search, news feed, or your friends' timelines.


Thursday, 13 December 2012

Google Zeitgeist: What India searched in 2012



As the year 2012 comes to an end, Google s out with their end-of-the-year lists focus on trending topics that had the highest amount of traffic over a sustained period in 2012 in India. The 'Institute of Banking and Personnel Selection' topped the search charts. This year's Google Zeitgeist includes the top trending searches for gadgets, people, events and Google+ hashtags in India.

Trending searches


The popular banking examination, IBPS topped India's trending searches list for 2012, followed by GATE engineering entrance exam.The other top searches were Sunny Leone, Ek tha Tiger, Rowdy Rathore.
  1. IBPS
  2. GATE Exams
  3. Sunny Leone
  4. Ek Tha Tiger
  5. Rowdy Rathore
  6. CBSE
  7. Rajesh Khanna
  8. Aakash Tablet
  9. HDFC
  10. Jabong

Trending People



When it comes to people, the newly turned actress Sunny Leone has captured the hearts of people to become the most searched person in India even crossing the likes of Rajesh Khanna and Poonam Pandey.
  1. Sunny Leone
  2. Rajesh Khanna
  3. Poonam Pandey
  4. Alia Bhatt
  5. Nirmal Baba
  6. Sherlyn Chopra
  7. Yash Chopra
  8. Saif Ali Khan
  9. Diana Penty
  10. Vilasrao Deshmukh

Most Searched Movies


Salman Khan-starrer Ek Tha Tiger has emerged as the most searched movie online in the country, while Akshay Kumar's Rowdy Rathore was second.
  1. Ek Tha Tiger
  2. Rowdy Rathore
  3. Jannat 2
  4. Housefull 2
  5. Raaz 3
  6. Jism 2
  7. Barfi
  8. Ishaqzaade
  9. Agent Vinod
  10. Vicky Donor

Most Searched News


The volatile stock market helped the Sensex to become the most searched news item, while the demise of former Maharashtra Chief Minister Vilasrao Deshmukh was second in the list. Anna Hazare‘s campaigns lost steam this year, ranking fourth, behind Hurricane Sandy in the US. Controversies surrounding Aseem Trivedi’s cartoons, Abhishek Manu Singhvi’s videos and crisis at Kingfisher Airlines also ranked high in the list.
  1. Sensex
  2. Vilasrao Deshmukh Death
  3. Hurricane Sandy
  4. Anna Hazare
  5. Aseem Trivedi Cartoons
  6. Abhishek Manu Singhvi
  7. Kingfisher Airlines
  8. Earthquake in Chennai
  9. Pranab Mukharjee President
  10. Rajesh Khanna Death


Wednesday, 12 December 2012

Google I/O 2013

All the Google fans are requested to save the date 15-17th May for Google I/O 2013, says a tweet from Google's official account. The Google I/O developers conference, where the firm is likely to unveil Android 5.0 this year, features hghly technical, in-depth sessions focused on building web, mobile, and enterprise applications with Google and open web technologies. 






Of course, the firm has so far kept quiet about what we can expect from next year's conference, but the developers have already started speculating.

It's likely that Google will unveil the next version of its Android operating system, which is probably to be branded Android 5.0 Key Lime Pie. No idea what to expect from the next generation mobile operating system, but speculation suggests that it will feature improved support for multiple accounts and a tweaked user interface.

It is also predicted that Google will unveil a new Nexus device at the San Francisco conference, as it announced its debut tablet, the Google Nexus 7, at this year's keynote.


Wednesday, 12 September 2012

Secret Android Codes

Given that Android is open-source and user-friendly, most of the information and setting are easily available. However, there are some deep setting hidden within. Here are a list of codes that would help you know more about your device. 

1. *#*#4636#*#*
This code can be used to get some interesting information about your phone and battery. It shows following 4 menus on screen:
  • Phone information
  • Battery information
  • Battery history
  • Usage statistics
2. *#*#7780#*#*
This code can be used for a factory data reset. It’ll remove following things:
  • Google account settings stored in your phone
  • System and application data and settings
  • Downloaded applications
It’ll NOT remove:
  • Current system software and bundled applications
  • SD card files e.g. photos, music files, etc.
PS: Once you give this code, you get a prompt screen asking you to click on “Reset phone” button. So you get a chance to cancel your operation.
3. *2767*3855#
Think before you give this code. This code is used for factory format. It’ll remove all files and settings including the internal memory storage. It’ll also reinstall the phone firmware.
PS: Once you give this code, there is no way to cancel the operation unless you remove the battery from the phone. So think twice before giving this code.
4. *#*#34971539#*#*
This code is used to get information about phone camera. It shows following 4 menus:
  • Update camera firmware in image (Don’t try this option)
  • Update camera firmware in SD card
  • Get camera firmware version
  • Get firmware update count
WARNING: Never use the first option otherwise your phone camera will stop working and you’ll need to take your phone to service center to reinstall camera firmware.
5. *#*#7594#*#*
This one is my favorite one. This code can be used to change the “End Call / Power” button action in your phone. Be default, if you long press the button, it shows a screen asking you to select any option from Silent mode, Airplane mode and Power off.
You can change this action using this code. You can enable direct power off on this button so you don’t need to waste your time in selecting the option.
6. *#*#197328640#*#*
This code can be used to enter into Service mode. You can run various tests and change settings in the service mode
7. WLAN, GPS and Bluetooth Test Codes:
*#*#232339#*#* OR *#*#526#*#* OR *#*#528#*#* – WLAN test (Use “Menu” button to start various tests)
*#*#232338#*#* – Shows WiFi MAC address
*#*#1472365#*#* – GPS test
*#*#1575#*#* – Another GPS test
*#*#232331#*#* – Bluetooth test
*#*#232337#*# – Shows Bluetooth device address
8. *#*#8255#*#* => This code can be used to launch GTalk Service Monitor.
9. Codes to get Firmware version information:
*#*#4986*2650468#*#* – PDA, Phone, H/W, RFCallDate
*#*#1234#*#* – PDA and Phone
*#*#1111#*#* – FTA SW Version
*#*#2222#*#* – FTA HW Version
*#*#44336#*#* – PDA, Phone, CSC, Build Time, Changelist number
10. Codes to launch various Factory Tests:
*#*#0283#*#* – Packet Loopback
*#*#0*#*#* – LCD test
*#*#0673#*#* OR *#*#0289#*#* – Melody test
*#*#0842#*#* – Device test (Vibration test and BackLight test)
*#*#2663#*#* – Touch screen version
*#*#2664#*#* – Touch screen test
*#*#0588#*#* – Proximity sensor test
*#*#3264#*#* – RAM version
11. To get to a File copy screen for backing up your images, videos, voice memos, and other media files, type in *#*#273283*255*663282*#*#*
12. If you want to change default actions for the End Call and Power button, punch in *#*#7594#*#* and change those settings.
13. Android also supports the Service Mode, invoked with the *#*#197328640#*#*code, that lets you run tests related to the WiFi, Bluetooth, and GPS circuitry. Other factory tests include LCD (*#*#0*#*#*), vibration and backlight (*#*#0842#*#*), touchscreen (*#*#2664#*#*), RAM (*#*#3264#*#*), proximity sensor (*#*#0588#*#*), and more.
14. Voice Dialer Logging Enabled => *#*#8351#*#*
15. PUK Unlock (from emergency dial screen)
**05*<PUK Code>*<enter a new pin>*<confirm the new pin>#

Monday, 21 March 2011

GRAPHICS


Android graphics are powered by a custom 2D graphics library and OpenGL ES 1.0 for high performance 3D graphics. The most common 2D graphics APIs can be found in the drawable package. OpenGL APIs are available from the Khronos OpenGL ES package, plus some Android OpenGL utilities.
When starting a project, it's important to consider exactly what your graphical demands will be. Varying graphical tasks are best accomplished with varying techniques. For example, graphics and animations for a rather static application should be implemented much differently than graphics and animations for an interactive game or 3D rendering.
Here, we'll discuss a few of the options you have for drawing graphics on Android, and which tasks they're best suited for.
If you're specifically looking for information on drawing 3D graphics, this page won't help a lot. However, the information below, on Drawing with a Canvas(and the section on SurfaceView), will give you a quick idea of how you should draw to the View hierarchy. For more information on Android's 3D graphic utilities (provided by the OpenGL ES API), read 3D with OpenGL and refer to other OpenGL documentation.

Consider your Options

When drawing 2D graphics, you'll typically do so in one of two ways:
  1. Draw your graphics or animations into a View object from your layout. In this manner, the drawing (and any animation) of your graphics is handled by the system's normal View hierarchy drawing process — you simply define the graphics to go inside the View.
  2. Draw your graphics directly to a Canvas. This way, you personally call the appropriate class's draw() method (passing it your Canvas), or one of the Canvas draw...() methods (like drawPicture()). In doing so, you are also in control of any animation.
Option "a," drawing to a View, is your best choice when you want to draw simple graphics that do not need to change dynamically and are not part of a performance-intensive game. For example, you should draw your graphics into a View when you want to display a static graphic or predefined animation, within an otherwise static application. Read Simple Graphics Inside a View.
Option "b," drawing to a Canvas, is better when you're application needs to regularly re-draw itself. Basically, any video game should be drawing to the Canvas on its own. However, there's more than one way to do this:
  • In the same thread as your UI Activity, wherein you create a custom View component in your layout, call invalidate() and then handle the onDraw() callback..
  • Or, in a separate thread, wherein you manage a SurfaceView and perform draws to the Canvas as fast as your thread is capable (you do not need to request invalidate()).
...Begin by reading Draw with a Canvas.

Simple Graphics Inside a View

If you'll be drawing some simple graphics (images, shapes, colors, pre-defined animations, etc.), then you should probably just draw to the background of a View or to the content of an ImageView in your layout. In this case, you can skip the rest of this document and learn how to draw graphics and animations in the 2D Graphics document.

Draw with a Canvas

When you're writing an application in which you would like to perform specialized drawing and/or control the animation of graphics, you should do so by drawing through a Canvas. A Canvas works for you as a pretense, or interface, to the actual surface upon which your graphics will be drawn — it holds all of your "draw" calls. Via the Canvas, your drawing is actually performed upon an underlying Bitmap, which is placed into the window.
In the event that you're drawing within the onDraw() callback method, the Canvas is provided for you and you need only place your drawing calls upon it. You can also acquire a Canvas from SurfaceHolder.lockCanvas(), when dealing with a SurfaceView object. (Both of these scenarios are discussed in the following sections.) However, if you need to create a new Canvas, then you must define the Bitmap upon which drawing will actually be performed. The Bitmap is always required for a Canvas. You can set up a new Canvas like this:
Bitmap b = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(b);
Now your Canvas will draw onto the defined Bitmap. After drawing upon it with the Canvas, you can then carry your Bitmap to another Canvas with one of the Canvas.drawBitmap(Bitmap,...) methods. It's recommended that you ultimately draw your final graphics through a Canvas offered to you by View.onDraw() or SurfaceHolder.lockCanvas() (see the following sections).
The Canvas class has its own set of drawing methods that you can use, like drawBitmap(...), drawRect(...), drawText(...), and many more. Other classes that you might use also have draw() methods. For example, you'll probably have some Drawable objects that you want to put on the Canvas. Drawable has its own draw() method that takes your Canvas as an arguement.

On a View

If you're application does not require a significant amount of processing or frame-rate speed (perhaps for a chess game, a snake game, or another slowly-animated application), then you should consider creating a custom View component and drawing with a Canvas in View.onDraw(). The most convenient aspect of doing so is that the Android framework will provide you with a pre-defined Canvas to which you will place your drawing calls.
To start, extend the View class (or descendent thereof) and define the onDraw() callback method. This method will be called by the Android framework to request that your View draw itself. This is where you will perform all your calls to draw through the Canvas, which is passed to you through the onDraw() callback.
The Android framework will only call onDraw() as necessary. Each time that your application is prepared to be drawn, you must request your View be invalidated by calling invalidate(). This indicates that you'd like your View to be drawn and Android will then call your onDraw() method (though is not guaranteed that the callback will be instantaneous).
Inside your View component's onDraw(), use the Canvas given to you for all your drawing, using various Canvas.draw...() methods, or other class draw()methods that  take your Canvas as an argument. Once your onDraw() is complete, the Android framework will use your Canvas to draw a Bitmap handled by the system.
Note: In order to request an invalidate from a thread other than your main Activity's thread, you must call postInvalidate().
Also read Building Custom Components for a guide to extending a View class, and 2D Graphics: Drawables for information on using Drawable objects like images from your resources and other primitive shapes.
For a sample application, see the Snake game, in the SDK samples folder: <your-sdk-directory>/samples/Snake/.

On a SurfaceView

The SurfaceView is a special subclass of View that offers a dedicated drawing surface within the View hierarchy. The aim is to offer this drawing surface to an application's secondary thread, so that the application isn't required to wait until the system's View hierarchy is ready to draw. Instead, a secondary thread that has reference to a SurfaceView can draw to its own Canvas at its own pace.
To begin, you need to create a new class that extends SurfaceView. The class should also implement SurfaceHolder.Callback. This subclass is an interface that will notify you with information about the underlying Surface, such as when it is created, changed, or destroyed. These events are important so that you know when you can start drawing, whether you need to make adjustments based on new surface properties, and when to stop drawing and potentially kill some tasks. Inside your SurfaceView class is also a good place to define your secondary Thread class, which will perform all the drawing procedures to your Canvas.
Instead of handling the Surface object directly, you should handle it via a SurfaceHolder. So, when your SurfaceView is initialized, get the SurfaceHolder by calling getHolder(). You should then notify the SurfaceHolder that you'd like to receive SurfaceHolder callbacks (from SurfaceHolder.Callback) by callingaddCallback() (pass it this). Then override each of the SurfaceHolder.Callback methods inside your SurfaceView class.
In order to draw to the Surface Canvas from within your second thread, you must pass the thread your SurfaceHandler and retrieve the Canvas with lockCanvas(). You can now take the Canvas given to you by the SurfaceHolder and do your necessary drawing upon it. Once you're done drawing with the Canvas, call unlockCanvasAndPost(), passing it your Canvas object. The Surface will now draw the Canvas as you left it. Perform this sequence of locking and unlocking the canvas each time you want to redraw.
Note: On each pass you retrieve the Canvas from the SurfaceHolder, the previous state of the Canvas will be retained. In order to properly animate your graphics, you must re-paint the entire surface. For example, you can clear the previous state of the Canvas by filling in a color with drawColor() or setting a background image with drawBitmap(). Otherwise, you will see traces of the drawings you previously performed.
For a sample application, see the Lunar Landar game, in the SDK samples folder: <your-sdk-directory>/samples/LunarLander/. Or, browse the source in the Sample Code section.

Saturday, 11 December 2010

Getting your Eclipse IDE ready to develop Android apps

The Android Development Tools (ADT) plugin for Eclipse adds powerful extensions to the Eclipse integrated development environment. It allows you to create and debug Android applications easier and faster. If you use Eclipse, the ADT plugin gives you an incredible boost in developing Android applications:
  • It gives you access to other Android development tools from inside the Eclipse IDE. For example, ADT lets you access the many capabilities of the DDMS tool: take screenshots, manage port-forwarding, set breakpoints, and view thread and process informationd irectly from Eclipse.
  • It provides a New Project Wizard, which helps you quickly create and set up all of the basic files you'll need for a new Android application.
  • It automates and simplifies the process of building your Android application.
  • It provides an Android code editor that helps you write valid XML for your Android manifest and resource files.
  • It will even export your project into a signed APK, which can be distributed to users.
To begin developing Android applications in the Eclipse IDE with ADT, you first need to download the Eclipse IDE and then download and install the ADT plugin. To do so, follow the steps given in Installing the ADT Plugin.
If you are already developing applications using a version of ADT earlier than 0.9, make sure to upgrade to the latest version before continuing. See the guide to Updating Your Eclipse ADT Plugin.

Creating an Android Project

The ADT plugin provides a New Project Wizard that you can use to quickly create a new Android project (or a project from existing code). To create a new project:
  1. Select File > New > Project.
  2. Select Android > Android Project, and click Next.
  3. Select the contents for the project:
    • Enter a Project Name. This will be the name of the folder where your project is created.
    • Under Contents, select Create new project in workspace. Select your project workspace location.
    • Under Target, select an Android target to be used as the project's Build Target. The Build Target specifies which Android platform you'd like your application built against.Unless you know that you'll be using new APIs introduced in the latest SDK, you should select a target with the lowest platform version possible, such as Android 1.1.
      Note: You can change your the Build Target for your project at any time: Right-click the project in the Package Explorer, select Properties, select Android and then check the desired Project Target.
    • Under Properties, fill in all necessary fields.
      • Enter an Application name. This is the human-readable title for your application — the name that will appear on the Android device.
      • Enter a Package name. This is the package namespace (following the same rules as for packages in the Java programming language) where all your source code will reside.
      • Select Create Activity (optional, of course, but common) and enter a name for your main Activity class.
      • Enter a Min SDK Version. This is an integer that indicates the minimum API Level required to properly run your application. Entering this here automatically sets the minSdkVersion attribute in the <uses-sdk> of your Android Manifest file. If you're unsure of the appropriate API Level to use, copy the API Level listed for the Build Target you selected in the Target tab.
  4. Click Finish.
Tip: You can also start the New Project Wizard from the New icon in the toolbar.
Once you complete the New Project Wizard, ADT creates the following folders and files in your new project:
src/
Includes your stub Activity Java file. All other Java files for your application go here.
<Android Version>/ (e.g., Android 1.1/)
Includes the android.jar file that your application will build against. This is determined by the build target that you have chosen in the New Project Wizard.
gen/
This contains the Java files generated by ADT, such as your R.java file and interfaces created from AIDL files.
assets/
This is empty. You can use it to store raw asset files. See Resources and Assets.
res/
A folder for your application resources, such as drawable files, layout files, string values, etc. See Resources and Assets.
AndroidManifest.xml
The Android Manifest for your project. See The AndroidManifest.xml File.
default.properties
This file contains project settings, such as the build target. This files is integral to the project, as such, it should be maintained in a Source Revision Control system. It should never be edited manually — to edit project properties, right-click the project folder and select "Properties".

Running Your Application

Wait! Before you can run your application on the Android Emulator, you must create an Android Virtual Device (AVD). An AVD is a configuration that specifies the Android platform to be used on the emulator. You can read more in the Android Virtual Devices document, but if you just want to get started, follow the simple guide below to create an AVD.
If you will be running your applications only on actual device hardware, you do not need an AVD — see Developing On a Device for information on running your applicaiton.

Creating an AVD

To avoid some explanation that's beyond the scope of this document, here's the basic procedure to create an AVD:
  1. Open a command-line (e.g.,"Command Prompt" application on Windows, or "Terminal" on Mac/Linux) and navigate to your SDK package's tools/ directory.
  2. First, you need to select a Deployment Target. To view available targets, execute:
    android list targets
    This will output a list of available Android targets, such as:
    id:1
        Name: Android 1.1
        Type: platform
        API level: 2
        Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
    id:2
        Name: Android 1.5
        Type: platform
        API level: 3
        Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
    
    Find the target that matches the Android platform upon which you'd like to run your application. Note the integer value of the id — you'll use this in the next step.
  3. Create a new AVD using your selected Deployment Target. Execute:
    android create avd --name <your_avd_name> --target <targetID>
  4. Next, you'll be asked whether you'd like to create a custom hardware profile. If you respond "yes," you'll be presented with a series of prompts to define various aspects of the device hardware (leave entries blank to use default values, which are shown in brackets). Otherwise, press return to use all default values ("no" is the default).
That's it; your AVD is ready. In the next section, you'll see how the AVD is used when launching your application on an emulator.
To learn more about creating and managing AVDs, please read the Android Virtual Devices documentation.

Running your application

Note: Before you can run your application, be sure that you have created an AVD with a target that satisfies your application's Build Target. If an AVD cannot be found that meets the requirements of your Build Target, you will see a console error telling you so and the launch will be aborted.
To run (or debug) your application, select Run > Run (or Run > Debug) from the Eclipse main menu. The ADT plugin will automatically create a default launch configuration for the project.
When you choose to run or debug your application, Eclipse will perform the following:
  1. Compile the project (if there have been changes since the last build).
  2. Create a default launch configuration (if one does not already exist for the project).
  3. Install and start the application on an emulator or device (based on the Deployment Target defined by the run configuration).By default, Android application run configurations use an "automatic target" mode for selecting a device target. For information on how automatic target mode selects a deployment target, see Automatic and manual target modes below.
If debugging, the application will start in the "Waiting For Debugger" mode. Once the debugger is attached, Eclipse will open the Debug perspective.
To set or change the launch configuration used for your project, use the launch configuration manager. See Creating a Launch Configuration for information.

Creating a Run Configuration

The run configuration specifies the project to run, the Activity to start, the emulator options to use, and so on. When you first run a project as an Android Application, ADT will automatically create a run configuration. The default run configuration will launch the default project Activity and use automatic target mode for device selection (with no preferred AVD). If the default setting don't suit your project, you can customize the launch configuration or even create a new.
To create or modify a launch configuration, follow these steps as appropriate for your Eclipse version:
  1. Open the run configuration manager.
    • In Eclipse 3.3 (Europa), select Run > Open Run Dialog (or Open Debug Dialog)
    • In Eclipse 3.4 (Ganymede), select Run > Run Configurations (or Debug Configurations)
  2. Expand the Android Application item and create a new configuration or open an existing one.
    • To create a new configuration:
      1. Select Android Application and click the New launch configuration icon above the list (or, right-click Android Application and clickNew).
      2. Enter a Name for your configuration.
      3. In the Android tab, browse and select the project you'd like to run with the configuration.
    • To open an existing configuration, select the configuration name from the list nested below Android Application.
  3. Adjust your desired launch configuration settings.In the Target tab, consider whether you'd like to use Manual or Automatic mode when selecting an AVD to run your application. See the following section on Automatic and manual target modes).

Automatic and manual target modes

By default, a run configuration uses the automatic target mode in order to select an AVD. In this mode, ADT will select an AVD for the application in the following manner:
  1. If there's a device or emulator already running and its AVD configuration meets the requirements of the application's build target, the application is installed and run upon it.
  2. If there's more than one device or emulator running, each of which meets the requirements of the build target, a "device chooser" is shown to let you select which device to use.
  3. If there are no devices or emulators running that meet the requirements of the build target, ADT looks at the available AVDs. If one meets the requirements of the build target, the AVD is used to launch a new emulator, upon which the application is installed and run.
  4. If all else fails, the application will not be run and you will see a console error warning you that there is no existing AVD that meets the build target requirements.
However, if a "preferred AVD" is selected in the run configuration, then the application will always be deployed to that AVD. If it's not already running, then a new emulator will be launched.
If your run configuration uses manual mode, then the "device chooser" is presented every time that your application is run, so that you can select which AVD to use.

Signing your Applications

As you begin developing Android applications, understand that all Android applications must be digitally signed before the system will install them on an emulator or an actual device. There are two ways to do this: with a debug key (for immediate testing on an emulator or development device) or with a private key (for application distribution).
The ADT plugin helps you get started quickly by signing your .apk files with a debug key, prior to installing them on an emulator or development device. This means that you can quickly run your application from Eclipse without having to generate your own private key. No specific action on your part is needed, provided ADT has access to Keytool.However, please note that if you intend to publish your application, you must sign the application with your own private key, rather than the debug key generated by the SDK tools.
Please read Signing Your Applications, which provides a thorough guide to application signing on Android and what it means to you as an Android application developer. The document also includes a guide to exporting and signing your application with the ADT's Export Wizard.