I'm attempting to bundle Crosswalk with my Android application so that I can include its webview on a Fragment. The business case being that any HTML we want to run on the view will work across all android versions (the HTML could be a complex activity such as a game). I'm looking for an example which could manage this or how I could change my project to suit that purpose.
I've followed the tutorial here (https://crosswalk-project.org/documentation/android/embedding_crosswalk.html) to get started, this allows me to build an APK that correctly shows web content on my Samsung S4, which uses the ARM chipset, however I now also would like to cover x86. I've got an emulator to test with but I'm not having much luck. I've also attempted to follow the steps here (How to add crosswalk webview in my own android library module?).
I've tried the following:
Different permutations of the including the modules provided on their download page.
Including both the ARM and x86 libraries (Android Studio complains that the classes are defined twice which is what I would expect).
Copying the 'x86' from src/main/jniLibs from within the x86 module and pasting it into the arm module which my application references.
Using 'XWalkActivity' (https://crosswalk-project.org/apis/embeddingapidocs_v7/index.html) not only did this not work on x86 but also stopped working on my ARM device.
The closest I've got is the code at the bottom of this post which allows me to install the application on my emulator but does not load the web content.
Few key things to note from my stack track (at the end of this question).
12-12 17:09:43.243 12271-12294/com.firstapp.crosswalktest W/chromium: [WARNING:xwalk_external_extension.cc(58)] Error loading extension '/data/app/com.firstapp.crosswalktest-2/lib/x86/libxwalkdummy.so': couldn't get XW_Initialize function.
12-12 17:09:43.243 12271-12294/com.firstapp.crosswalktest W/chromium: [WARNING:xwalk_extension_server.cc(407)] Failed to initialize extension: /data/app/com.firstapp.crosswalktest-2/lib/x86/libxwalkdummy.so
12-12 17:09:43.243 12271-12294/com.firstapp.crosswalktest W/chromium: [WARNING:xwalk_external_extension.cc(58)] Error loading extension '/data/app/com.firstapp.crosswalktest-2/lib/x86/libxwalkcore.so': couldn't get XW_Initialize function.
12-12 17:09:43.243 12271-12294/com.firstapp.crosswalktest W/chromium: [WARNING:xwalk_extension_server.cc(407)] Failed to initialize extension: /data/app/com.firstapp.crosswalktest-2/lib/x86/libxwalkcore.so
This looks problematic however this also occurs when I run it on my ARM device and that works as expected. Does anyone know what these are and the implications?
12-12 17:09:43.013 12271-12271/com.firstapp.crosswalktest D/XWalkLib: Init embedded mode
12-12 17:09:43.013 12271-12271/com.firstapp.crosswalktest D/XWalkLib: [App Version] build:22.52.561.4, api:7, min_api:7
12-12 17:09:43.014 12271-12271/com.firstapp.crosswalktest D/XWalkLib: [Lib Version] build:22.52.561.4, api:7, min_api:5
12-12 17:09:43.014 12271-12271/com.firstapp.crosswalktest D/XWalkLib: Crosswalk download mode: false
12-12 17:09:43.014 12271-12271/com.firstapp.crosswalktest D/XWalkLib: XWalk core version matched
12-12 17:09:43.045 12271-12271/com.firstapp.crosswalktest I/cr_LibraryLoader: Time to load native libraries: 1 ms (timestamps 144-145)
12-12 17:09:43.045 12271-12271/com.firstapp.crosswalktest I/cr_LibraryLoader: Expected native library version number "", actual native library version number ""
12-12 17:09:43.045 12271-12271/com.firstapp.crosswalktest D/XWalkLib: Native library is built for IA
12-12 17:09:43.045 12271-12271/com.firstapp.crosswalktest D/XWalkLib: XWalk core architecture matched
12-12 17:09:43.045 12271-12271/com.firstapp.crosswalktest D/XWalkLib: Running in embedded mode
12-12 17:09:43.045 12271-12271/com.firstapp.crosswalktest D/XWalkLib: Init core bridge
This looks like the set up that XWalk goes through, note that 'XWalk core architecture matched'; I would read from this that it has the native libraries it needs so perhaps something else is the issue?
Stack trace from once the application loads:
12-12 17:09:39.436 2087-2087/com.google.android.googlequicksearchbox:search I/MicroDetectionWorker: Micro detection mode: [mDetectionMode: [1]].
12-12 17:09:39.436 2087-2087/com.google.android.googlequicksearchbox:search I/AudioController: Using mInputStreamFactoryBuilder
12-12 17:09:39.440 2087-12244/com.google.android.googlequicksearchbox:search I/MicroRecognitionRunner: Starting detection.
12-12 17:09:39.440 2087-11832/com.google.android.googlequicksearchbox:search I/MicrophoneInputStream: mic_starting com.google.android.apps.gsa.staticplugins.z.c#eee8318
12-12 17:09:39.441 1246-1624/? W/APM_AudioPolicyManager: getInputForAttr() failed opening input: samplingRate 16000, format 1, channelMask 10
12-12 17:09:39.441 2087-11832/com.google.android.googlequicksearchbox:search E/AudioRecord: Could not get audio input for session 265, record source 1999, sample rate 16000, format 0x1, channel mask 0x10, flags 0
12-12 17:09:39.442 2087-11832/com.google.android.googlequicksearchbox:search E/AudioRecord-JNI: Error creating AudioRecord instance: initialization check failed with status -22.
12-12 17:09:39.442 2087-11832/com.google.android.googlequicksearchbox:search E/android.media.AudioRecord: Error code -20 when initializing native AudioRecord object.
12-12 17:09:39.442 2087-11832/com.google.android.googlequicksearchbox:search I/MicrophoneInputStream: mic_started com.google.android.apps.gsa.staticplugins.z.c#eee8318
12-12 17:09:39.443 2087-11832/com.google.android.googlequicksearchbox:search E/ActivityThread: Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded
12-12 17:09:39.445 2087-2087/com.google.android.googlequicksearchbox:search I/MicroDetectionWorker: onReady
12-12 17:09:39.447 2087-12244/com.google.android.googlequicksearchbox:search W/SpeechLevelGenerator: Really low audio levels detected. The audio input may have issues.
12-12 17:09:39.453 2087-11832/com.google.android.googlequicksearchbox:search I/MicrophoneInputStream: mic_close com.google.android.apps.gsa.staticplugins.z.c#eee8318
12-12 17:09:39.453 2087-12244/com.google.android.googlequicksearchbox:search I/MicroRecognitionRunner: Detection finished
12-12 17:09:39.454 2087-12244/com.google.android.googlequicksearchbox:search W/ErrorReporter: reportError [type: 211, code: 524300]: Error reading from input stream
12-12 17:09:39.455 2087-2242/com.google.android.googlequicksearchbox:search I/MicroRecognitionRunner: Stopping hotword detection.
12-12 17:09:39.455 2087-12244/com.google.android.googlequicksearchbox:search W/ErrorProcessor: onFatalError, processing error from engine(4)
com.google.android.apps.gsa.shared.speech.a.g: Error reading from input stream
at com.google.android.apps.gsa.staticplugins.recognizer.i.a.a(SourceFile:342)
at com.google.android.apps.gsa.staticplugins.recognizer.i.a$1.run(SourceFile:1367)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at com.google.android.apps.gsa.shared.util.concurrent.a.ak.run(SourceFile:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
at com.google.android.apps.gsa.shared.util.concurrent.a.ad$1.run(SourceFile:85)
Caused by: com.google.android.apps.gsa.shared.exception.GsaIOException: Error code: 393238 | Buffer overflow, no available space.
at com.google.android.apps.gsa.speech.audio.Tee.g(SourceFile:2531)
at com.google.android.apps.gsa.speech.audio.ap.read(SourceFile:555)
at java.io.InputStream.read(InputStream.java:101)
at com.google.android.apps.gsa.speech.audio.al.run(SourceFile:362)
at com.google.android.apps.gsa.speech.audio.ak$1.run(SourceFile:471)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at com.google.android.apps.gsa.shared.util.concurrent.a.ak.run(SourceFile:66)
at com.google.android.apps.gsa.shared.util.concurrent.a.ax.run(SourceFile:139)
at com.google.android.apps.gsa.shared.util.concurrent.a.ax.run(SourceFile:139)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
at com.google.android.apps.gsa.shared.util.concurrent.a.ad$1.run(SourceFile:85)
12-12 17:09:39.455 2087-12244/com.google.android.googlequicksearchbox:search I/AudioController: internalShutdown
12-12 17:09:39.457 2087-2087/com.google.android.googlequicksearchbox:search I/MicroDetector: Keeping mic open: false
12-12 17:09:39.457 2087-2087/com.google.android.googlequicksearchbox:search I/MicroDetectionWorker: #onError(false)
12-12 17:09:39.457 2087-12243/com.google.android.googlequicksearchbox:search I/DeviceStateChecker: DeviceStateChecker cancelled
12-12 17:09:42.710 12251-12251/? D/AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
12-12 17:09:42.711 12251-12251/? D/AndroidRuntime: CheckJNI is ON
12-12 17:09:42.711 12251-12251/? E/cutils-trace: Error opening trace file: Permission denied (13)
12-12 17:09:42.736 12251-12251/? W/art: Unexpected CPU variant for X86 using defaults: x86
12-12 17:09:42.739 12251-12251/? D/ICU: No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
12-12 17:09:42.745 12255-12255/? D/AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
12-12 17:09:42.746 12255-12255/? D/AndroidRuntime: CheckJNI is ON
12-12 17:09:42.746 12255-12255/? E/cutils-trace: Error opening trace file: Permission denied (13)
12-12 17:09:42.748 12251-12251/? E/memtrack: Couldn't load memtrack module (No such file or directory)
12-12 17:09:42.748 12251-12251/? E/android.os.Debug: failed to load memtrack module: -2
12-12 17:09:42.749 12251-12251/? I/Radio-JNI: register_android_hardware_Radio DONE
12-12 17:09:42.758 12251-12251/? D/AndroidRuntime: Calling main entry com.android.commands.wm.Wm
12-12 17:09:42.759 12251-12251/? D/AndroidRuntime: Shutting down VM
12-12 17:09:42.761 12251-12262/? W/art: Thread attaching while runtime is shutting down: Binder:12251_1
12-12 17:09:42.761 12251-12262/? I/AndroidRuntime: NOTE: attach of thread 'Binder:12251_1' failed
12-12 17:09:42.776 12255-12255/? W/art: Unexpected CPU variant for X86 using defaults: x86
12-12 17:09:42.780 12255-12255/? D/ICU: No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
12-12 17:09:42.793 12255-12255/? E/memtrack: Couldn't load memtrack module (No such file or directory)
12-12 17:09:42.793 12255-12255/? E/android.os.Debug: failed to load memtrack module: -2
12-12 17:09:42.794 12255-12255/? I/Radio-JNI: register_android_hardware_Radio DONE
12-12 17:09:42.799 12255-12255/? D/AndroidRuntime: Calling main entry com.android.commands.am.Am
12-12 17:09:42.803 1461-1914/system_process I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.firstapp.crosswalktest/.MainActivity} from uid 2000 on display 0
12-12 17:09:42.811 12255-12255/? D/AndroidRuntime: Shutting down VM
12-12 17:09:42.815 12271-12271/? I/art: Not late-enabling -Xcheck:jni (already on)
12-12 17:09:42.816 12271-12271/? W/art: Unexpected CPU variant for X86 using defaults: x86
12-12 17:09:42.822 1461-1476/system_process I/ActivityManager: Start proc 12271:com.firstapp.crosswalktest/u0a76 for activity com.firstapp.crosswalktest/.MainActivity
12-12 17:09:42.943 1461-1476/system_process W/art: Long monitor contention with owner android.display (1509) at int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, int, android.view.WindowManager$LayoutParams, int, int, int, int, android.graphics.Rect, android.graphics.Rect, android.graphics.Rect, android.graphics.Rect, android.graphics.Rect, android.graphics.Rect, android.graphics.Rect, android.content.res.Configuration, android.view.Surface)(WindowManagerService.java:2850) waiters=0 in void com.android.server.wm.WindowManagerService.resumeKeyDispatching(android.os.IBinder) for 120ms
12-12 17:09:42.944 1461-1495/system_process W/art: Long monitor contention with owner Binder:1461_2 (1476) at void com.android.server.am.ActivityManagerService.activityPaused(android.os.IBinder)(ActivityManagerService.java:6915) waiters=0 in void com.android.server.am.ActivityManagerService.dispatchUidsChanged() for 132ms
12-12 17:09:42.958 2087-2087/com.google.android.googlequicksearchbox:search W/SearchService: Abort, client detached.
12-12 17:09:43.013 12271-12271/com.firstapp.crosswalktest D/XWalkLib: Init embedded mode
12-12 17:09:43.013 12271-12271/com.firstapp.crosswalktest D/XWalkLib: [App Version] build:22.52.561.4, api:7, min_api:7
12-12 17:09:43.014 12271-12271/com.firstapp.crosswalktest D/XWalkLib: [Lib Version] build:22.52.561.4, api:7, min_api:5
12-12 17:09:43.014 12271-12271/com.firstapp.crosswalktest D/XWalkLib: Crosswalk download mode: false
12-12 17:09:43.014 12271-12271/com.firstapp.crosswalktest D/XWalkLib: XWalk core version matched
12-12 17:09:43.045 12271-12271/com.firstapp.crosswalktest I/cr_LibraryLoader: Time to load native libraries: 1 ms (timestamps 144-145)
12-12 17:09:43.045 12271-12271/com.firstapp.crosswalktest I/cr_LibraryLoader: Expected native library version number "", actual native library version number ""
12-12 17:09:43.045 12271-12271/com.firstapp.crosswalktest D/XWalkLib: Native library is built for IA
12-12 17:09:43.045 12271-12271/com.firstapp.crosswalktest D/XWalkLib: XWalk core architecture matched
12-12 17:09:43.045 12271-12271/com.firstapp.crosswalktest D/XWalkLib: Running in embedded mode
12-12 17:09:43.045 12271-12271/com.firstapp.crosswalktest D/XWalkLib: Init core bridge
12-12 17:09:43.057 12271-12271/com.firstapp.crosswalktest W/XWalkInternalResources: org.xwalk.core.R$styleable.ButtonCompat is not int.
12-12 17:09:43.057 12271-12271/com.firstapp.crosswalktest W/XWalkInternalResources: org.xwalk.core.R$styleable.TextViewWithLeading is not int.
12-12 17:09:43.066 12271-12271/com.firstapp.crosswalktest W/XWalkInternalResources: org.xwalk.core.R$styleable.ButtonCompat is not int.
12-12 17:09:43.066 12271-12271/com.firstapp.crosswalktest W/XWalkInternalResources: org.xwalk.core.R$styleable.TextViewWithLeading is not int.
12-12 17:09:43.069 12271-12271/com.firstapp.crosswalktest W/XWalkInternalResources: org.xwalk.core.R$styleable.ButtonCompat is not int.
12-12 17:09:43.069 12271-12271/com.firstapp.crosswalktest W/XWalkInternalResources: org.xwalk.core.R$styleable.TextViewWithLeading is not int.
12-12 17:09:43.076 12271-12271/com.firstapp.crosswalktest W/XWalkInternalResources: org.xwalk.core.R$styleable.ButtonCompat is not int.
12-12 17:09:43.076 12271-12271/com.firstapp.crosswalktest W/XWalkInternalResources: org.xwalk.core.R$styleable.TextViewWithLeading is not int.
12-12 17:09:43.082 12271-12271/com.firstapp.crosswalktest I/cr_LibraryLoader: Expected native library version number "", actual native library version number ""
12-12 17:09:43.082 12271-12271/com.firstapp.crosswalktest I/chromium: [INFO:library_loader_hooks.cc(143)] Chromium logging enabled: level = 0, default verbosity = 0
12-12 17:09:43.084 12271-12271/com.firstapp.crosswalktest I/cr_BrowserStartup: Initializing chromium process, singleProcess=true
[ 12-12 17:09:43.098 12271:12271 D/ ]
HostConnection::get() New Host Connection established 0x9b4409a0, tid 12271
12-12 17:09:43.150 12271-12300/com.firstapp.crosswalktest W/cr_media: Requires BLUETOOTH permission
12-12 17:09:43.153 12271-12271/com.firstapp.crosswalktest E/chromium: [ERROR:xwalk_platform_notification_service.cc(143)] Not implemented reached in virtual bool xwalk::XWalkPlatformNotificationService::GetDisplayedPersistentNotifications(content::BrowserContext*, std::__1::set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >*)
12-12 17:09:43.167 12271-12271/com.firstapp.crosswalktest E/chromium: [ERROR:xwalk_browser_context.cc(87)] Failed to read preference, error num: 0
12-12 17:09:43.168 12271-12271/com.firstapp.crosswalktest D/XWalkContent: CompositingSurfaceType is SurfaceView
12-12 17:09:43.209 12271-12271/com.firstapp.crosswalktest W/art: Attempt to remove non-JNI local reference, dumping thread
12-12 17:09:43.243 12271-12294/com.firstapp.crosswalktest W/chromium: [WARNING:xwalk_external_extension.cc(58)] Error loading extension '/data/app/com.firstapp.crosswalktest-2/lib/x86/libxwalkdummy.so': couldn't get XW_Initialize function.
12-12 17:09:43.243 12271-12294/com.firstapp.crosswalktest W/chromium: [WARNING:xwalk_extension_server.cc(407)] Failed to initialize extension: /data/app/com.firstapp.crosswalktest-2/lib/x86/libxwalkdummy.so
12-12 17:09:43.243 12271-12294/com.firstapp.crosswalktest W/chromium: [WARNING:xwalk_external_extension.cc(58)] Error loading extension '/data/app/com.firstapp.crosswalktest-2/lib/x86/libxwalkcore.so': couldn't get XW_Initialize function.
12-12 17:09:43.243 12271-12294/com.firstapp.crosswalktest W/chromium: [WARNING:xwalk_extension_server.cc(407)] Failed to initialize extension: /data/app/com.firstapp.crosswalktest-2/lib/x86/libxwalkcore.so
12-12 17:09:43.267 12271-12271/com.firstapp.crosswalktest I/cr_Ime: ImeThread is not enabled.
12-12 17:09:43.282 12271-12318/com.firstapp.crosswalktest I/chromium: [INFO:xwalk_extension_renderer_controller.cc(42)] EXTENSION PROCESS DISABLED.
12-12 17:09:43.301 12271-12323/com.firstapp.crosswalktest E/libEGL: validate_display:99 error 3008 (EGL_BAD_DISPLAY)
12-12 17:09:43.320 12271-12323/com.firstapp.crosswalktest I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
[ 12-12 17:09:43.326 12271:12323 D/ ]
HostConnection::get() New Host Connection established 0xa8b89800, tid 12323
12-12 17:09:43.333 1228-1268/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
12-12 17:09:43.487 12271-12326/com.firstapp.crosswalktest I/OpenGLRenderer: Initialized EGL, version 1.4
12-12 17:09:43.487 12271-12326/com.firstapp.crosswalktest D/OpenGLRenderer: Swap behavior 1
[ 12-12 17:09:43.488 12271:12326 D/ ]
HostConnection::get() New Host Connection established 0x87a05940, tid 12326
12-12 17:09:43.562 12271-12271/com.firstapp.crosswalktest W/art: Attempt to remove non-JNI local reference, dumping thread
12-12 17:09:43.958 1461-1509/system_process I/ActivityManager: Displayed com.firstapp.crosswalktest/.MainActivity: +1s147ms
12-12 17:09:43.994 12271-12271/com.firstapp.crosswalktest E/chromium: [ERROR:layer_tree_host_impl.cc(2233)] Forcing zero-copy tile initialization as worker context is missing
12-12 17:09:44.093 12271-12271/com.firstapp.crosswalktest W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 12271
12-12 17:09:44.102 12271-12323/com.firstapp.crosswalktest E/chromium: [ERROR:buffer_manager.cc(438)] [.DisplayCompositor-0x84d23400]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
12-12 17:09:44.352 1228-1228/? W/SurfaceFlinger: couldn't log to binary event log: overflow.
12-12 17:09:44.640 12271-12323/com.firstapp.crosswalktest E/chromium: [ERROR:texture_manager.cc(2942)] [.RenderCompositor-0x88b75800]GL ERROR :GL_INVALID_OPERATION : glTexImage2D: <- error from previous GL command
12-12 17:09:45.247 12271-12291/com.firstapp.crosswalktest D/NetworkSecurityConfig: No Network Security Config specified, using platform default
My project structure:
MainActivity.java
package com.firstapp.crosswalktest;
import org.xwalk.core.XWalkPreferences;
import org.xwalk.core.XWalkView;
import android.app.Activity;
import android.os.Bundle;
public class MainActivity extends Activity {
private XWalkView mXWalkView;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true);
mXWalkView = (XWalkView) findViewById(R.id.activity_main);
mXWalkView.load("http://crosswalk-project.org/", null);
}
}
activity_main.xml
<org.xwalk.core.XWalkView android:id="#+id/activity_main"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</org.xwalk.core.XWalkView>
I am using the latest version of android studio. 6.0 does not have the apache libraries but i have added them in the gradle. My application works but it doesnt get the data. I've added the log cat below including my mainactivity:
public class MainActivity extends AppCompatActivity {
private TextView responseTextView;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
this.responseTextView = (TextView) this.findViewById(R.id.responseTextView);
new GetAllLecturesTask().execute(new ApiConnector());
}
public void setTextToTextView(JSONArray jsonArray)
{
String s = "";
for (int i=0; i<jsonArray.length();i++){
JSONObject json = null;
try{
json = jsonArray.getJSONObject(i);
s = s +
"Name : "+json.getString("Name")+
"EmailAddress : "+json.getString("EmailAddress")+"\n"+
"PhoneNo : "+json.getString("PhoneNo")+"\n\n";
}catch (JSONException e){
e.printStackTrace();
}
}
}
private class GetAllLecturesTask extends AsyncTask<ApiConnector,Long,JSONArray>
{
#Override
protected JSONArray doInBackground(ApiConnector... params){
return params[0].GetAllLectures();
}
#Override
protected void onPostExecute(JSONArray jsonArray){
setTextToTextView(jsonArray);
}
}
}
Logcat:
02-16 20:55:57.690 2304-2304/? D/AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
02-16 20:55:57.690 2304-2304/? D/AndroidRuntime: CheckJNI is ON
02-16 20:55:57.710 2304-2304/? D/ICU: No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
02-16 20:55:57.740 2304-2304/? E/memtrack: Couldn't load memtrack module (No such file or directory)
02-16 20:55:57.740 2304-2304/? E/android.os.Debug: failed to load memtrack module: -2
02-16 20:55:57.740 2304-2304/? I/Radio-JNI: register_android_hardware_Radio DONE
02-16 20:55:57.750 2304-2304/? D/AndroidRuntime: Calling main entry com.android.commands.am.Am
02-16 20:55:57.760 1357-1368/? I/ActivityManager: Force stopping com.example.jahanara.externaldatabase appid=10066 user=0: from pid 2304
02-16 20:55:57.760 1357-1368/? I/ActivityManager: Killing 2275:com.example.jahanara.externaldatabase/u0a66 (adj 0): stop com.example.jahanara.externaldatabase
02-16 20:55:57.770 1357-1393/? W/InputDispatcher: channel '3605d7 com.example.jahanara.externaldatabase/com.example.jahanara.externaldatabase.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
02-16 20:55:57.770 1357-1393/? E/InputDispatcher: channel '3605d7 com.example.jahanara.externaldatabase/com.example.jahanara.externaldatabase.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
02-16 20:55:57.770 1357-1369/? D/GraphicsStats: Buffer count: 2
02-16 20:55:57.770 1357-1369/? I/WindowState: WIN DEATH: Window{3605d7 u0 com.example.jahanara.externaldatabase/com.example.jahanara.externaldatabase.MainActivity}
02-16 20:55:57.770 1357-1369/? W/InputDispatcher: Attempted to unregister already unregistered input channel '3605d7 com.example.jahanara.externaldatabase/com.example.jahanara.externaldatabase.MainActivity (server)'
02-16 20:55:57.800 1357-1368/? W/ActivityManager: Force removing ActivityRecord{999f3d u0 com.example.jahanara.externaldatabase/.MainActivity t135}: app died, no saved state
02-16 20:55:57.810 1357-1803/? W/ActivityManager: Spurious death for ProcessRecord{966925c 0:com.example.jahanara.externaldatabase/u0a66}, curProc for 2275: null
02-16 20:55:57.810 2304-2304/? D/AndroidRuntime: Shutting down VM
02-16 20:55:58.050 1697-1828/? W/EGL_emulation: eglSurfaceAttrib not implemented
02-16 20:55:58.050 1697-1828/? W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f690c260840, error=EGL_SUCCESS
02-16 20:55:58.100 1005-1005/? W/SurfaceFlinger: couldn't log to binary event log: overflow.
02-16 20:55:58.600 2313-2313/? D/AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
02-16 20:55:58.600 2313-2313/? D/AndroidRuntime: CheckJNI is ON
02-16 20:55:58.620 2313-2313/? D/ICU: No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
02-16 20:55:58.690 2313-2313/? E/memtrack: Couldn't load memtrack module (No such file or directory)
02-16 20:55:58.690 2313-2313/? E/android.os.Debug: failed to load memtrack module: -2
02-16 20:55:58.690 2313-2313/? I/Radio-JNI: register_android_hardware_Radio DONE
02-16 20:55:58.700 2317-2317/? D/AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
02-16 20:55:58.700 2317-2317/? D/AndroidRuntime: CheckJNI is ON
02-16 20:55:58.710 2313-2313/? D/AndroidRuntime: Calling main entry com.android.commands.wm.Wm
02-16 20:55:58.720 2317-2317/? D/ICU: No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
02-16 20:55:58.740 2317-2317/? E/memtrack: Couldn't load memtrack module (No such file or directory)
02-16 20:55:58.740 2317-2317/? E/android.os.Debug: failed to load memtrack module: -2
02-16 20:55:58.740 2317-2317/? I/Radio-JNI: register_android_hardware_Radio DONE
02-16 20:55:58.750 2317-2317/? D/AndroidRuntime: Calling main entry com.android.commands.am.Am
02-16 20:55:58.760 1357-1803/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.jahanara.externaldatabase/.MainActivity} from uid 0 on display 0
02-16 20:55:59.120 1357-1803/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 360ms
02-16 20:55:59.270 1357-1849/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 440ms
02-16 20:55:59.570 1357-1803/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 450ms
02-16 20:55:59.730 1357-1849/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 460ms
02-16 20:55:59.900 1357-1726/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 480ms
02-16 20:56:00.050 1357-1803/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 480ms
02-16 20:56:00.220 1357-1849/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 490ms
02-16 20:56:00.240 1357-1726/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 340ms
02-16 20:56:00.380 1357-1803/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 330ms
02-16 20:56:00.530 1357-1849/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 310ms
02-16 20:56:00.680 1357-1726/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 440ms
02-16 20:56:00.830 1357-1803/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 450ms
02-16 20:56:00.990 1357-1849/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 460ms
02-16 20:56:01.150 1357-1726/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 470ms
02-16 20:56:01.300 1357-1803/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 470ms
02-16 20:56:01.600 1357-1726/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 450ms
02-16 20:56:01.750 1357-1803/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 450ms
02-16 20:56:01.910 1357-1849/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 460ms
02-16 20:56:02.070 1357-1726/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 470ms
02-16 20:56:02.210 1357-1803/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 460ms
02-16 20:56:02.360 1357-1849/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 450ms
02-16 20:56:02.510 1357-1726/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 440ms
02-16 20:56:02.660 1357-1803/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 450ms
02-16 20:56:02.810 1357-1849/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 450ms
02-16 20:56:02.960 1357-1726/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 450ms
02-16 20:56:02.980 1357-1803/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 320ms
02-16 20:56:03.120 1357-1849/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 310ms
02-16 20:56:03.120 1357-1726/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowManagerService$H.handleMessage(android.os.Message) from WindowManagerService.java:8000 waiters=2 for 160ms
02-16 20:56:03.120 1357-1803/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=2 for 140ms
02-16 20:56:03.120 2313-2313/? D/AndroidRuntime: Shutting down VM
02-16 20:56:03.290 1357-1849/? W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowManagerService$H.handleMessage(android.os.Message) from WindowManagerService.java:7820 waiters=2 for 160ms
02-16 20:56:03.290 1357-1371/? W/art: Long monitor contention event with owner method=int com.android.server.am.ActivityStackSupervisor.startActivityMayWait(android.app.IApplicationThread, int, java.lang.String, android.content.Intent, java.lang.String, android.service.voice.IVoiceInteractionSession, com.android.internal.app.IVoiceInteractor, android.os.IBinder, java.lang.String, int, int, android.app.ProfilerInfo, android.app.IActivityManager$WaitResult, android.content.res.Configuration, android.os.Bundle, boolean, int, android.app.IActivityContainer, com.android.server.am.TaskRecord) from ActivityStackSupervisor.java:946 waiters=0 for 4.470s
02-16 20:56:03.290 2317-2317/? D/AndroidRuntime: Shutting down VM
02-16 20:56:03.290 1357-1388/? W/art: Long monitor contention event with owner method=int com.android.server.am.ActivityStackSupervisor.startActivityMayWait(android.app.IApplicationThread, int, java.lang.String, android.content.Intent, java.lang.String, android.service.voice.IVoiceInteractionSession, com.android.internal.app.IVoiceInteractor, android.os.IBinder, java.lang.String, int, int, android.app.ProfilerInfo, android.app.IActivityManager$WaitResult, android.content.res.Configuration, android.os.Bundle, boolean, int, android.app.IActivityContainer, com.android.server.am.TaskRecord) from ActivityStackSupervisor.java:946 waiters=1 for 3.280s
02-16 20:56:03.290 1357-1429/? W/art: Long monitor contention event with owner method=int com.android.server.am.ActivityStackSupervisor.startActivityMayWait(android.app.IApplicationThread, int, java.lang.String, android.content.Intent, java.lang.String, android.service.voice.IVoiceInteractionSession, com.android.internal.app.IVoiceInteractor, android.os.IBinder, java.lang.String, int, int, android.app.ProfilerInfo, android.app.IActivityManager$WaitResult, android.content.res.Configuration, android.os.Bundle, boolean, int, android.app.IActivityContainer, com.android.server.am.TaskRecord) from ActivityStackSupervisor.java:946 waiters=2 for 2.440s
02-16 20:56:03.320 1357-1849/? W/InputMethodManagerService: Got RemoteException sending setActive(false) notification to pid 2275 uid 10066
02-16 20:56:03.330 1697-1697/? I/Choreographer: Skipped 310 frames! The application may be doing too much work on its main thread.
02-16 20:56:03.790 1357-1371/? W/ActivityManager: Activity pause timeout for ActivityRecord{d0412ba u0 com.android.launcher3/.Launcher t132}
02-16 20:56:03.800 2332-2332/? I/art: Not late-enabling -Xcheck:jni (already on)
02-16 20:56:03.810 1357-1371/? I/ActivityManager: Start proc 2332:com.example.jahanara.externaldatabase/u0a66 for activity com.example.jahanara.externaldatabase/.MainActivity
02-16 20:56:03.810 2332-2332/? W/System: ClassLoader referenced unknown path: /data/app/com.example.jahanara.externaldatabase-2/lib/x86_64
02-16 20:56:03.910 1005-1122/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
02-16 20:56:03.910 2332-2347/? D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
02-16 20:56:04.190 1697-1697/? I/Choreographer: Skipped 51 frames! The application may be doing too much work on its main thread.
02-16 20:56:04.310 2332-2347/? I/OpenGLRenderer: Initialized EGL, version 1.4
02-16 20:56:05.450 1697-1697/? I/Choreographer: Skipped 73 frames! The application may be doing too much work on its main thread.
02-16 20:56:05.740 2332-2347/? W/EGL_emulation: eglSurfaceAttrib not implemented
02-16 20:56:05.740 2332-2347/? W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f691ce988c0, error=EGL_SUCCESS
02-16 20:56:07.210 2332-2345/? E/Entity Response :: [{"ID":"1","Name":"James Shuttleworth","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07591231231","Department":"Computing","AvailabilityID":"1000"},{"ID":"2","Name":"Mike Morgan","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07594422281","Department":"Computing","AvailabilityID":"1001"},{"ID":"3","Name":"Parveen Samra","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07594423333","Department":"Environment","AvailabilityID":"1002"},{"ID":"4","Name":"Vasile Constantin","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07598811337","Department":"Engineering","AvailabilityID":"1003"},{"ID":"5","Name":"George William","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07897211290","Department":"Engineering","AvailabilityID":"1004"},{"ID":"6","Name":"Amanda Brooks","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07335115226","Department":"Environment","AvailabilityID":"1005"},{"ID":"7","Name":"Sandy Taramonli","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07777222311","Department":"Computing","AvailabilityID":"1006"},{"ID":"8","Name":"Mark Bennett","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07747222441","Department":"Environment","AvailabilityID":"1007"},{"ID":"9","Name":"Amritpal Slaich","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07747722141","Department":"Engineering","AvailabilityID":"1008"},{"ID":"10","Name":"Harminder Kaur","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07669931771","Department":"Engineering","AvailabilityID":"1009"},{"ID":"11","Name":"Leon Smalov","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07734541236","Department":"Computing","AvailabilityID":"1010"},{"ID":"12","Name":"Mark Tyers","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07734529936","Department":"Computing","AvailabilityID":"1011"},{"ID":"13","Name":"Farzana Aslam","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07414622990","Department":"Engineering","AvailabilityID":"1012"},{"ID":"14","Name":"Yih-Ling Hedley","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07552410090","Department":"Engineering","AvailabilityID":"1013"},{"ID":"15","Name":"Abdullahi Ahmed","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07552410091","Department":"Engineering","AvailabilityID":"1014"},{"ID":"16","Name":"Carl Mills","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07552410092","Department":"Design","AvailabilityID":"1015"},{"ID":"17","Name":"Una Malone","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07552410093","Department":"Engineering","AvailabilityID":"1016"},{"ID":"18","Name":"Reda Al Bodour","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07552410094","Department":"Computing","AvailabilityID":"1017"},{"ID":"19","Name":"Phillip Smith","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07552410095","Department":"Computing","AvailabilityID":"1018"},{"ID":"20","Name":"Erik Barrow","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07552410096","Department":"Computing","AvailabilityID":"1019"},{"ID":"21","Name":"Luke Hicks","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07552410097","Department":"Computing","AvailabilityID":"1020"},{"ID":"22","Name":"Ateya Asgar","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07552410098","Department":"Engineering","AvailabilityID":"1021"},{"ID":"23","Name":"Xiang Fei","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07552410099","Department":"Computing","AvailabilityID":"1022"},{"ID":"24","Name":"Zahir Ahmad","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07552410100","Department":"Engineering","AvailabilityID":"1023"},{"ID":"25","Name":"Carey Pridgeon","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07552410101","Department":"Computing","AvailabilityID":"1024"},{"ID":"26","Name":"Hong Guo","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07552410102","Department":"Computing","AvailabilityID":"1025"},{"ID":"27","Name":"Richard Lane","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07552410103","Department":"Environment","AvailabilityID":"1026"},{"ID":"28","Name":"Bill Dunn","EmailAddress":"eduardhanu#yahoo.com","PhoneNo":"07552410104","Department":"E
02-16 20:56:07.930 1357-1376/? I/ActivityManager: Displayed com.example.jahanara.externaldatabase/.MainActivity: +4s140ms
02-16 20:56:08.130 1697-1828/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7f690cc1d750
Your setTextToTextView method is called by the onPostExecute method.
But this method simply set a variable s concatenating the value of the json objects.
It doesn't set the value in the responseTextView (the TextView) defined in the onCreate method.
You have to call somenthing like:
responseTextView.setText(s);
I am at the beginning stage on developing an application, which needs scan the wifi APs per second. The scanning part works well on one HTC hero, however, it takes 6 seconds for my galaxy tab to finish one scan.
I write a very simple program, scanning wifi continuously and note down how long it takes for one scan. (from wifi.startScan() to receiver get results). In HTC phone, it's 500 ms, but in Samsung tab, it takes 6s on average. I wonder if anyone can help me to solve this problem. Is it because Samsung changed the os or because the hardware's problem?
the program is as follows:
import java.util.Date;
import java.util.List;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.wifi.ScanResult;
import android.net.wifi.WifiManager;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
public class wifiScan extends Activity {
private class WifiReceiver extends BroadcastReceiver{
#Override
public void onReceive(Context c, Intent intent) {
List<ScanResult> results = wifi.getScanResults();
Date tempDate=new Date();
String info=testNumber+" "+(tempDate.getTime()-testDate.getTime())+" "+results.size();
Log.i("wifiScan", info);
wifiText.setText(info);
testNumber++;
testDate=new Date();
wifi.startScan();
}
}
private TextView wifiText;
private WifiManager wifi;
private WifiReceiver receiver;
private Date testDate;
private static int testNumber=0;
/** Called when the activity is first created. */
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
testNumber=0;
wifiText = (TextView) findViewById(R.id.wifiText);
receiver=new WifiReceiver();
registerReceiver(receiver, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
wifi =(WifiManager)getSystemService(Context.WIFI_SERVICE);
if(!wifi.isWifiEnabled()){
wifi.setWifiEnabled(true);
}
startScan();
}
#Override
public void onStop(){
super.onStop();
finish();
}
public void startScan(){
testDate=new Date();
wifi.startScan();
}
}
The log info is as follows:
02-16 15:42:22.600: WARN/PowerManagerService(2484): Timer 0x1->0x0|0x1
02-16 15:42:22.600: ERROR/PowerManagerService(2484): CurLock p:3 mPS:1
02-16 15:42:22.600: WARN/PowerManagerService(2484): type=SCREEN_DIM_WAKE_LOCK 'StayOnWhilePluggedIn Screen Dim' active (minState=1) activeT=1257228
02-16 15:42:22.607: WARN/PowerManagerService(2484): type=PARTIAL_WAKE_LOCK 'StayOnWhilePluggedIn Partial' active (minState=0) activeT=1257228
02-16 15:42:24.005: DEBUG/dalvikvm(3374): GC_EXPLICIT freed 790 objects / 55536 bytes in 143ms
02-16 15:42:24.775: DEBUG/AndroidRuntime(4056): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
02-16 15:42:24.775: DEBUG/AndroidRuntime(4056): CheckJNI is OFF
02-16 15:42:24.784: DEBUG/AndroidRuntime(4056): setted country_code = SINGAPORE
02-16 15:42:24.784: DEBUG/AndroidRuntime(4056): setted sales_code = XSP
02-16 15:42:24.784: DEBUG/AndroidRuntime(4056): found sales_code tag = <XSP>, </XSP>
02-16 15:42:24.792: DEBUG/dalvikvm(4056): creating instr width table
02-16 15:42:24.822: DEBUG/AndroidRuntime(4056): --- registering native functions ---
02-16 15:42:24.904: DEBUG/LibQmg_native(4056): register_android_app_LibQmg
02-16 15:42:24.986: DEBUG/AndroidRuntime(4056): Shutting down VM
02-16 15:42:24.986: DEBUG/dalvikvm(4056): Debugger has detached; object registry had 1 entries
02-16 15:42:24.993: INFO/AndroidRuntime(4056): NOTE: attach of thread 'Binder Thread #2' failed
02-16 15:42:25.169: DEBUG/AndroidRuntime(4064): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
02-16 15:42:25.169: DEBUG/AndroidRuntime(4064): CheckJNI is OFF
02-16 15:42:25.176: DEBUG/AndroidRuntime(4064): setted country_code = SINGAPORE
02-16 15:42:25.176: DEBUG/AndroidRuntime(4064): setted sales_code = XSP
02-16 15:42:25.176: DEBUG/AndroidRuntime(4064): found sales_code tag = <XSP>, </XSP>
02-16 15:42:25.184: DEBUG/dalvikvm(4064): creating instr width table
02-16 15:42:25.212: DEBUG/AndroidRuntime(4064): --- registering native functions ---
02-16 15:42:25.286: DEBUG/LibQmg_native(4064): register_android_app_LibQmg
02-16 15:42:25.368: INFO/ActivityManager(2484): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=nus.master.test/.wifiScan }
02-16 15:42:25.376: INFO/Launcher(3211): onPause()
02-16 15:42:25.411: DEBUG/AndroidRuntime(4064): Shutting down VM
02-16 15:42:25.411: DEBUG/dalvikvm(4064): Debugger has detached; object registry had 1 entries
02-16 15:42:25.419: INFO/AndroidRuntime(4064): NOTE: attach of thread 'Binder Thread #2' failed
02-16 15:42:25.450: INFO/wpa_supplicant(3810): CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00
02-16 15:42:25.450: INFO/WifiMonitor(2484): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00]
02-16 15:42:25.454: VERBOSE/WifiStateTracker(2484): Changing supplicant state: INACTIVE ==> SCANNING
02-16 15:42:25.454: DEBUG/NetworkStateTracker(2484): setDetailed state, old =IDLE and new state=SCANNING
02-16 15:42:25.454: DEBUG/ConnectivityService(2484): Dropping ConnectivityChange for WIFI: DISCONNECTED/SCANNING
02-16 15:42:25.611: INFO/Launcher(3211): onWindowFocusChanged(false)
02-16 15:42:30.724: DEBUG/dalvikvm(3200): GC_EXPLICIT freed 4001 objects / 233800 bytes in 118ms
02-16 15:42:30.892: INFO/WifiMonitor(2484): Event [ SCAN-RESULTS ]
02-16 15:42:30.892: INFO/wpa_supplicant(3810): WPS-AP-AVAILABLE
02-16 15:42:30.892: INFO/wpa_supplicant(3810): CTRL-EVENT-NO-CONNECTION
02-16 15:42:30.896: INFO/wpa_supplicant(3810): CTRL-EVENT-STATE-CHANGE id=-1 state=1 BSSID=00:00:00:00:00:00
02-16 15:42:30.900: INFO/WifiMonitor(2484): Event [WPS-AP-AVAILABLE ]
02-16 15:42:30.900: INFO/WifiMonitor(2484): Event [CTRL-EVENT-NO-CONNECTION]
02-16 15:42:30.900: INFO/WifiMonitor(2484): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=1 BSSID=00:00:00:00:00:00]
02-16 15:42:30.947: INFO/wpa_supplicant(3810): SAN_RESULTS : [34]
02-16 15:42:30.958: INFO/wpa_supplicant(3810): SAN_RESULTS : [34]
02-16 15:42:30.970: VERBOSE/WifiStateTracker(2484): Changing supplicant state: SCANNING ==> INACTIVE
02-16 15:42:30.970: DEBUG/NetworkStateTracker(2484): setDetailed state, old =SCANNING and new state=IDLE
02-16 15:42:30.970: DEBUG/ConnectivityService(2484): Dropping ConnectivityChange for WIFI: DISCONNECTED/IDLE
02-16 15:42:31.009: INFO/NetworkStatusReceiver(2935): action: android.net.wifi.SHOW_AP_LIST_DIALOG
02-16 15:42:31.021: ERROR/WifiManager(2935): showApDialog
02-16 15:42:31.025: INFO/WifiService(2484): isShowingAccessPointListDialog():false
02-16 15:42:31.029: INFO/WifiService(2484): setShowAccessPointListDialog():false
02-16 15:42:31.060: INFO/wifiScan(4009): 0 5609 21
02-16 15:42:31.064: INFO/wpa_supplicant(3810): CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00
02-16 15:42:31.064: INFO/WifiMonitor(2484): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00]
02-16 15:42:31.068: VERBOSE/WifiStateTracker(2484): Changing supplicant state: INACTIVE ==> SCANNING
02-16 15:42:31.068: DEBUG/NetworkStateTracker(2484): setDetailed state, old =IDLE and new state=SCANNING
02-16 15:42:31.068: DEBUG/ConnectivityService(2484): Dropping ConnectivityChange for WIFI: DISCONNECTED/SCANNING
02-16 15:42:36.536: INFO/WifiMonitor(2484): Event [ SCAN-RESULTS ]
02-16 15:42:36.536: INFO/wpa_supplicant(3810): WPS-AP-AVAILABLE
02-16 15:42:36.536: INFO/wpa_supplicant(3810): CTRL-EVENT-NO-CONNECTION
02-16 15:42:36.540: INFO/wpa_supplicant(3810): CTRL-EVENT-STATE-CHANGE id=-1 state=1 BSSID=00:00:00:00:00:00
02-16 15:42:36.544: INFO/WifiMonitor(2484): Event [WPS-AP-AVAILABLE ]
02-16 15:42:36.544: INFO/WifiMonitor(2484): Event [CTRL-EVENT-NO-CONNECTION]
02-16 15:42:36.544: INFO/WifiMonitor(2484): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=1 BSSID=00:00:00:00:00:00]
02-16 15:42:36.587: INFO/wpa_supplicant(3810): SAN_RESULTS : [35]
02-16 15:42:36.611: INFO/wpa_supplicant(3810): SAN_RESULTS : [35]
02-16 15:42:36.634: VERBOSE/WifiStateTracker(2484): Changing supplicant state: SCANNING ==> INACTIVE
02-16 15:42:36.634: DEBUG/NetworkStateTracker(2484): setDetailed state, old =SCANNING and new state=IDLE
02-16 15:42:36.661: INFO/NetworkStatusReceiver(2935): action: android.net.wifi.SHOW_AP_LIST_DIALOG
02-16 15:42:36.665: DEBUG/ConnectivityService(2484): Dropping ConnectivityChange for WIFI: DISCONNECTED/IDLE
02-16 15:42:36.665: ERROR/WifiManager(2935): showApDialog
02-16 15:42:36.669: INFO/WifiService(2484): isShowingAccessPointListDialog():false
02-16 15:42:36.669: INFO/WifiService(2484): setShowAccessPointListDialog():false
02-16 15:42:36.724: INFO/wifiScan(4009): 1 5662 22
02-16 15:42:36.728: INFO/wpa_supplicant(3810): CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00
02-16 15:42:36.728: INFO/WifiMonitor(2484): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00]
02-16 15:42:36.732: VERBOSE/WifiStateTracker(2484): Changing supplicant state: INACTIVE ==> SCANNING
02-16 15:42:36.732: DEBUG/NetworkStateTracker(2484): setDetailed state, old =IDLE and new state=SCANNING
02-16 15:42:36.736: DEBUG/ConnectivityService(2484): Dropping ConnectivityChange for WIFI: DISCONNECTED/SCANNING
02-16 15:42:41.247: DEBUG/BatteryService(2484): update start
02-16 15:42:41.275: DEBUG/BatteryService(2484): updateBattery level:83 scale:100 status:4 health:2 present:true voltage: 4051 temperature: 330 technology: Li-ion AC powered:false USB powered:true icon:17302421
02-16 15:42:41.314: DEBUG/CorePlayerService(3270): mSystemReceiver:onReceive(action=android.intent.action.BATTERY_CHANGED) is called
02-16 15:42:41.357: DEBUG/WifiService(2484): ACTION_BATTERY_CHANGED pluggedType: 2
02-16 15:42:42.177: INFO/WifiMonitor(2484): Event [ SCAN-RESULTS ]
02-16 15:42:42.177: INFO/wpa_supplicant(3810): WPS-AP-AVAILABLE
02-16 15:42:42.181: INFO/wpa_supplicant(3810): CTRL-EVENT-NO-CONNECTION
02-16 15:42:42.181: INFO/wpa_supplicant(3810): CTRL-EVENT-STATE-CHANGE id=-1 state=1 BSSID=00:00:00:00:00:00
02-16 15:42:42.185: INFO/WifiMonitor(2484): Event [WPS-AP-AVAILABLE ]
02-16 15:42:42.189: INFO/WifiMonitor(2484): Event [CTRL-EVENT-NO-CONNECTION]
02-16 15:42:42.193: INFO/WifiMonitor(2484): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=1 BSSID=00:00:00:00:00:00]
02-16 15:42:42.216: INFO/wpa_supplicant(3810): SAN_RESULTS : [36]
02-16 15:42:42.240: INFO/wpa_supplicant(3810): SAN_RESULTS : [36]
02-16 15:42:42.240: VERBOSE/WifiStateTracker(2484): Changing supplicant state: SCANNING ==> INACTIVE
02-16 15:42:42.240: DEBUG/NetworkStateTracker(2484): setDetailed state, old =SCANNING and new state=IDLE
02-16 15:42:42.247: DEBUG/ConnectivityService(2484): Dropping ConnectivityChange for WIFI: DISCONNECTED/IDLE
02-16 15:42:42.271: INFO/NetworkStatusReceiver(2935): action: android.net.wifi.SHOW_AP_LIST_DIALOG
02-16 15:42:42.271: ERROR/WifiManager(2935): showApDialog
02-16 15:42:42.275: INFO/WifiService(2484): isShowingAccessPointListDialog():false
02-16 15:42:42.282: INFO/WifiService(2484): setShowAccessPointListDialog():false
02-16 15:42:42.314: INFO/wifiScan(4009): 2 5588 21
02-16 15:42:42.322: INFO/wpa_supplicant(3810): CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00
02-16 15:42:42.322: INFO/WifiMonitor(2484): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00]
02-16 15:42:42.326: VERBOSE/WifiStateTracker(2484): Changing supplicant state: INACTIVE ==> SCANNING
02-16 15:42:42.329: DEBUG/NetworkStateTracker(2484): setDetailed state, old =IDLE and new state=SCANNING
02-16 15:42:42.329: DEBUG/ConnectivityService(2484): Dropping ConnectivityChange for WIFI: DISCONNECTED/SCANNING
02-16 15:42:43.255: DEBUG/BatteryService(2484): update start
02-16 15:42:43.294: DEBUG/BatteryService(2484): updateBattery level:83 scale:100 status:4 health:2 present:true voltage: 4080 temperature: 320 technology: Li-ion AC powered:false USB powered:true icon:17302421
02-16 15:42:43.384: DEBUG/WifiService(2484): ACTION_BATTERY_CHANGED pluggedType: 2
02-16 15:42:43.388: DEBUG/CorePlayerService(3270): mSystemReceiver:onReceive(action=android.intent.action.BATTERY_CHANGED) is called
02-16 15:42:47.783: INFO/WifiMonitor(2484): Event [ SCAN-RESULTS ]
02-16 15:42:47.786: INFO/wpa_supplicant(3810): WPS-AP-AVAILABLE
02-16 15:42:47.786: INFO/wpa_supplicant(3810): CTRL-EVENT-NO-CONNECTION
02-16 15:42:47.786: INFO/wpa_supplicant(3810): CTRL-EVENT-STATE-CHANGE id=-1 state=1 BSSID=00:00:00:00:00:00
02-16 15:42:47.798: INFO/WifiMonitor(2484): Event [WPS-AP-AVAILABLE ]
02-16 15:42:47.798: INFO/WifiMonitor(2484): Event [CTRL-EVENT-NO-CONNECTION]
02-16 15:42:47.814: INFO/WifiMonitor(2484): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=1 BSSID=00:00:00:00:00:00]
02-16 15:42:47.826: INFO/wpa_supplicant(3810): SAN_RESULTS : [38]
02-16 15:42:47.853: INFO/wpa_supplicant(3810): SAN_RESULTS : [38]
02-16 15:42:47.872: VERBOSE/WifiStateTracker(2484): Changing supplicant state: SCANNING ==> INACTIVE
02-16 15:42:47.872: DEBUG/NetworkStateTracker(2484): setDetailed state, old =SCANNING and new state=IDLE
02-16 15:42:47.904: INFO/NetworkStatusReceiver(2935): action: android.net.wifi.SHOW_AP_LIST_DIALOG
02-16 15:42:47.919: DEBUG/ConnectivityService(2484): Dropping ConnectivityChange for WIFI: DISCONNECTED/IDLE
02-16 15:42:47.923: ERROR/WifiManager(2935): showApDialog
02-16 15:42:47.927: INFO/WifiService(2484): isShowingAccessPointListDialog():false
02-16 15:42:47.931: INFO/WifiService(2484): setShowAccessPointListDialog():false
02-16 15:42:47.970: INFO/wifiScan(4009): 3 5652 26
02-16 15:42:47.974: INFO/wpa_supplicant(3810): CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00
02-16 15:42:47.974: INFO/WifiMonitor(2484): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00]
02-16 15:42:47.986: VERBOSE/WifiStateTracker(2484): Changing supplicant state: INACTIVE ==> SCANNING
02-16 15:42:47.986: DEBUG/NetworkStateTracker(2484): setDetailed state, old =IDLE and new state=SCANNING
02-16 15:42:47.986: DEBUG/ConnectivityService(2484): Dropping ConnectivityChange for WIFI: DISCONNECTED/SCANNING
02-16 15:42:53.423: INFO/WifiMonitor(2484): Event [ SCAN-RESULTS ]
02-16 15:42:53.427: INFO/wpa_supplicant(3810): WPS-AP-AVAILABLE
02-16 15:42:53.427: INFO/wpa_supplicant(3810): CTRL-EVENT-NO-CONNECTION
02-16 15:42:53.427: INFO/wpa_supplicant(3810): CTRL-EVENT-STATE-CHANGE id=-1 state=1 BSSID=00:00:00:00:00:00
02-16 15:42:53.435: INFO/WifiMonitor(2484): Event [WPS-AP-AVAILABLE ]
02-16 15:42:53.439: INFO/WifiMonitor(2484): Event [CTRL-EVENT-NO-CONNECTION]
02-16 15:42:53.439: INFO/WifiMonitor(2484): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=1 BSSID=00:00:00:00:00:00]
02-16 15:42:53.462: INFO/wpa_supplicant(3810): SAN_RESULTS : [37]
02-16 15:42:53.482: INFO/wpa_supplicant(3810): SAN_RESULTS : [37]
02-16 15:42:53.493: VERBOSE/WifiStateTracker(2484): Changing supplicant state: SCANNING ==> INACTIVE
02-16 15:42:53.497: DEBUG/NetworkStateTracker(2484): setDetailed state, old =SCANNING and new state=IDLE
02-16 15:42:53.525: DEBUG/ConnectivityService(2484): Dropping ConnectivityChange for WIFI: DISCONNECTED/IDLE
02-16 15:42:53.529: INFO/NetworkStatusReceiver(2935): action: android.net.wifi.SHOW_AP_LIST_DIALOG
02-16 15:42:53.529: ERROR/WifiManager(2935): showApDialog
02-16 15:42:53.532: INFO/WifiService(2484): isShowingAccessPointListDialog():false
02-16 15:42:53.532: INFO/WifiService(2484): setShowAccessPointListDialog():false
02-16 15:42:53.575: INFO/wifiScan(4009): 4 5602 24
02-16 15:42:53.579: INFO/wpa_supplicant(3810): CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00
02-16 15:42:53.579: INFO/WifiMonitor(2484): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00]
02-16 15:42:53.591: VERBOSE/WifiStateTracker(2484): Changing supplicant state: INACTIVE ==> SCANNING
02-16 15:42:53.591: DEBUG/NetworkStateTracker(2484): setDetailed state, old =IDLE and new state=SCANNING
02-16 15:42:53.595: DEBUG/ConnectivityService(2484): Dropping ConnectivityChange for WIFI: DISCONNECTED/SCANNING
02-16 15:42:59.040: INFO/WifiMonitor(2484): Event [ SCAN-RESULTS ]
02-16 15:42:59.040: INFO/wpa_supplicant(3810): WPS-AP-AVAILABLE
02-16 15:42:59.044: INFO/wpa_supplicant(3810): CTRL-EVENT-NO-CONNECTION
02-16 15:42:59.048: INFO/wpa_supplicant(3810): CTRL-EVENT-STATE-CHANGE id=-1 state=1 BSSID=00:00:00:00:00:00
02-16 15:42:59.048: INFO/WifiMonitor(2484): Event [WPS-AP-AVAILABLE ]
02-16 15:42:59.056: INFO/WifiMonitor(2484): Event [CTRL-EVENT-NO-CONNECTION]
02-16 15:42:59.075: INFO/WifiMonitor(2484): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=1 BSSID=00:00:00:00:00:00]
02-16 15:42:59.091: INFO/wpa_supplicant(3810): SAN_RESULTS : [38]
02-16 15:42:59.115: INFO/wpa_supplicant(3810): SAN_RESULTS : [38]
02-16 15:42:59.122: VERBOSE/WifiStateTracker(2484): Changing supplicant state: SCANNING ==> INACTIVE
02-16 15:42:59.122: DEBUG/NetworkStateTracker(2484): setDetailed state, old =SCANNING and new state=IDLE
02-16 15:42:59.138: DEBUG/ConnectivityService(2484): Dropping ConnectivityChange for WIFI: DISCONNECTED/IDLE
02-16 15:42:59.142: INFO/NetworkStatusReceiver(2935): action: android.net.wifi.SHOW_AP_LIST_DIALOG
02-16 15:42:59.154: ERROR/WifiManager(2935): showApDialog
02-16 15:42:59.158: INFO/WifiService(2484): isShowingAccessPointListDialog():false
02-16 15:42:59.161: INFO/WifiService(2484): setShowAccessPointListDialog():false
02-16 15:42:59.204: INFO/wifiScan(4009): 5 5626 22
02-16 15:42:59.204: INFO/wpa_supplicant(3810): CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00
02-16 15:42:59.204: INFO/WifiMonitor(2484): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00]
02-16 15:42:59.208: VERBOSE/WifiStateTracker(2484): Changing supplicant state: INACTIVE ==> SCANNING
02-16 15:42:59.208: DEBUG/NetworkStateTracker(2484): setDetailed state, old =IDLE and new state=SCANNING
02-16 15:42:59.208: DEBUG/ConnectivityService(2484): Dropping ConnectivityChange for WIFI: DISCONNECTED/SCANNING
02-16 15:43:00.025: VERBOSE/AlarmManager(2484): set: Alarm{47dfb360 type 1 android}
I would guess that what you see is the difference between passive and active scan.
If you scan passively you have to stay at least 100ms on each channel (probably
closer to 200ms in practice) while with an active scan you can scan a lot quicker.
Presumably the 6s scan is passive while the 500ms scan is active.
With regulatory domain the device is not allowed to transmit unless it can figure
out which channels are allowed so it must scan passively until it gets the information
it needs. After that it should be able to switch to active scanning.
If you want active scan, you can call wifi.startScanActive().