Android property

by arvind370 » Tue, 24 Jun 2008 06:17:36 GMT


Sponsored Links
 Hi,

I have the following requirement: Based on the platform (Linux,
Android, Windows) on which the software is executing, I have to set
some parameters that affect behavior. I was looking at some pre-
populated ones like os.name which differentiates Windows/Linux.
However, on the Android emulator os.name is Linux as well. My
question: Does Android populate any properties (that identifies the
execution env as Android emulator) by default that I can query and
use?

Thanks,
Arvind

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Android emulator -dns-server usage

Hello everyone,

I am currently somewhat struggling to get the Android emulator to use
a custom DNS server, which is running on localhost (127.0.0.1).

As of now, I have tried various approaches trying to convince the
emulator to use my DNS server, so far without success. In the end, it
always boils down to the following error message:

### WARNING: can't resolve DNS server name 'localhost'
### WARNING: will use system default DNS server

localhost, however, resolves correctly when supplied to nslookup:

| $ nslookup localhost
| Server:  dnszrh01.xxx
| Address:  10.xxx.xxx.xxx
|
| Non-authoritative answer:
| Name:    localhost.xxx
| Address:  127.0.0.1

Using the IP address instead of the hostname also does not help much,
it just changes the error message to:

### WARNING: can't resolve DNS server name '127.0.0.1'
### WARNING: will use system default DNS server

The extra command line I am using to start the emulator reads: -http-
proxy http://proxy.xxx:8080 -dns-server 127.0.0.1 -debug-proxy -
verbose

This is happening with Android emulator version 5.0 (build_id
ECLAIR-24846) running on Windows.

Any hint how to get this working is much appreciated!

Thanks,
Thilo

-- 

2. Bluetooth file transfer to Laptop is failing.

Bluetooth file transfer to mobile (any set) is successful. But if I
tried to transfer to Laptop it is failing. Below is the log for
successful and unsuccessful case

For unsuccessful case, it is unable to get channel number. Whether i
have to do settings for laptop case?

Phone to Mobile(Motorola) transfer success:
BluetoothShare.DIRECTION_OUTBOUND
V/BtOppTransfer( 1405): startConnectSession IN
V/BluetoothOppPreference( 1405): getChannel 00:17:E2:8D:76:C4_1105
V/BluetoothOppPreference( 1405): getChannel for 00:17:E2:8D:76:C4_1105
as null
V/BtOppTransfer( 1405): doOpushSdp IN
I/AppsUtility( 1236): [apps_filldata]raw data=609
I/AppsUtility( 1236): [apps_update_zero_point][apps_update_zero_point]:
[609,483,608]
I/AppsUtility( 1236): [apps_check_TDS]raw data: x=609, y=483, z=608;
zero point: x=608, y=482, z=607; delta data: dx=0, dy=0, dz=0, state=0
I/AppsUtility( 1236): [ELAN_HandleEvent]dx=0, dy=0, dz=0, state=0
I/AppsUtility( 1236): [apps_filldata]raw data=483
I/AppsUtility( 1236): [apps_filldata]raw data=608
I/AppsUtility( 1236): [apps_filldata]raw data=515
I/AppsUtility( 1236): [apps_filldata]raw data=12
I/AppsUtility( 1236): [apps_filldata]raw data=32
V/BtOppTransfer( 1405): Do Opush SDP request for address 00:17:E2:8D:
76:C4
D/BluetoothDevice( 1405): getServiceChannel IN
D/BtOppTransfer( 1405): Get OPUSH channel 8 from SDP for 00:17:E2:8D:
76:C4
V/BtOppTransfer( 1405): startConnectSession OUT
V/BtOppTransfer( 1405): SDP request returned 8 (2 ms)


Phone to Laptop: Unsuccessful case.
 V/BtOppTransfer( 1423): BluetoothShare.DIRECTION_OUTBOUND
V/BtOppTransfer( 1423): startConnectSession IN
V/BluetoothOppPreference( 1423): getChannel 00:25:56:CD:5D:13_1105
V/BluetoothOppPreference( 1423): getChannel for 00:25:56:CD:5D:13_1105
as null
V/BtOppTransfer( 1423): doOpushSdp IN
V/BtOppTransfer( 1423): Do Opush SDP request for address 00:25:56:CD:
5D:13
D/BluetoothDevice( 1423): getServiceChannel IN
V/BtOppTransfer( 1423): Remote Service channel not in cache
D/BluetoothDevice( 1423): fetchUuidsWithSdp IN
V/BtOppTransfer( 1423): Start new SDP, wait for result
V/BtOppTransfer( 1423): doOpushSdp OUT-1
V/BtOppTransfer( 1423): startConnectSession OUT

..
..
..

V/BtOppTransfer( 1423): onReceive IN
V/BtOppTransfer( 1423): ACTION_UUID for device 00:25:56:CD:5D:13
V/BtOppTransfer( 1423): device.equals(mBatch.mDestination)
V/BtOppTransfer( 1423): uuid != null
V/BtOppTransfer( 1423): onReceive OUT
V/BtOppTransfer( 1423): SDP request returned -1 (4268 ms)

Thanks
Guru

-- 

3. ScrollView is not calling onDraw()

4. How to make my app start up itself at the specified time just like the alarm clock.

5. How to add a View in Gallery?

6. Hotspot in ImageView

7. grow or shrink view