Friday, 27 May 2011

iChromy: A Chrome-like Browser for the iPad

Have you ever wanted a Chrome browser for the iPad? A simple browser with tab support and great peformance? Well since Google probably can't create one, check out iChromy on the app store. It is a simple, functional and fast web browser with tab support. I would prefer it had a toolbar of bookmarks, but the drop down menu it uses works quite well.



Check it out. The App is free.



iChromy: An Alternative iPad Browser With Chrome Envy

Thursday, 26 May 2011

Prisoners Forced to Play World of Warcraft

Internet IconThink you have it bad at your job? Or maybe you think your parents are too tough on you? Think again.



Check out this story from China. After doing hard labor all day, prisoners at a labor camp were forced to play World of Warcraft to make virtual Gold. The prisoners were assigned quotas and if they failed to meet them, they were beaten. Kinda takes all the fun out of the game! And you thought your last pick up group was bad! Anyway, not sure I will ever report a Gold farmer again after reading these stories.



Chinese Prisoners Forced to Farm Gold in Online Games

Chinese Prisoners Allegedly Forced to Play 'World of Warcraft' | PCWorld

Start Bluetooth Discoverable and register BroadcastReceiver for ACTION_SCAN_MODE_CHANGED

To enable Bluetooth Discoverable, we can start activity with intent of BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE. we can also provide expected discoverable duration via Extra.

To monitor the scan mode change in Bluetooth device, we can register our BroadcastReceiver for BluetoothAdapter.ACTION_SCAN_MODE_CHANGED. The BroadcastReceiver have t be unregister in onDestroy().

Here is a exercise to Start Bluetooth Discoverable.

Start Bluetooth Discoverable and register BroadcastReceiver for ACTION_SCAN_MODE_CHANGED

AndroidBluetooth.java
package com.exercise.AndroidBluetooth;

import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;

public class AndroidBluetooth extends Activity {

private static final int REQUEST_ENABLE_BT = 1;
private static final int REQUEST_Turn_On_Discoverable = 3;

Spinner spnDiscoverableDuration;
Button btnTurnOnDiscoverable;
TextView stateBluetooth;
BluetoothAdapter bluetoothAdapter;

String[] optDiscoverableDur = {"10 sec", "60 sec", "120 sec", "240 sec", "300 sec"};
int[] valueDiscoverableDur = {10, 60, 120, 240, 300};

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

spnDiscoverableDuration = (Spinner)findViewById(R.id.discoverableduration);
btnTurnOnDiscoverable = (Button)findViewById(R.id.turnondiscoverable);

stateBluetooth = (TextView)findViewById(R.id.bluetoothstate);
bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();

CheckBlueToothState();

btnTurnOnDiscoverable.setOnClickListener(btnTurnOnDiscoverableOnClickListener);

ArrayAdapter<String> adapterDiscoverableDur = new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, optDiscoverableDur);
adapterDiscoverableDur.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spnDiscoverableDuration.setAdapter(adapterDiscoverableDur);

registerReceiver(ScanModeChangedReceiver,
new IntentFilter(BluetoothAdapter.ACTION_SCAN_MODE_CHANGED));
}

@Override
protected void onDestroy() {
// TODO Auto-generated method stub
super.onDestroy();
unregisterReceiver(ScanModeChangedReceiver);
}

private void CheckBlueToothState(){
if (bluetoothAdapter == null){
stateBluetooth.setText("Bluetooth NOT support");
}else{
if (bluetoothAdapter.isEnabled()){
if(bluetoothAdapter.isDiscovering()){
stateBluetooth.setText("Bluetooth is currently in device discovery process.");
}else{
stateBluetooth.setText("Bluetooth is Enabled.");
btnTurnOnDiscoverable.setEnabled(true);
}
}else{
stateBluetooth.setText("Bluetooth is NOT Enabled!");
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
}
}
}

private Button.OnClickListener btnTurnOnDiscoverableOnClickListener
= new Button.OnClickListener(){

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent discoverableIntent
= new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
int dur = valueDiscoverableDur[(int)spnDiscoverableDuration.getSelectedItemId()];
discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, dur);
startActivityForResult(discoverableIntent, REQUEST_Turn_On_Discoverable);
}};

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// TODO Auto-generated method stub
if(requestCode == REQUEST_ENABLE_BT){
CheckBlueToothState();
}if (requestCode == REQUEST_Turn_On_Discoverable){
if(resultCode == RESULT_OK){

}else if (resultCode == RESULT_CANCELED){
Toast.makeText(AndroidBluetooth.this,
"User Canceled",
Toast.LENGTH_LONG).show();
}
}
}

private final BroadcastReceiver ScanModeChangedReceiver = new BroadcastReceiver(){

@Override
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
String action = intent.getAction();
if(BluetoothAdapter.ACTION_SCAN_MODE_CHANGED.equals(action)) {

int mode = intent.getIntExtra(BluetoothAdapter.EXTRA_SCAN_MODE,
BluetoothAdapter.ERROR);
String strMode = "";

switch(mode){
case BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE:
strMode = "mode changed: SCAN_MODE_CONNECTABLE_DISCOVERABLE";
break;
case BluetoothAdapter.SCAN_MODE_CONNECTABLE:
strMode = "mode changed: SCAN_MODE_CONNECTABLE";
break;
case BluetoothAdapter.SCAN_MODE_NONE:
strMode = "mode changed: SCAN_MODE_NONE";
break;
}

Toast.makeText(AndroidBluetooth.this,
strMode, Toast.LENGTH_LONG).show();
}
}};

}


main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<TextView
android:id="@+id/bluetoothstate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/bluetoothstate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Set Discoverable Duration"
/>
<Spinner
android:id="@+id/discoverableduration"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<Button
android:id="@+id/turnondiscoverable"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Turn on Discoverable"
android:enabled="false"
/>
</LinearLayout>


Grant permission of "android.permission.BLUETOOTH" in AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.exercise.AndroidBluetooth"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.BLUETOOTH"></uses-permission>

<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".AndroidBluetooth"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>


Download the files.

Related:
- Get the list of paired Bluetooth devices
- Scan Bluetooth Devices

Wednesday, 25 May 2011

New Acer Aspire 5738 / 15.6 inch Notebook PC

New Acer Aspire 5738 / 15.6 inch Notebook PC
Acer has launched its new Acer Aspire 5738 notebook PC which is powered by 2.0 GHz Intel Core 2 Duo Processor and it features 15.6 inch WXGA Widescreen display, Fast DDR3 RAM, integrated Wi-Fi Wireless LAN connectivity, Bluetooth, HDMI, Dolby 5.1 stereo speakers, webcam with microphone and a 8X DVD writer.

acer-aspire-5738-notebook-pcWeighing about 2.8 kg the Acer Aspire 5738 notebook PC is powered by 2.0 GHz Intel Core 2 Duo Processor T6400 featuring 2-MB L2 cache and 800 MHz FSB.

The Acer Aspire 5738 notebook features Intel GM45 Express chipset motherboard with integrated 3D graphics, 3-GB DDR 3 SDRAM � 800 MHz (max 4-GB in 2 slots), 320-GB Serial-ATA hard disk drive (5400rpm) and 8x DVD Super Multi Double Layer DVD Writer.

The multiformat DVD writer is capable of burning both DVD+ and DVD- disc formats as well as dual-layer DVD+/-R optical discs allowing storage of up to 8.5 GB of data on each dual-sided DVD media. In addition the DVD writer can also burn 40x CD-R and 24x CD-RW medias.

Acer Aspire 5738 notebook is equipped with 15.6-inch (39.62 cm ) WXGA TFT LED backlit Wide HD display with Acer CrystalBrite Technology which offers 1366 x 768 pixels native resolution in 16:9 aspect ratio supporting simultaneous multi-window viewing via Acer GridVista 16 ms response time, powered by Intel Graphics Media Accelerator GMA 4500MHD Graphics Chipset with up to 1695-MB of shared video memory supporting Microsoft DirectX 9 Dual independent display support with 16.7 million colors.

For connectivity to various devices, the new Acer Aspire 5738 notebook PC comes equipped with integrated Intel/PRO Wireless 2200BG Acer InviLink 02.11b/g LAN connection, and Bluetooth v2.0 + EDR connection. In addition the notebook also features 10/100/1000 gigabit Ethernet network card for wired networking, an integrated 56 kbps v.92 fax/modem, one Type II PC Card slot, AC/MC 97 soundcard and HDMI digital Out Port.

The Acer Aspire 5738 notebook PC also features 1.3 Megapixels Crystal Eye WebCam and built-in Microphone providing easy video conferencing via VoIP and video IM chats.

With Windows Vista Home Premium preinstalled (to be completly installed by end user) the Acer Aspire 5738 notebook PC also sports internal 5-in-1 media card reader � supporting Secure Digital (SD), MultiMediaCard (MMC), Memory Stick (MS), Memory Stick PRO (MS PRO), xD-Picture Card (xD) cards.

Weighing 2.8 kgs, Acer Aspire 5738 notebook PC is equipped 71W 4800 mAh Li-ion 6-cell battery pack which can provide upto 3.5-hour battery life. Acer QuicCharge technology enables 80% charge in 1 hour or 2-hour rapid charge system-off.

I/O Ports:

ExpressCard/54 slot
3x Hi-Speed USB v2.0 � 4 pin USB Type A ports
IEEE 1394 Port
Modem � phone line � RJ-11
Network � Ethernet 10Base-T/100Base-TX � RJ-45
External VGA � 15 pin HD D-Sub (HD-15)
Line-in/microphone � mini-phone 3.5 mm
Line-out/headphones � mini-phone stereo 3.5 mm
Line-in � mini-phone 3.5 mm
S-video/TV-out (NTSC/PAL) port
Consumer Infrared Port
5-in-1 Media Card Reader
HDMI Digital Out PortNew Acer Aspire 5738 / 15.6 inch Notebook PCAcer Aspire 5738 Notebook PC Features :
  • Intel Core 2 Duo Processor T6400, 2.0 GHz speed
  • 2 MB L2 Cache, 800 MHz FSB
  • Mobile Intel GM45 Express chipset motherboard with integrated 3D graphics
  • 3-GB DDR III SDRAM, 667 MHz (max 4-GB)
  • 320-GB Serial-ATA hard disk drive, 5400rpm
  • 8x DVD Super Multi Double Layer Optical Drive
  • 15.6-inch (39.62 cm ) WXGA TFT LED backlit Wide HD display with Acer CrystalBrite Technology, 1366 x 768 resolution, high brightness 200nits, 16ms response time
  • Intel Graphics Media Accelerator GMA 4500MHD Graphics Chipset with up to 1695 MB of shared video memory, Intel Dynamic Video Memory Technology 4.0, supporting Microsoft DirectX 9x, Dual independent display support, 16.7 million colors
  • Intel/PRO Wireless 2200BG (802.11b/g) Connection
  • 10/100/1000 gigabit Ethernet Network card
  • 56 kbps v.92 fax/modem
  • Bluetooth v2.0
  • Two built-in Acer 3DSonic stereo speakers, Dolby 5 Stereo Sound
  • Integrated Bluetooth v2.0 + EDR
  • 1.3 Megapixels Crystal Eye WebCam
  • HDMI Digital Out Port
  • Built-in Microphone
  • Separate Numeric Keypad
  • 5-in-1 card reader, supporting Secure Digital (SD), MultiMediaCard (MMC), Memory Stick (MS), Memory Stick PRO (MS PRO), xD-Picture Card (xD)
  • Type II PC Card slot
  • AC/MC 97 soundcard and modem
  • 71W 4800 mAh Li-ion 6-cell battery pack, 3.5 hrs backup
  • Genuine Windows Vista Home Premium
  • Dimension: WxDxH � 383 x 250 x 26/37 mm
  • Weight: 2.8 Kgs

The new Acer Aspire 5738 notebook PC powered by Intel Core 2 Duo processor T6400 is available in India for Rs. 39,990 (excluding taxes) with one year limited local and International Travelers (Carry-in) Warranty.

Similar Post :
Acer Aspire 8920 Notebook Specs
ACER Aspire 4540-522G32Mn Laptop Review

[www.cyberindian.net]

Acer Aspire 7551 PC / 17.3-inch Laptop Review

Acer Aspire 7551 PC /  17.3-inch Laptop Review
Acer Aspire 7551 Laptop is providing an excellent blend of performance, size and wireless capability, the Aspire� 7551 is an exciting notebook. Accelerated AMD� multi-core processing and high-performance graphics provide powerful multitasking and immersive entertainment on the 17.3" screen.

Your favorite fun comes to life on the Aspire� 7551. A cinematic 16:9 aspect ratio and 8ms response time present sharp, bright visuals on the Acer� CineCrystal LED-backlit display. An HDMI� port lets you hook up to TVs and projectors in full HD for awesome theater-style entertainment.

Stay connected via the latest communication technologies, including Acer� Video Conference featuring the Acer� Crystal Eye webcam for quality video chats. The WI-FI CERTIFIED� network connection lets you get online from any hotspot.

The Aspire� 7551 is both cool-looking and practical. The unique mesh-patterned exterior is not only visually appealing but also protects against smudges and scratches. The Acer� FineTip keyboard features an independent numeric keypad, large keys for comfortable typing plus a multi-gesture touchpad that lets you easily scroll, pinch, rotate and flip through web pages, files and images.

Operating System
  • Genuine Windows� 7 Home Premium

Processor
  • AMD Phenom� II Quad-Core Mobile Processor N930(2MB L2 cache, 2.0GHz) /
  • AMD Phenom� II Triple-Core Mobile Processor N830(1.5MB L2 cache, 2.10GHz) /
  • AMD Turion� II Dual-Core Mobile Processor P520(2MB L2 cache, 2.30GHz) /
  • AMD Athlon� II Dual-Core Processor P320(1MB L2 cache, 2.10GHz).

Chipset
  • AMD� M880G

Memory
  • Up to 4GB (2GB installed in each of two memory slots) DDR3 1066 SDRAMUser upgradeable up to 8GB (one 4GB memory card in each slot) If upgrading after initial purchase, one or more of the memory cards provided with the system may have to be replaced with optional larger memory cards in order to achieve the maximum capacity.

Storage

Up to 500GB* SATA hard drive, 5400RPMIntegrated variable-speed Blu-ray Disc� drive / Super-Multi drive combo / Integrated variable-speed Super-Multi drive 5-in-1 card reader for optional MultiMediaCard�, Secure Digital card, Memory Stick�, Memory Stick PRO� or xD-Picture Card� Optional external USB 1.44MB* diskette drive When referring to storage capacity, GB stands for one billion bytes and MB stands for one million bytes. Some utilities may indicate varying storage capacities. Total user-accessible capacity may vary depending on operating environments.Acer Aspire 7551 PC /  17.3-inch Laptop ReviewVideo

Acer� CineCrystal HD+ 17.3" (1600 x 900) high-brightness (220-nit) TFT LCD
16:9 aspect ratio, 8ms response time, 60% color gamut, LED backlight, mercury-freeIntegrated ATI Radeon� HD 4250 graphics
Microsoft� DirectX� 10.0 support /
Discrete ATI Mobility Radeon� 5650 graphics
Microsoft� DirectX� 11.0 support
Up to 16.7 million colors
Acer� Video Conference with integrated Acer� Crystal Eye webcam, 1280 x 1024 resolution
MPEG-2 DVD, WMV9/VC-1 (Windows� Media Video 9, VC-1 standard), H.264/AVC decoding
VGA and HDMI� (High-Definition Multimedia Interface�) with HDCP (high-bandwidth digital-content protection) ports
Support for simultaneous display on notebook LCD and external monitorAcer Aspire 7551 PC /  17.3-inch Laptop ReviewAudio

Two integrated Acer� 3DSonic stereo speakersIntegrated microphone
Microsoft� DirectSound� compatibility

Interface Ports

DC-in
RJ-45 LAN
VGA
Headphones/speaker/line-out
Microphone
HDMI� (High-Definition Multimedia Interface�) with HDCP (high-bandwidth digital-content protection)
Four USB 2.0

Card Slot

5-in-1 card reader for optional MultiMediaCard�, Secure Digital card, Memory Stick�, Memory Stick PRO� or xD-Picture Card�

Communications

Acer� InviLink Nplify network connection supporting 802.11b/g/n wireless LAN, Acer� SignalUp technology for enhanced antenna efficiency, WI-FI CERTIFIED�Gigabit LAN, Wake-on-LAN ready. Acer� Video Conference with integrated Acer� Crystal Eye webcam, 1280 x 1024 resolution

Included Software

Acer� Crystal Eye
Acer� eRecovery Management
Acer� Identity Card
Acer� Registration
Acer� Updater
Adobe� Acrobat� Reader
Adobe� Flash� Player
CyberLink� PowerDVD�*
eSobi�
Google� Toolbar
McAfee� Internet Security Suite (trial version)
Microsoft� Office (60-day trial)
Microsoft� Silverlight�
Microsoft� Works
Norton� Online Backup
NTI Media Maker�*
Skype�
Windows Live� Essentials*OEM, not full-featured, version.

User Interface

103-key Acer� FineTip keyboard, inverted T cursor layout, independent standard numeric keypad, hotkey controls, international language support, 1.8mm minimum key travel11 function, four cursor, two Microsoft� Windows� keys
Play/pause, stop, previous, next media control keys printed on keyboard
Multi-gesture touchpad supporting two-finger scroll, pinch, rotate, flip

Dimensions & Weight

16.3" (415.0mm) W x 10.8" (275.0mm) D x 1.1" - 1.4� (27.1mm � 34.3mm) H7.3 lb. (3.3kg)
Size and weight may vary depending on configuration

Power

Aspire� 7551 models:
65-watt AC adapterSix-cell lithium ion battery: up to 3.0 hours life depending on configuration and usage

Aspire� 7551G models:
90-watt AC adapter

Six-cell lithium ion battery: up to 2.7 hours life depending on configuration and usage, 2.0 hours recharge time with power off, 80% charge in 1.0 hour

Compliance

ACPI (Advanced Configuration and Power Interface) 3.0
Energy Star�
Wi-Fi CERTIFIED�

Security Features

User, administrator and hard drive BIOS passwords
Kensington� lock slot

Limited Warranty

One-year parts and labor limited warranty* with concurrent International Traveler�s Warranty***For a free copy of the standard limited warranty end-users should see a reseller where Acer products are sold or write to Acer America Corporation, Warranty Department, P.O. Box 6137, Temple, TX 76503. TFT displays commonly exhibit a small number of discolored dots, so-called �nonconforming pixels.� This phenomenon is a limitation of TFT LCD technology, not a product defect and, as such, is not covered by the limited warranty or by the upgrade programs.

Similar Post :
ACER Aspire 4540-522G32Mn Laptop Review

[www.laptop-software.com]

BlueStacks: runs Android OS and apps on Windows PCs


BlueStacks runs Android OS and apps on Windows PCs with instant switch between Android and Windows - no reboot is required. End consumers can now enjoy their favorite Android apps on Windows PCs. Android apps can appear either as icons on the Windows desktop, or within a full-blown Android environment.

BlueStacks helps PC manufacturers to ride the Android momentum by enabling Android apps on x86-based tablets, netbooks, notebooks, convertibles and AiO Windows PCs. With the new hybrid convertible form factors, BlueStacks completely eliminates the need to carry two devices. The end consumer benefits from getting both Android and Windows at the price of a single PC.

link:
- http://bluestacks.com/

Get the list of paired Bluetooth devices

With bluetoothAdapter, the list of paired BluetoothDevice can be retrieved by calling getBondedDevices() function.

Get the list of paired Bluetooth devices

Implement a new activity ListPairedDevicesActivity.java
package com.exercise.AndroidBluetooth;

import java.util.Set;

import android.app.ListActivity;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothClass;
import android.bluetooth.BluetoothDevice;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class ListPairedDevicesActivity extends ListActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);

ArrayAdapter<String> btArrayAdapter
= new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1);

BluetoothAdapter bluetoothAdapter
= BluetoothAdapter.getDefaultAdapter();
Set<BluetoothDevice> pairedDevices
= bluetoothAdapter.getBondedDevices();

if (pairedDevices.size() > 0) {
for (BluetoothDevice device : pairedDevices) {
String deviceBTName = device.getName();
String deviceBTMajorClass
= getBTMajorDeviceClass(device
.getBluetoothClass()
.getMajorDeviceClass());
btArrayAdapter.add(deviceBTName + "\n"
+ deviceBTMajorClass);
}
}
setListAdapter(btArrayAdapter);

}

private String getBTMajorDeviceClass(int major){
switch(major){
case BluetoothClass.Device.Major.AUDIO_VIDEO:
return "AUDIO_VIDEO";
case BluetoothClass.Device.Major.COMPUTER:
return "COMPUTER";
case BluetoothClass.Device.Major.HEALTH:
return "HEALTH";
case BluetoothClass.Device.Major.IMAGING:
return "IMAGING";
case BluetoothClass.Device.Major.MISC:
return "MISC";
case BluetoothClass.Device.Major.NETWORKING:
return "NETWORKING";
case BluetoothClass.Device.Major.PERIPHERAL:
return "PERIPHERAL";
case BluetoothClass.Device.Major.PHONE:
return "PHONE";
case BluetoothClass.Device.Major.TOY:
return "TOY";
case BluetoothClass.Device.Major.UNCATEGORIZED:
return "UNCATEGORIZED";
case BluetoothClass.Device.Major.WEARABLE:
return "AUDIO_VIDEO";
default: return "unknown!";
}
}

@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
// TODO Auto-generated method stub
super.onListItemClick(l, v, position, id);

Intent intent = new Intent();
setResult(RESULT_OK, intent);
finish();
}

}


Modify main.xml to add a button to start ListPairedDevicesActivity.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<TextView
android:id="@+id/bluetoothstate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<Button
android:id="@+id/listpaireddevices"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="List Paired Devices"
android:enabled="false"
/>
<TextView
android:id="@+id/bluetoothstate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>


Modify AndroidBluetooth.java
package com.exercise.AndroidBluetooth;

import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class AndroidBluetooth extends Activity {

private static final int REQUEST_ENABLE_BT = 1;
private static final int REQUEST_PAIRED_DEVICE = 2;

/** Called when the activity is first created. */
Button btnListPairedDevices;
TextView stateBluetooth;
BluetoothAdapter bluetoothAdapter;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

btnListPairedDevices = (Button)findViewById(R.id.listpaireddevices);

stateBluetooth = (TextView)findViewById(R.id.bluetoothstate);
bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();

CheckBlueToothState();

btnListPairedDevices.setOnClickListener(btnListPairedDevicesOnClickListener);
}

private void CheckBlueToothState(){
if (bluetoothAdapter == null){
stateBluetooth.setText("Bluetooth NOT support");
}else{
if (bluetoothAdapter.isEnabled()){
if(bluetoothAdapter.isDiscovering()){
stateBluetooth.setText("Bluetooth is currently in device discovery process.");
}else{
stateBluetooth.setText("Bluetooth is Enabled.");
btnListPairedDevices.setEnabled(true);
}
}else{
stateBluetooth.setText("Bluetooth is NOT Enabled!");
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
}
}
}

private Button.OnClickListener btnListPairedDevicesOnClickListener
= new Button.OnClickListener(){

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent intent = new Intent();
intent.setClass(AndroidBluetooth.this, ListPairedDevicesActivity.class);
startActivityForResult(intent, REQUEST_PAIRED_DEVICE);
}};

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// TODO Auto-generated method stub
if(requestCode == REQUEST_ENABLE_BT){
CheckBlueToothState();
}if (requestCode == REQUEST_PAIRED_DEVICE){
if(resultCode == RESULT_OK){

}
}
}
}


Modify AndroidManifest.xml to add activity ListPairedDevicesActivity, also include permission of "android.permission.BLUETOOTH".
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.exercise.AndroidBluetooth"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.BLUETOOTH"></uses-permission>

<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".AndroidBluetooth"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ListPairedDevicesActivity"
android:label="AndroidBluetooth: List of Paired Devices"/>
</application>
</manifest>


Download the files.


Related:
- Detect Bluetooth state
- Turn-On BlueTooth using intent of BluetoothAdapter.ACTION_REQUEST_ENABLE
- Start Bluetooth Discoverable and register BroadcastReceiver for ACTION_SCAN_MODE_CHANGED