Simple application that scans Wi-Fi networks.
This one for a reference: Get available wi-fi scan result in customized listview
Just put a ListView in a layout and add ACCESS/CHANGE_WIFI_STATE permissions into manifest.
The problem is that it works on my Samsung J3 (2016), but I don't know why it doesn't on my new Samsung M11. Has it something to do with Android versions? I have already returned a Realme C3 that was having same issues because I thought it was due to Mediatek SOC.
SAMSUNG M11 (Android 10) LOG:
03/28 20:09:56: Launching 'app' on Physical Device.
Install successfully finished in 3 s 220 ms.
$ adb shell am start -n "es.josecarlos.myapplication/es.josecarlos.myapplication.SearchWifi" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 29558 on device 'samsung-sm_m115f-R9JR30FM7HJ'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/s.myapplicatio: Late-enabling -Xcheck:jni
E/s.myapplicatio: Unknown bits set in runtime_flags: 0x8000
D/ActivityThread: setConscryptValidator
D/ActivityThread: setConscryptValidator - put
E/ANDR-PERF: IPerf:: Perf HAL Service is not available.
E/ANDR-PERF: IPerf:: Perf HAL Service is not available.
E/ANDR-PERF: IPerf:: Perf HAL Service is not available.
I/Perf: Connecting to perf service.
I/s.myapplicatio: Starting a blocking GC Alloc
Starting a blocking GC Alloc
I/s.myapplicatio: Waiting for a blocking GC Alloc
I/s.myapplicatio: WaitForGcToComplete blocked Alloc on ClassLinker for 20.796ms
Starting a blocking GC Alloc
D/PhoneWindow: forceLight changed to true [] from com.android.internal.policy.PhoneWindow.updateForceLightNavigationBar:4238 com.android.internal.policy.DecorView.updateColorViews:1490 com.android.internal.policy.PhoneWindow.dispatchWindowAttributesChanged:3216 android.view.Window.setFlags:1148 com.android.internal.policy.PhoneWindow.generateLayout:2444
I/MultiWindowDecorSupport: updateCaptionType >> DecorView#9ffef9d[], isFloating: false, isApplication: true, hasWindowDecorCaption: false, hasWindowControllerCallback: true
D/MultiWindowDecorSupport: setCaptionType = 0, DecorView = DecorView#9ffef9d[]
W/s.myapplicatio: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
W/s.myapplicatio: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
D/ViewRootImpl#73bc89c[SearchWifi]: setView = com.android.internal.policy.DecorView#9ffef9d TM=true MM=false
D/ViewRootImpl#73bc89c[SearchWifi]: Relayout returned: old=(0,0,720,1560) new=(0,0,720,1560) req=(720,1560)0 dur=14 res=0x7 s={true 3550955520} ch=true
D/OpenGLRenderer: createReliableSurface : 0xd3a8e0c0, 0xd3a74800
I/AdrenoGLES: QUALCOMM build : 2ced3f2, Id01cc02572
Build Date : 12/15/19
OpenGL ES Shader Compiler Version: EV031.27.05.02
Local Branch :
Remote Branch : refs/tags/AU_LINUX_ANDROID_LA.UM.8.6.2.R1.10.00.00.537.049
Remote Branch : NONE
Reconstruct Branch : NOTHING
Build Config : S L 8.0.10 AArch32
D/AbsListView: in onLayout changed
I/AdrenoGLES: PFP: 0x005ff112, ME: 0x005ff066
W/Gralloc3: mapper 3.x is not supported
D/ViewRootImpl#73bc89c[SearchWifi]: MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager: prepareNavigationBarInfo() DecorView#9ffef9d[SearchWifi]
getNavigationBarColor() -855310
D/InputMethodManager: prepareNavigationBarInfo() DecorView#9ffef9d[SearchWifi]
getNavigationBarColor() -855310
V/InputMethodManager: Starting input: tba=es.josecarlos.myapplication ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager: startInputInner - Id : 0
I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
D/ViewRootImpl#73bc89c[SearchWifi]: MSG_RESIZED: frame=(0,0,720,1560) ci=(0,65,0,84) vi=(0,65,0,84) or=1
D/InputMethodManager: prepareNavigationBarInfo() DecorView#9ffef9d[SearchWifi]
D/InputMethodManager: getNavigationBarColor() -855310
V/InputMethodManager: Starting input: tba=es.josecarlos.myapplication ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager: startInputInner - Id : 0
D/ViewRootImpl#73bc89c[SearchWifi]: ViewPostIme pointer 0
D/ViewRootImpl#73bc89c[SearchWifi]: ViewPostIme pointer 1
D/ViewRootImpl#47f6701[Toast]: setView = android.widget.LinearLayout#76759a6 TM=true MM=false
V/Toast: Text: Fsca in android.widget.Toast$TN#b5efe7
D/ViewRootImpl#47f6701[Toast]: Relayout returned: old=(0,65,720,1476) new=(232,1287,488,1364) req=(256,77)0 dur=12 res=0x7 s={true 3550953472} ch=true
D/OpenGLRenderer: createReliableSurface : 0xb8abc140, 0xd3a74000
D/ViewRootImpl#47f6701[Toast]: MSG_RESIZED: frame=(232,1287,488,1364) ci=(0,0,0,0) vi=(0,0,256,77) or=1
D/ViewRootImpl#47f6701[Toast]: dispatchDetachedFromWindow
D/InputTransport: Input channel destroyed: 'c01175c', fd=75
SAMSUNG J3 (Android 5.1) LOG:
03/28 20:19:39: Launching 'app' on Physical Device.
Install successfully finished in 1 m 15 s 28 ms.
$ adb shell am start -n "es.josecarlos.myapplication/es.josecarlos.myapplication.SearchWifi" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 8248 on device 'samsung-sm_j320fn-42000d659a379400'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
W/ResourcesManager: getTopLevelResources: /data/app/es.josecarlos.myapplication-1/base.apk / 1.0 running in es.josecarlos.myapplication rsrc of package es.josecarlos.myapplication
I/InjectionManager: Inside getClassLibPath + mLibMap{0=, 1=}
D/ResourcesManager: For user 0 new overlays fetched Null
I/InjectionManager: Inside getClassLibPath caller
D/InjectionManager: InjectionManager
fillFeatureStoreMap es.josecarlos.myapplication
I/InjectionManager: Constructor es.josecarlos.myapplication, Feature store :{}
featureStore :{}
W/ResourcesManager: getTopLevelResources: /data/app/es.josecarlos.myapplication-1/base.apk / 1.0 running in es.josecarlos.myapplication rsrc of package es.josecarlos.myapplication
W/ResourcesManager: getTopLevelResources: /data/app/es.josecarlos.myapplication-1/base.apk / 1.0 running in es.josecarlos.myapplication rsrc of package es.josecarlos.myapplication
getTopLevelResources: /data/app/es.josecarlos.myapplication-1/base.apk / 1.0 running in es.josecarlos.myapplication rsrc of package es.josecarlos.myapplication
D/ResourcesManager: For user 0 new overlays fetched Null
W/ResourceType: Failure getting entry for 0x01080946 (t=7 e=2374) (error -75)
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
D/PhoneWindow: *FMB* installDecor mIsFloating : false
*FMB* installDecor flags : -2139029248
I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>
Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>
D/TextView: setTypeface with style : 0
D/TextView: setTypeface with style : 0
D/TextView: setTypeface with style : 0
W/ResourceType: Failure getting entry for 0x01080946 (t=7 e=2374) (error -75)
Failure getting entry for 0x01080946 (t=7 e=2374) (error -75)
D/AbsListView: Get MotionRecognitionManager
E/MotionRecognitionManager: mSContextService = null
motionService = null
D/Activity: performCreate Call Injection manager
I/InjectionManager: dispatchOnViewCreated > Target : es.josecarlos.myapplication.SearchWifi isFragment :false
D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: false
D/PhoneWindow: *FMB* isFloatingMenuEnabled mFloatingMenuBtn : null
*FMB* isFloatingMenuEnabled return false
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Get maximum texture size. GL_MAX_TEXTURE_SIZE is 4096
Enabling debug mode 0
I/InjectionManager: dispatchCreateOptionsMenu :es.josecarlos.myapplication.SearchWifi
dispatchPrepareOptionsMenu :es.josecarlos.myapplication.SearchWifi
D/TextView: setTypeface with style : 0
D/TextView: setTypeface with style : 0
D/TextView: setTypeface with style : 0
setTypeface with style : 0
I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy#117c6e4b time:365818
D/ViewRootImpl: ViewPostImeInputStage ACTION_DOWN
D/TextView: setTypeface with style : 0
D/TextView: setTypeface with style : 0
setTypeface with style : 0
D/TextView: setTypeface with style : 0
D/InputMethodManager: windowDismissed mLockisused = false
Solved. I had to add FINE_LOCATION to the manifest and:
Manually give location permissions in Settings.
or
Make a popup that asks for location permissions the first time the user launch the app.
Related
I have some problems with this log. When I close the cover of my phone it says this and my activity goes to next one when this should not happen. Is it possible to avoid this happening?? Avoid Relayout or focus changing??
It doesn't happen when in a Second phone with PIN number. (So i need to put the pin to unlock the phone).
With no PIN so, phone is not locked, just closed the cover. When I open again and the activity restart, the activity had finished and went to next one.
With the second phone, with PIN, when I close I have to put the PIN to enter again and in this case, the activity went in the normal way.
D/InputMethodManager: prepareNavigationBarInfo() DecorView#670a516[Fer_Habit]
getNavigationBarColor() -855310
V/InputMethodManager: Starting input: tba=com.example.gms ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : false , NavTrans : false
D/InputMethodManager: startInputInner - Id : 0
I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
D/InputTransport: Input channel destroyed: 'ClientS', fd=129
V/FA: Recording user engagement, ms: 9675
V/FA: Connecting to remote service
V/FA: Activity paused, time: 742123461
I/ViewRootImpl#e954868[Class1]: stopped(true) old=false
D/OpenGLRenderer: makeCurrent EglSurface : 0x72a3179900 -> 0x0
V/FA: Connection attempt already in progress
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 2
D/OpenGLRenderer: destroyEglSurface : 0x72a3179900
I/mali_egl: eglDestroySurface() in
I/mali_winsys: delete_surface() [2960x1440] return
I/mali_egl: eglDestroySurface() out
E/OpenGLRenderer: ReliableSurface: perform returned an error
W/libEGL: EGLNativeWindowType 0x72e1651f50 disconnect failed
D/OpenGLRenderer: ~ReliableSurface : 0x72e1651f40
I/ViewRootImpl#e954868[Class1]: Relayout returned: old=(0,0,2960,1440) new=(0,0,2960,1440) req=(2960,1440)8 dur=4 res=0x5 s={false 0} ch=false
I/ViewRootImpl#e954868[Class1]: MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager: prepareNavigationBarInfo() DecorView#670a516[Class1]
getNavigationBarColor() -855310
I am trying to learn how to use Bluetooth in android. However, I've already bumped into an issue to which I cannot seem to find the answer. When I am calling .startDiscovery() on the Bluetooth adapter it returns false, meaning that it failed. I am not doing anything strange, I get the bluetoothAdapter using BluetoothAdapter.getDefaultAdapter() and then call .startDiscovery() on it.
I am trying to do this from within a fragment.
ACCESS_FINE_LOCATION, BLUETOOTH_ADMIN & BLUETOOTH are all in the manifest
Please let me know if I need to provide some additional information!
Logcat Output:
2020-02-08 19:24:54.373 16129-16129/? E/Zygote: isWhitelistProcess - Process is Whitelisted
2020-02-08 19:24:54.376 16129-16129/? E/Zygote: accessInfo : 1
2020-02-08 19:24:54.382 16129-16129/? I/.androidairpod: Late-enabling -Xcheck:jni
2020-02-08 19:24:54.404 16129-16129/? E/.androidairpod: Unknown bits set in runtime_flags: 0x8000
2020-02-08 19:24:54.424 16129-16129/? D/ActivityThread: setConscryptValidator
2020-02-08 19:24:54.425 16129-16129/? D/ActivityThread: setConscryptValidator - put
2020-02-08 19:24:54.477 16129-16129/com.lavenderr.bluetoothtest W/ActivityThread: Application com.lavenderr.bluetoothtest is waiting for the debugger on port 8100...
2020-02-08 19:24:54.482 16129-16129/com.lavenderr.bluetoothtest I/System.out: Sending WAIT chunk
2020-02-08 19:24:55.483 16129-16129/com.lavenderr.bluetoothtest I/System.out: Debugger has connected
2020-02-08 19:24:55.484 16129-16129/com.lavenderr.bluetoothtest I/System.out: waiting for debugger to settle...
2020-02-08 19:24:56.085 16129-16129/com.lavenderr.bluetoothtest I/chatty: uid=10416(com.lavenderr.bluetoothtest) identical 3 lines
2020-02-08 19:24:56.286 16129-16129/com.lavenderr.bluetoothtest I/System.out: waiting for debugger to settle...
2020-02-08 19:24:56.486 16129-16129/com.lavenderr.bluetoothtest I/System.out: waiting for debugger to settle...
2020-02-08 19:24:56.687 16129-16129/com.lavenderr.bluetoothtest I/chatty: uid=10416(com.lavenderr.bluetoothtest) identical 1 line
2020-02-08 19:24:56.887 16129-16129/com.lavenderr.bluetoothtest I/System.out: waiting for debugger to settle...
2020-02-08 19:24:57.088 16129-16129/com.lavenderr.bluetoothtest I/System.out: debugger has settled (1305)
2020-02-08 19:24:57.373 16129-16177/com.lavenderr.bluetoothtest D/libEGL: loaded /vendor/lib64/egl/libGLES_mali.so
2020-02-08 19:24:57.485 16129-16129/com.lavenderr.bluetoothtest I/MultiWindowDecorSupport: updateCaptionType >> DecorView#a5bf5f5[], isFloating: false, isApplication: true, hasWindowDecorCaption: false, hasWindowControllerCallback: true
2020-02-08 19:24:57.486 16129-16129/com.lavenderr.bluetoothtest D/MultiWindowDecorSupport: setCaptionType = 0, DecorView = DecorView#a5bf5f5[]
2020-02-08 19:24:57.546 16129-16129/com.lavenderr.bluetoothtest W/.androidairpod: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
2020-02-08 19:24:57.549 16129-16129/com.lavenderr.bluetoothtest W/.androidairpod: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
2020-02-08 19:24:57.842 16129-16129/com.lavenderr.bluetoothtest W/.androidairpod: Verification of void com.lavenderr.bluetoothtest.ui.HomeFragment.<init>() took 122.221ms
2020-02-08 19:25:07.916 16129-16129/com.lavenderr.bluetoothtest D/BluetoothAdapter: startDiscovery
2020-02-08 19:25:17.880 16129-16129/com.lavenderr.bluetoothtest D/BluetoothAdapter: startDiscovery
2020-02-08 19:25:18.088 16129-16129/com.lavenderr.bluetoothtest D/ViewRootImpl#b75c09d[MainActivity]: setView = com.android.internal.policy.DecorView#a5bf5f5 TM=true MM=false
2020-02-08 19:25:18.235 16129-16129/com.lavenderr.bluetoothtest D/ViewRootImpl#b75c09d[MainActivity]: Relayout returned: old=(0,0,1080,2220) new=(0,0,1080,2220) req=(1080,2220)0 dur=15 res=0x7 s={true 546482515968} ch=true
2020-02-08 19:25:18.237 16129-16175/com.lavenderr.bluetoothtest D/OpenGLRenderer: createReliableSurface : 0x7f3cea3980, 0x7f3ce57000
2020-02-08 19:25:18.253 16129-16175/com.lavenderr.bluetoothtest D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
2020-02-08 19:25:18.313 16129-16175/com.lavenderr.bluetoothtest W/Gralloc3: mapper 3.x is not supported
2020-02-08 19:25:18.317 16129-16175/com.lavenderr.bluetoothtest I/gralloc: Arm Module v1.0
2020-02-08 19:25:18.453 16129-16129/com.lavenderr.bluetoothtest D/ViewRootImpl#b75c09d[MainActivity]: MSG_RESIZED_REPORT: frame=(0,0,1080,2220) ci=(0,72,0,45) vi=(0,72,0,45) or=1
2020-02-08 19:25:18.457 16129-16129/com.lavenderr.bluetoothtest D/ViewRootImpl#b75c09d[MainActivity]: stopped(false) old=false
2020-02-08 19:25:18.468 16129-16129/com.lavenderr.bluetoothtest D/ViewRootImpl#b75c09d[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
2020-02-08 19:25:18.470 16129-16129/com.lavenderr.bluetoothtest D/InputMethodManager: prepareNavigationBarInfo() DecorView#a5bf5f5[MainActivity]
2020-02-08 19:25:18.470 16129-16129/com.lavenderr.bluetoothtest D/InputMethodManager: getNavigationBarColor() -855310
2020-02-08 19:25:18.479 16129-16129/com.lavenderr.bluetoothtest D/InputMethodManager: prepareNavigationBarInfo() DecorView#a5bf5f5[MainActivity]
2020-02-08 19:25:18.480 16129-16129/com.lavenderr.bluetoothtest D/InputMethodManager: getNavigationBarColor() -855310
2020-02-08 19:25:18.480 16129-16129/com.lavenderr.bluetoothtest V/InputMethodManager: Starting input: tba=com.lavenderr.bluetoothtest ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
2020-02-08 19:25:18.481 16129-16129/com.lavenderr.bluetoothtest D/InputMethodManager: startInputInner - Id : 0
2020-02-08 19:25:18.481 16129-16129/com.lavenderr.bluetoothtest I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
2020-02-08 19:25:18.542 16129-16129/com.lavenderr.bluetoothtest D/InputMethodManager: prepareNavigationBarInfo() DecorView#a5bf5f5[MainActivity]
2020-02-08 19:25:18.543 16129-16129/com.lavenderr.bluetoothtest D/InputMethodManager: getNavigationBarColor() -855310
2020-02-08 19:25:18.543 16129-16129/com.lavenderr.bluetoothtest V/InputMethodManager: Starting input: tba=com.lavenderr.bluetoothtest ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
2020-02-08 19:25:18.544 16129-16129/com.lavenderr.bluetoothtest D/InputMethodManager: startInputInner - Id : 0
After a long search, I finally found the answer. Even though the ACCESS_FINE_LOCATION permission was in my manifest I still needed to 'manually' ask for the permission. Which I did in the following way:
if (ContextCompat.checkSelfPermission(this,
Manifest.permission.ACCESS_FINE_LOCATION)
!= PackageManager.PERMISSION_GRANTED) {
Log.i("info", "No fine location permissions")
ActivityCompat.requestPermissions(this,
arrayOf(Manifest.permission.ACCESS_FINE_LOCATION),
1)
}
after executing this piece of code, and thus getting the right permission to enable discovery my problem was solved!
the same problem happened in the Android part of my Visual Studio 2019 Xamarin Project, and the C# code is a little bit different:
protected override void OnCreate (Bundle bundle)
{
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
this.ActionBar.SetIcon(Android.Resource.Color.Transparent);
LoadApplication(new App());
GetAccessFineLocationPermission();
}
private void GetAccessFineLocationPermission()
{
if (ContextCompat.CheckSelfPermission(this,Manifest.Permission.AccessFineLocation)!=Permission.Granted)
{
ActivityCompat.RequestPermissions(this, new string[] { Manifest.Permission.AccessFineLocation},1);
}
}
I am trying this example app on qt's website. It builds without error and when I tried to run on a Samsung J7 with Android 8.1.0, it the white screen comes up and then the app crashes. In the Qt creator, this message shows as application output
E Zygote : isWhitelistProcess - Process is Whitelisted
E libpersona: scanKnoxPersonas
E libpersona: Couldn't open the File - /data/system/users/0/personalist.xml - No such file or directory
W SELinux : SELinux selinux_android_compute_policy_index : Policy Index[2], Con:u:r:zygote:s0 RAM:SEPF_SM-G610F_8.1.0_0008, [-1 -1 -1 -1 0 1]
I SELinux : SELinux: seapp_context_lookup: seinfo=untrusted, level=s0:c512,c768, pkgname=org.qtproject.example.androidTest4
I zygote : Late-enabling -Xcheck:jni
D ActivityThread: Added TimaKeyStore provider
D MDO : MDO if sIsMdo=false, sIsCheckMdo=false, uid = 10234
D Proxy : mdoP is null: 10234
W System : ClassLoader referenced unknown path:
I QtCore : Start
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5Network.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5Qml.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5Gui.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5Quick.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5Widgets.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5Svg.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5Sensors.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5Xml.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5QuickParticles.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5QuickTemplates2.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/app/org.qtproject.example.androidTest4-wQpu1e5t-HXJTHLGN4W7gQ==/lib/arm/libQt5QuickControls2.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/plugins/platforms/android/libqtforandroid.so" has unsupported flags DT_FLAGS_1=0x81
I Qt : qt start
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/plugins/bearer/libqandroidbearer.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/plugins/sensors/libqtsensors_android.so" has unsupported flags DT_FLAGS_1=0x81
I Qt : Sensors start
I zygote : Do partial code cache collection, code=29KB, data=27KB
I zygote : After code cache collection, code=29KB, data=27KB
I zygote : Increasing code cache capacity to 128KB
D OpenGLRenderer: HWUI GL Pipeline
I zygote : Do partial code cache collection, code=60KB, data=59KB
I zygote : After code cache collection, code=60KB, data=59KB
I zygote : Increasing code cache capacity to 256KB
I zygote : Do full code cache collection, code=125KB, data=102KB
I zygote : After code cache collection, code=109KB, data=78KB
D : (null):0 ((null)): QML debugging is enabled. Only use this in a safe environment.
D InputTransport: Input channel constructed: fd=56
D ViewRootImpl#74fba6a[QtActivity]: setView = DecorView#fbadb5b[QtActivity] TM=true MM=false
W Activity: AppLock checkAppLockState locked:false verifying:false pkgName = org.qtproject.example.androidTest4 isInMultiWindowMode:false showWhenLocked:false
D ViewRootImpl#74fba6a[QtActivity]: dispatchAttachedToWindow
V Surface : sf_framedrop debug : 0x4f4c, game : false, logging : 0
D ViewRootImpl#74fba6a[QtActivity]: Relayout returned: old=[0,0][0,0] new=[0,0][1080,1920] result=0x7 surface={valid=true 3756800000} changed=true
I zygote : android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
I OpenGLRenderer: Initialized EGL, version 1.4
D OpenGLRenderer: Swap behavior 2
D libGLESv1: STS_GLApi : DTS, ODTC are not allowed for Package : org.qtproject.example.androidTest4
D mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000, [1080x1920]-format:1
D OpenGLRenderer: eglCreateWindowSurface = 0xe1f0ebc0, 0xdfec3808
D ViewRootImpl#74fba6a[QtActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1080, 1920) ci=Rect(0, 72 - 0, 0) vi=Rect(0, 72 - 0, 0) or=1
D ViewRootImpl#74fba6a[QtActivity]: MSG_WINDOW_FOCUS_CHANGED 1
V InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo#aa71336 nm : org.qtproject.example.androidTest4 ic=null
D InputMethodManager: startInputInner - Id : 0
I InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
D InputTransport: Input channel constructed: fd=65
D vndksupport: Loading /vendor/lib/hw/android.hardware.graphics.mapper#2.0-impl.so from current namespace instead of sphal namespace.
V InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo#2c1d237 nm : org.qtproject.example.androidTest4 ic=null
D InputMethodManager: startInputInner - Id : 0
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/qml/QtQuick.2/libqtquick2plugin.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/qml/QtQuick/Controls.2/libqtquickcontrols2plugin.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/qml/QtSensors/libdeclarative_sensors.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/qml/QtQuick/Window.2/libwindowplugin.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/qml/QtQuick/Templates.2/libqtquicktemplates2plugin.so" has unsupported flags DT_FLAGS_1=0x81
W linker : "/data/data/org.qtproject.example.androidTest4/qt-reserved-files/qml/QtQuick/Controls.2/Fusion/libqtquickcontrols2fusionstyleplugin.so" has unsupported flags DT_FLAGS_1=0x81
W libandroidTest4.so: (null):0 ((null)): QQmlApplicationEngine failed to load component
W libandroidTest4.so: (null):0 ((null)): qrc:/main.qml:42 Cannot assign to non-existent property "footer"
08-23 11:53:51.290 11578 11648 W libandroidTest4.so:
D ViewRootImpl#74fba6a[QtActivity]: MSG_WINDOW_FOCUS_CHANGED 0
D InputTransport: Input channel destroyed: fd=65
D OpenGLRenderer: eglDestroySurface = 0xe1f0ebc0, 0xdfec3800
D ViewRootImpl#74fba6a[QtActivity]: Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x5 surface={valid=false 0} changed=true
"org.qtproject.example.androidTest4" died.
Since I have no prior experience in developing Android on Qt, I have no idea how to solve this issue. The setup in Qt for Android has the latest Android SDK, JRE inside the Android Studio folder and Android NDK version 17. Any guidance is appreciated.
I have simple Android app which is just a WebView running a web application.
If I am using inputs and press enter on the last visible input, the keyboard goes away (which is fine), but I lose all ability to interact with the web application running in the WebView. I can still see the app functioning. Pressing back key instead of enter causes keyboard to go away and I have no problem.
Any idea whats happening and how I can get this to stop?
I have tried intercepting focus changes and requesting focus on the web view, but it seems the web view itself is never losing focus. I've also tried setting an interval to refocus the web apps document.body but it had no effect.
Code:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
tools:context="com.particlesandbox.Play">
<WebView
android:id="#+id/view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_play);
mWebView = (WebView) findViewById(R.id.view);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setUseWideViewPort(true);
mWebView.requestFocus(View.FOCUS_DOWN);
mWebView.loadUrl("file:///android_asset/www/index.html");
}
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light">
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">#null</item>
</style>
</resources>
Logcat:
07-11 23:07:39.739 17899-17899/com.particlesandbox D/ViewRootImpl#db61f74[Play]: ViewPostImeInputStage processPointer 0
07-11 23:07:39.742 17899-17899/com.particlesandbox W/System: ClassLoader referenced unknown path: /system/framework/QPerformance.jar
07-11 23:07:39.752 17899-17899/com.particlesandbox E/BoostFramework: BoostFramework() : Exception_1 = java.lang.ClassNotFoundException: Didn't find class "com.qualcomm.qti.Performance" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib64, /vendor/lib64]]
07-11 23:07:39.752 17899-17899/com.particlesandbox V/BoostFramework: BoostFramework() : mPerf = null
07-11 23:07:39.805 17899-17899/com.particlesandbox D/ViewRootImpl#db61f74[Play]: ViewPostImeInputStage processPointer 1
07-11 23:07:39.908 17899-17899/com.particlesandbox D/InputMethodManager: HSI from window - flag : 0 Pid : 17899
07-11 23:07:40.884 17899-17899/com.particlesandbox D/ViewRootImpl#db61f74[Play]: ViewPostImeInputStage processPointer 0
07-11 23:07:43.086 17899-17899/com.particlesandbox D/ViewRootImpl#db61f74[Play]: ViewPostImeInputStage processPointer 1
07-11 23:07:45.034 17899-17899/com.particlesandbox D/ViewRootImpl#db61f74[Play]: ViewPostImeInputStage processPointer 0
07-11 23:07:45.105 17899-17899/com.particlesandbox D/ViewRootImpl#db61f74[Play]: ViewPostImeInputStage processPointer 1
07-11 23:07:45.240 17899-17899/com.particlesandbox V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo#ab7d50f nm : com.particlesandbox ic=null
07-11 23:07:45.240 17899-17899/com.particlesandbox I/InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
07-11 23:07:45.245 17899-17899/com.particlesandbox D/InputTransport: Input channel constructed: fd=172
07-11 23:07:45.249 17899-17899/com.particlesandbox D/InputTransport: Input channel destroyed: fd=139
07-11 23:07:45.250 17899-17899/com.particlesandbox D/InputMethodManager: ISS - flag : 0Pid : 17899 view : com.particlesandbox
07-11 23:07:45.347 17899-17899/com.particlesandbox D/InputTransport: Input channel constructed: fd=171
07-11 23:07:45.347 17899-17899/com.particlesandbox D/ViewRootImpl#eb7fa5[PopupWindow:bca799c]: setView = android.widget.PopupWindow$PopupDecorView{3c7cf7a V.E...... ......I. 0,0-0,0} touchMode=true
07-11 23:07:45.413 17899-18132/com.particlesandbox D/mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000, [60x72]-format:1
07-11 23:07:45.429 17899-19297/com.particlesandbox V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo#2d39388 nm : com.particlesandbox ic=org.chromium.content.browser.input.ThreadedInputConnection#e397121
07-11 23:07:45.429 17899-19297/com.particlesandbox I/InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
07-11 23:07:45.457 17899-19297/com.particlesandbox D/InputTransport: Input channel constructed: fd=175
07-11 23:07:45.486 17899-17899/com.particlesandbox D/ViewRootImpl#eb7fa5[PopupWindow:bca799c]: MSG_RESIZED_REPORT: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
07-11 23:07:45.493 17899-19297/com.particlesandbox D/InputTransport: Input channel destroyed: fd=172
07-11 23:07:45.870 17899-17899/com.particlesandbox D/ViewRootImpl#db61f74[Play]: MSG_RESIZED: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 750) or=1
07-11 23:07:48.698 17899-17899/com.particlesandbox D/ViewRootImpl#eb7fa5[PopupWindow:bca799c]: dispatchDetachedFromWindow
07-11 23:07:48.738 17899-17899/com.particlesandbox D/InputTransport: Input channel destroyed: fd=171
07-11 23:07:48.772 17899-17899/com.particlesandbox D/InputMethodManager: HSI from window - flag : 0 Pid : 17899
07-11 23:07:48.820 17899-19297/com.particlesandbox V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo#9ecd3d2 nm : com.particlesandbox ic=null
07-11 23:07:48.820 17899-19297/com.particlesandbox I/InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
07-11 23:07:48.825 17899-19297/com.particlesandbox D/InputTransport: Input channel constructed: fd=171
07-11 23:07:48.826 17899-19297/com.particlesandbox D/InputTransport: Input channel destroyed: fd=175
07-11 23:07:48.854 17899-19297/com.particlesandbox W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
07-11 23:07:48.861 17899-19297/com.particlesandbox W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
07-11 23:07:48.951 17899-17899/com.particlesandbox D/ViewRootImpl#db61f74[Play]: MSG_RESIZED: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
07-11 23:07:50.895 17899-17899/com.particlesandbox D/ViewRootImpl#db61f74[Play]: ViewPostImeInputStage processPointer 0
07-11 23:07:51.090 17899-17899/com.particlesandbox D/ViewRootImpl#db61f74[Play]: ViewPostImeInputStage processPointer 1
07-11 23:07:51.132 17899-17899/com.particlesandbox D/InputMethodManager: HSI from window - flag : 0 Pid : 17899
07-11 23:07:51.482 17899-17899/com.particlesandbox D/ViewRootImpl#db61f74[Play]: ViewPostImeInputStage processPointer 0
07-11 23:07:51.724 17899-17899/com.particlesandbox D/ViewRootImpl#db61f74[Play]: ViewPostImeInputStage processPointer 1
07-11 23:07:51.783 17899-17899/com.particlesandbox D/InputMethodManager: HSI from window - flag : 0 Pid : 17899
It was the AccessibilityManager in Pixi.js.
As commented, it was creating a div in front of everything.
I destroyed it on my renderer and the problem went away.
renderer.plugins.accessibility.destroy()
So a buddy of mine is helping me test my app out. However, after he gets the allow or deny screen, it doesn't let him to actually sign into the app even though we are getting an access code. The following errors show up in the run dialog when I ran the app on his Samsung Galaxy S6 Edge:
09/30 20:25:23: Launching MainActivity
$ adb push C:\Users\James Singleton\AndroidStudioProjects\ChffrAPI\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.example.jamessingleton.chffrapi
$ adb shell pm install -r "/data/local/tmp/com.example.jamessingleton.chffrapi"
pkg: /data/local/tmp/com.example.jamessingleton.chffrapi
Success
$ adb shell am start -n "com.example.jamessingleton.chffrapi/com.example.jamessingleton.chffrapi.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 1082 on device samsung-sm_g925t-1115fb9dddda2805
E/Zygote: v2
I/SELinux: Function: selinux_compare_spd_ram, index[1], SPD-policy is existed. and_ver=SEPF_SECMOBILE_6.0.1 ver=11
W/SELinux: Function: selinux_compare_spd_ram, index[1], priority [2], priority version is VE=SEPF_SECMOBILE_6.0.1_0013
E/Zygote: accessInfo : 0
I/libpersona: KNOX_SDCARD checking this for 10248
I/libpersona: KNOX_SDCARD not a persona
W/SELinux: SELinux: seapp_context_lookup: seinfo=default, level=s0:c512,c768, pkgname=com.example.jamessingleton.chffrapi
I/art: Late-enabling -Xcheck:jni
D/TimaKeyStoreProvider: TimaSignature is unavailable
D/ActivityThread: Added TimaKeyStore provider
I/InjectionManager: Inside getClassLibPath + mLibMap{0=, 1=}
W/ResourcesManager: getTopLevelResources: /data/app/com.example.jamessingleton.chffrapi-1/base.apk / 1.0 running in com.example.jamessingleton.chffrapi rsrc of package com.example.jamessingleton.chffrapi
D/ResourcesManager: For user 0 new overlays fetched Null
I/InjectionManager: Inside getClassLibPath caller
W/System: ClassLoader referenced unknown path: /data/app/com.example.jamessingleton.chffrapi-1/lib/arm64
I/FirebaseInitProvider: FirebaseApp initialization unsuccessful
D/InjectionManager: InjectionManager
D/InjectionManager: fillFeatureStoreMap com.example.jamessingleton.chffrapi
I/InjectionManager: Constructor com.example.jamessingleton.chffrapi, Feature store :{}
I/InjectionManager: featureStore :{}
W/ResourcesManager: getTopLevelResources: /data/app/com.example.jamessingleton.chffrapi-1/base.apk / 1.0 running in com.example.jamessingleton.chffrapi rsrc of package com.example.jamessingleton.chffrapi
W/ResourcesManager: getTopLevelResources: /data/app/com.example.jamessingleton.chffrapi-1/base.apk / 1.0 running in com.example.jamessingleton.chffrapi rsrc of package com.example.jamessingleton.chffrapi
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
W/ResourcesManager: getTopLevelResources: /data/app/com.google.android.gms-2/base.apk / 1.0 running in com.example.jamessingleton.chffrapi rsrc of package com.google.android.gms
D/ResourcesManager: For user 0 new overlays fetched Null
I/InjectionManager: Inside getClassLibPath caller
W/ResourcesManager: getTopLevelResources: /data/app/com.google.android.gms-2/base.apk / 1.0 running in com.example.jamessingleton.chffrapi rsrc of package com.google.android.gms
D/ResourcesManager: For user 0 new overlays fetched Null
I/InjectionManager: Inside getClassLibPath caller
W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_chimera/m/0000000a/n/arm64-v8a
W/nAnnotationIntrospector: Unable to load JDK7 annotation types; will have to skip
I/System.out: Connection Preference: wifi
D/Activity: performCreate Call Injection manager
I/InjectionManager: dispatchOnViewCreated > Target : com.example.jamessingleton.chffrapi.MainActivity isFragment :false
D/SecWifiDisplayUtil: Metadata value : SecSettings2
D/ViewRootImpl: #1 mView = com.android.internal.policy.PhoneWindow$DecorView{b22bf4b I.E...... R.....ID 0,0-0,0}
D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
D/libEGL: loaded /vendor/lib64/egl/libGLES_mali.so
D/libEGL: eglInitialize EGLDisplay = 0x7fa3b3f178
I/OpenGLRenderer: Initialized EGL, version 1.4
[ 09-30 20:25:36.141 1082: 1182 D/ ]
ro.exynos.dss isEnabled: 0
D/mali_winsys: new_window_surface returns 0x3000, [1440x2560]-format:1
I/InjectionManager: dispatchCreateOptionsMenu :com.example.jamessingleton.chffrapi.MainActivity
I/InjectionManager: dispatchPrepareOptionsMenu :com.example.jamessingleton.chffrapi.MainActivity
D/libGLESv1: DTS_GLAPI : DTS is not allowed for Package : com.example.jamessingleton.chffrapi
D/ViewRootImpl: MSG_RESIZED_REPORT: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1
I/System.out: com.example.jamessingleton.chffrapi.AuthPreferences#2af7be6
E/AuthApp: ya29.Ci9vAy3YMsGUZcVJ28kRIh5lMQMYhbSUSelWfYABrGmSWkKXKgUhRC_A4KJJcnJtBQ
I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy#6065402 time:27457508
D/ViewRootImpl: ViewPostImeInputStage processPointer 0
D/ViewRootImpl: ViewPostImeInputStage processPointer 1
V/ActivityThread: updateVisibility : ActivityRecord{23821be token=android.os.BinderProxy#6065402 {com.example.jamessingleton.chffrapi/com.example.jamessingleton.chffrapi.MainActivity}} show : true
I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy#6065402 time:27522831
D/ViewRootImpl: ViewPostImeInputStage processPointer 0
D/ViewRootImpl: ViewPostImeInputStage processPointer 1
V/ActivityThread: updateVisibility : ActivityRecord{23821be token=android.os.BinderProxy#6065402 {com.example.jamessingleton.chffrapi/com.example.jamessingleton.chffrapi.MainActivity}} show : true
I am not sure what any of this means. If I take the access token that is given I can use oAuth 2.0 playground and proceed like normal.
So the user was not connected to his preferred connection. His preferred connection was I/System.out: Connection Preference: wifi and he was connected to 4G. I added the following to check for it:
else {
Toast.makeText(getApplicationContext(), "You are not connected to your preferred connection." + "\n" +
"Please connect to your preferred connection to continue."
, Toast.LENGTH_LONG).show();
}