Search this blog

How to launch Activities in Android



There are a number of ways to launch an activity, these are as under:


(1) Designating a launch activity in the manifest file
(2) Launching an activity using the application context
(3) Launching a child activity from a parent activity for a result
READ MORE » How to launch Activities in Android

How to Access Other Application Functionality by using Contexts


In Android with the help of application context you can do alot , an application context allows you to the following



 Launch Activity instances
 Retrieve assets packaged with the application
 Request a system-level service provider (for example, location service)
 Manage private application files, directories, and databases
 Inspect and enforce application permissions
READ MORE » How to Access Other Application Functionality by using Contexts

How to access Application Preferences in Android



Android provides you to retrieve shared application preferences by using the getSharedPreferences() method of the application context. You can use the SharedPreferences class to save simple application data, such as configuration settings.

You can give each SharedPreferences object a name, allowing you can organize preferences into categories or store preferences all together in one large set.


For example, you might want to keep track of each user’s name and some simple game state information, such as whether the user has credits left to play. The given below code creates a set of shared preferences called gampre and saves a few such preferences:

SharedPreferences settings = getSharedPreferences(“gampre”, MODE_PRIVATE);
SharedPreferences.Editor prefEditor = settings.edit();
prefEditor.putString(“UserName”, “Spunky”);
prefEditor.putBoolean(“HasCredits”, true);
prefEditor.commit();

Now to retrieve preference settings, you simply retrieve SharedPreferences and read the desired values back out:

SharedPreferences settings = getSharedPreferences(“gampre”, MODE_PRIVATE);
String userName = settings.getString(“UserName”, “Chippy Jr. (Default)”);


READ MORE » How to access Application Preferences in Android

Useful android SDK tools and utilities

There are a number of tools and a number of other special-purpose utilities that are included with the Android SDK:

Their detail is given below:

Android Hierarchy Viewer—Allows developers to inspect application user interface components such as View Properties while the application is running.

 Draw 9-Patch tool—Helps developers design stretchable PNG files.

 AIDL Compiler—Helps developers create remote interfaces to facilitate interprocess
communication (IPC) on the Android platform.

 mksdcard command-line utility—Allows developers to create stand-alone SD
card images for use within AVDs and the emulator.
READ MORE » Useful android SDK tools and utilities

What are the Limitations of android emulator?

The Android emulator is a convenient tool to develop the application without a real handset , but it has many  limitations which are as under:

(1) The emulator is not a device. It simulates general handset behavior, not specific hardware implementations.

(2)Sensor data, such as satellite location information, battery and power settings, and network connectivity, are all simulated using your computer.

 (3)Peripherals such as camera hardware are not fully functional.

 (4)Phone calls cannot be placed or received but are simulated. SMS messages are also simulated and do not use a real network.

(5)No USB or Bluetooth support is available.

(6)Using Android emulator is not a substitute for testing on a true target handset or device.
READ MORE » What are the Limitations of android emulator?

How to Take Screen Capture with android emulator

You can also take screen shot in android but the screenshot feature is particularly useful when used with true handsets. To take a screen capture, follow these steps:

1. In DDMS, choose the device (or emulator) you want a screenshot of.

2. On that device or emulator, make sure you have the screen you want, navigate to it, if necessary.

3. Choose the multicolored square picture icon to take a screen capture.

This launches a capture screen dialog.

4. Within the capture screen, click Save to save the screenshot to your local hard drive.
READ MORE » How to Take Screen Capture with android emulator

How to simulate an Incoming SMS to an android Emulator

You can simulate incoming SMS messages by using the DDMS Emulator DDMS (see
Figure below). You send an SMS much as you initiate a voice call.







READ MORE » How to simulate an Incoming SMS to an android Emulator

How to simulate an Incoming Call to an android Emulator


To simulate an incoming call to an emulator running on your machine, follow these
steps:
1. In DDMS, choose the emulator you want to call.
2. On the Emulator Control tab, input the incoming phone number (for example,
5551212) in the Telephony Actions section.
3. Select the Voice radio button.
4. Click the Call button.
5. In the emulator, you should see an incoming call. Answer the call by clicking
the Send button in the emulator.
6. End the call at any time by clicking the End button in the emulator or by clicking the Hang Up button on the DDMS Emulator Control tab.
READ MORE » How to simulate an Incoming Call to an android Emulator

Google introduces two step verification to improve the security

If you’re a Gmail user and using other great web services that Google Offers you might be concerned about your privacy and safety, but now  Google decided to increase its security and has introduced with two-step verification for its users.




the above picture shows the two step verification.

Hence finished your privacy concerns.

If you’re concerned that one can get your login details and access your Google information, the two-step verification might be the right thing for you. In order to log in with two-step verification, you have to type your login details and after that, you need to type a special code that is sent to you as a SMS.











READ MORE » Google introduces two step verification to improve the security

How to Browse the Android File System

You can use the DDMS File Explorer to browse files and directories on the emulator or a device. You can copy files between the Android file system and your development machine by using the push  and pull  icons.




You can also delete files and directories by using the minus button or just pressing Delete. There is no confirmation for this Delete operation, nor can it be undone.



READ MORE » How to Browse the Android File System

How to Manage Tasks in Android


The top-left corner of the DDMS lists the emulators and handsets currently connected. You can select individual instances and inspect processes and threads. You can inspect threads by clicking on the device process you are interested in—for example,com.androidbook.droid1—and clicking the Update Threads button.You can also prompt garbage collection on a process and then view the heap updates by clicking the green cylinder button. Finally, you can stop a process by clicking the button that resembles a stop sign .
READ MORE » How to Manage Tasks in Android

iMovie Application for iPhone 4


Apple's iMovie app enables you to turn your videos into mini masterpieces right on the iPhone 4 then also you can  upload them to YouTube.






READ MORE » iMovie Application for iPhone 4

Fring a video chat Application for Iphone and android

The built in face time functionality in Iphone works only with Wi-fi network , but if you don't have wi-fi network then feel free and install fring application for  video chat with your lovers , similarly this application can also be installed on smart phone running android OS.

READ MORE » Fring a video chat Application for Iphone and android

ILight LED application for android

iLight LED is the best android application for finding anything in the dark!

Use the super bright camera LED!

It's usefull features are given below :
1) High intensity screen light
2) Instant activation of Flashlight
3) Easy Interface
READ MORE » ILight LED application for android

How to edit android String Resource


If you inspect the main.xml layout file of the project, you will notice that it displays
a simple layout with a single TextView control. This user interface control simply
displays a string. In this case, the string displayed is defined in the string resource
called @string/hello.
To edit the string resource called @string/hello, using the string resource editor,
follow these steps:
1. Open the strings.xml file in the resource editor.
2. Select the String called hello and note the name (hello) and value (Hello
World, DroidActivity!) shown in the resource editor.
3. Within the Value field, change the text to Hello, Dave.
4. Save the file.
If you switch to the strings.xml tab and look through the raw XML, you will notice
that two string elements are defined within a <resources> block:
<?xml version=”1.0” encoding=”utf-8”?>
<resources>
<string name=”hello”>Hello, Dave</string>
<string name=”app_name”>Droid #1</string>
</resources>
The first is the string @string/hello. The second is @string/app_name, which contains
the name label for the application. If you look at the Android manifest file
again, you will see @string/app_name used in the application configuration.
READ MORE » How to edit android String Resource

How to edit Resource Files of android project


Most Android application resources are stored under the /res subdirectory of the
project. The following subdirectories are also available:
. /drawable-ldpi, /drawable-hdpi, /drawable-mdpi—These subdirectories
store graphics and drawable resource files for different screen densities and
resolutions. If you browse through these directories using the Eclipse Project
Explorer, you will find the icon.png graphics file in each one; this is your
application’s icon. You’ll learn more about the difference between these directories
in Hour 20, “Developing for Different Devices.”

. /layout—This subdirectory stores user interface layout files. Within this subdirectory
you will find the main.xml screen layout file that defines the user
interface for the default activity.


. /values—This subdirectory organizes the various types of resources, such as
text strings, color values, and other primitive types. Here you find the
strings.xml resource file, which contains all the resource strings used by the
application.
If you double-click on any of resource files, the resource editor will launch.
Remember, you can always edit the XML directly.
READ MORE » How to edit Resource Files of android project

How to edit android manifest file


Now let’s edit the Android manifest file. One setting you’re going to want to know
about is the debuggable attribute. You will not be able to debug your application
until you set this value, so follow these steps:
1. Open the AndroidManifest.xml file in the resource editor.
2. Navigate to the Application tab.
3. Pull down the drop-down for the debuggable attribute and choose true.
4. Save the manifest file.
If you switch to the AndroidManifest.xml tab and look through the XML, you will
notice that the application tag now has the debuggable attribute:
android:debuggable=”true”
READ MORE » How to edit android manifest file

Latest Television


  • Toshiba 55HT1U: This "basic" 55-inch 120 Hz LCD TV can be had for $999, which is a good price for a 55-inch LCD TV. This is a non LED model and while we haven't been too enthused about Toshiba's offerings in the recent past, if you're not a stickler for the best picture in the world, the 55HT1U appears to be a reasonable deal. However, we can't tell you if it's any better than the Vizio E550VL, which offers similar specs for the same price. (We gave the Vizio 2.5 stars in our full review of that set).


Panasonic TC-P50CR: We've noticed that a lot of folks have been looking at this 50-inch 720p plasma from Panasonic. That's because it can be had for as low as $600. While it doesn't offer 1080p, this would certainly make for a decent bedroom set (or would be fine for the playroom for the kids). Unless you're using a computer with your TV, you just won't notice much difference between 720p and 1080p, particularly if you're watching from a reasonable distance.


Samsung PN50C490: This is a 50-inch 720p 3DTV that goes for around $800. It's just not going to give you great picture quality but for someone looking at a second set for a bedroom or playroom that has 3D capabilities, this has some appeal at this price point.


Vizio Razor M470NV: This 47-inch LED-backlit LCD TV with Vizio's Internet app (it's a "connected" TV) is priced around $999 (without shipping), which is right about the lowest price you'll see for an LED backlit TV at this size and break that magic $1,000 barrier. While we haven't reviewed this model, higher-end models like the Vizio XVT3SV series have done well in our reviews lately. Note: The step-up Vizio M550NV, a 55-inch model with the same features, retails for around $1,350.


Samsung LN40C530: This 40-Inch 1080p LCD TV is 60Hz model (as opposed to 120HZ), but it looks nice cosmetically and only costs $549. We haven't reviewed it but the user opinions are very favorable and it seems well suited for bedroom or playroom duty.

READ MORE » Latest Television