HTTP Access

by m8 » Tue, 26 May 2009 07:01:21 GMT


Sponsored Links
 Hi

On Android, I wanted to use only the HTTP Stack. What would be the
best option? 1) java.net package 2) org.apache.http.client package 3)
use WebKit's native interface?

If I need to use WebKit's native interface is there a documentation?
Since my client is a non-ui client I won't be able to use the WebView.

Thanks,

-Amit

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



Other Threads

1. ANR with annotation

Hi list,

I'm having a problem launching sub-activities.

I wrote an Android application that uses JNI to execute some native
code (for surface rendering). This works really good. Lately, I tried
adding a new activity to my application, to present the user another
UI (a screen for settings management).

For testing purposes, this new activity only contains a text filed,
and two buttons. I managed to launch my new activity (using intents
and filters) through startActivity. The problem is that this activity
is not responding to user interaction. I get the following messages in
the logcat:

[CODE]
01-23 05:22:48.836: INFO/ActivityManager(865): ANR in process:
com.visioglobe.VisioCity (last in com.visioglobe.VisioCity)
01-23 05:22:48.836: INFO/ActivityManager(865): Annotation:
keyDispatchingTimedOut
01-23 05:22:48.836: INFO/ActivityManager(865): CPU usage:
01-23 05:22:48.836: INFO/ActivityManager(865): Load: 1.01 / 0.37 /
0.14
01-23 05:22:48.836: INFO/ActivityManager(865): CPU usage from 21743ms
to 16ms ago:
01-23 05:22:48.836: INFO/ActivityManager(865):   nvrm_daemon: 17% = 5%
user + 12% kernel / faults: 5245 minor
01-23 05:22:48.836: INFO/ActivityManager(865):   system_server: 2% =
0% user + 1% kernel / faults: 505 minor
01-23 05:22:48.836: INFO/ActivityManager(865):   NvOsKernelThrea: 1% =
0% user + 1% kernel
01-23 05:22:48.836: INFO/ActivityManager(865):   mmcqd: 0% = 0% user +
0% kernel
01-23 05:22:48.836: INFO/ActivityManager(865):   d.process.acore: 0% =
0% user + 0% kernel / faults: 26 minor
01-23 05:22:48.836: INFO/ActivityManager(865):   logcat: 0% = 0% user
+ 0% kernel / faults: 119 minor
01-23 05:22:48.836: INFO/ActivityManager(865):   adbd: 0% = 0% user +
0% kernel / faults: 13 minor
01-23 05:22:48.836: INFO/ActivityManager(865):   zygote: 0% = 0% user
+ 0% kernel / faults: 9 minor
01-23 05:22:48.836: INFO/ActivityManager(865):   NvOsIrqKern0270: 0% =
0% user + 0% kernel
01-23 05:22:48.836: INFO/ActivityManager(865):   ksdioirqd/mmc2: 0% =
0% user + 0% kernel
01-23 05:22:48.836: INFO/ActivityManager(865):  +globe.VisioCity: 0% =
0% user + 0% kernel
01-23 05:22:48.836: INFO/ActivityManager(865):  +migration/1: 0% = 0%
user + 0% kernel
01-23 05:22:48.836: INFO/ActivityManager(865):  +ksoftirqd/1: 0% = 0%
user + 0% kernel
01-23 05:22:48.836: INFO/ActivityManager(865):  +watchdog/1: 0% = 0%
user + 0% kernel
01-23 05:22:48.836: INFO/ActivityManager(865):  +aio/1: 0% = 0% user +
0% kernel
01-23 05:22:48.836: INFO/ActivityManager(865):  +ata/1: 0% = 0% user +
0% kernel
01-23 05:22:48.836: INFO/ActivityManager(865):  +kblockd/1: 0% = 0%
user + 0% kernel
01-23 05:22:48.836: INFO/ActivityManager(865):  +work_on_cpu/1: 0% =
0% user + 0% kernel
01-23 05:22:48.836: INFO/ActivityManager(865):  +events/1: 0% = 0%
user + 0% kernel
01-23 05:22:48.836: INFO/ActivityManager(865): TOTAL: 49% = 23% user +
20% kernel + 5% iowait + 0% irq
01-23 05:22:48.836: INFO/ActivityManager(865): Removing old ANR trace
file from /data/anr/traces.txt
01-23 05:22:48.836: INFO/Process(865): Sending signal. PID: 1195 SIG:
3
01-23 05:22:48.836: INFO/dalvikvm(1195): threadid=7: reacting to
signal 3
01-23 05:22:48.896: INFO/dalvikvm(1195): Wrote stack trace to '/data/
anr/traces.txt'
01-23 05:22:49.055: INFO/Process(865): Sending signal. PID: 865 SIG: 3
01-23 05:22:49.055: INFO/dalvikvm(865): threadid=7: reacting to signal
3
01-23 05:22:49.076: INFO/dalvikvm(865): Wrote stack trace to '/data/
anr/traces.txt'
01-23 05:22:49.286: INFO/Process(865): Sending signal. PID: 1172 SIG:
3
01-23 05:22:49.286: INFO/dalvikvm(1172): threadid=7: reacting to
signal 3
01-23 05:22:49.286: INFO/dalvikvm(1172): Wrote stack trace to '/data/
anr/traces.txt'
01-23 05:22:49.486: INFO/Process(865): Sending signal. PID: 985 SIG: 3
01-23 05:22:49.486: INFO/dalvikvm(985): threadid=7: reacting to signal
3
01-23 05:22:49.486: INFO/dalvikvm(985): Wrote stack trace to '/data/
anr/traces.txt'
01-23 05:22:49.708: INFO/Process(865): Sending signal. PID: 1078 SIG:
3
01-23 05:22:49.708: INFO/dalvikvm(1078): threadid=7: reacting to
signal 3
01-23 05:22:49.708: INFO/dalvikvm(1078): Wrote stack trace to '/data/
anr/traces.txt'
01-23 05:22:49.817: DEBUG/PowerManagerService(865): setPowerState:
mPowerState=7 newState=3 noChangeLights=false
01-23 05:22:49.817: DEBUG/PowerManagerService(865):
oldKeyboardBright=false newKeyboardBright=false
01-23 05:22:49.817: DEBUG/PowerManagerService(865):
oldScreenBright=true newScreenBright=true
01-23 05:22:49.817: DEBUG/PowerManagerService(865):
oldButtonBright=true newButtonBright=false
01-23 05:22:49.817: DEBUG/PowerManagerService(865):   oldScreenOn=true
newScreenOn=true
01-23 05:22:49.817: DEBUG/PowerManagerService(865):
oldBatteryLow=false newBatteryLow=false
01-23 05:22:49.916: INFO/Process(865): Sending signal. PID: 1047 SIG:
3
01-23 05:22:49.916: INFO/dalvikvm(1047): threadid=7: reacting to
signal 3
01-23 05:22:49.929: INFO/dalvikvm(1047): Wrote stack trace to '/data/
anr/traces.txt'
01-23 05:22:50.129: INFO/Process(865): Sending signal. PID: 1032 SIG:
3
01-23 05:22:50.129: INFO/dalvikvm(1032): threadid=7: reacting to
signal 3
01-23 05:22:50.135: INFO/dalvikvm(1032): Wrote stack trace to '/data/
anr/traces.txt'
01-23 05:22:50.335: INFO/Process(865): Sending signal. PID: 935 SIG: 3
01-23 05:22:50.335: INFO/dalvikvm(935): threadid=7: reacting to signal
3
01-23 05:22:50.335: INFO/dalvikvm(935): Wrote stack trace to '/data/
anr/traces.txt'
01-23 05:22:50.545: INFO/Process(865): Sending signal. PID: 956 SIG: 3
01-23 05:22:50.545: INFO/dalvikvm(956): threadid=7: reacting to signal
3
01-23 05:22:50.545: INFO/dalvikvm(956): Wrote stack trace to '/data/
anr/traces.txt'
01-23 05:22:50.747: INFO/Process(865): Sending signal. PID: 938 SIG: 3
01-23 05:22:50.747: INFO/dalvikvm(938): threadid=7: reacting to signal
3
01-23 05:22:50.763: INFO/dalvikvm(938): Wrote stack trace to '/data/
anr/traces.txt'
01-23 05:22:50.966: INFO/Process(865): Sending signal. PID: 934 SIG: 3
01-23 05:22:50.966: INFO/dalvikvm(934): threadid=7: reacting to signal
3
01-23 05:22:50.966: INFO/dalvikvm(934): Wrote stack trace to '/data/
anr/traces.txt'
[/CODE]

Is there something I have missed ? What's going wrong ? It seems like
events are not forwarded to the new activity.

Any help greatly welcome.

Regards,
Florent.

-- 

2. Trying to compile Android under cygwin

Hi list,

I am trying to compile the Android source tree under Cygwin. I got the
source using repo, and following the docs, i called make. Here is what
make writes in the console :

[CODE]
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.1-update1
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=windows
HOST_BUILD_TYPE=release
BUILD_ID=ECLAIR
============================================
build/core/main.mk:385: sdk-only: javac available.
/bin/bash: line 0: cd: sdk/layoutopt/app/src/resources: No such file
or directory
make: *** No rule to make target `out/target/common/obj/PACKAGING/
public_api.xml', needed by `out/target/common/obj/PACKAGING/checkapi-
last-timestamp'.  Stop.
[/CODE]

What am I doing wrong. I need to compile the Android source to be able
to link my NDK libs with libEGL.

Thanks for any help.

Regards,
Florent.

-- 

3. Is it possible to set minimum heap size for each application.?

4. Ada yang cara wifi tethering dari LAPTOP ke Android

5. Paket Data Internet Apa Kira-Kira yang Cocok Buat Android? IM3, XL ato Simpati?

6. Regarding contacts launch from other activity---Urgent help needed

7. Oot banget: japri buruan