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.
I have an error with my subscription in my Flutter app.
I did al the steps here https://www.revenuecat.com/blog/android-subscriptions-tutorial,
When I subscribe, it says Subscribed, and I can see my subscription on Google Play, but it says that there are some problems with Google Play Store and it wont redirect me to the next page.
Full Log :
D/[Purchases] - DEBUG(22348): Debug logging enabled.
D/[Purchases] - DEBUG(22348): SDK Version - 3.1.0
D/[Purchases] - DEBUG(22348): Initial App User ID - null
D/[Purchases] - DEBUG(22348): Generated New App User ID - 26c252dd759a42899cbdaca5e8f165a3
D/[Purchases] - DEBUG(22348): Identifying App User ID: $RCAnonymousID:26c252dd759a42899cbdaca5e8f165a3
D/[Purchases] - DEBUG(22348): App foregrounded
D/[Purchases] - DEBUG(22348): PurchaserInfo cache is stale, updating caches
D/[Purchases] - DEBUG(22348): Offerings cache is stale, updating caches
D/[Purchases] - DEBUG(22348): [QueryPurchases] Skipping updating pending purchase queue since BillingClient is not connected yet
D/[Purchases] - DEBUG(22348): No subscriber attributes to synchronize.
D/[Purchases] - DEBUG(22348): Subscriber attributes synced successfully.
D/[Purchases] - DEBUG(22348): Listener set
I/System.out(22348): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(22348): (HTTPLog)-Static: isSBSettingEnabled false
D/[Purchases] - DEBUG(22348): Starting connection for com.android.billingclient.api.BillingClientImpl#b3b0036
D/[Purchases] - DEBUG(22348): No cached purchaser info, fetching
D/[Purchases] - DEBUG(22348): Billing Service Setup finished for com.android.billingclient.api.BillingClientImpl#b3b0036.
D/[Purchases] - DEBUG(22348): [QueryPurchases] Updating pending purchase queue
D/[Purchases] - DEBUG(22348): GET /subscribers/%24RCAnonymousID%3A26c252dd759a42899cbdaca5e8f165a3
D/[Purchases] - DEBUG(22348): GET /subscribers/%24RCAnonymousID%3A26c252dd759a42899cbdaca5e8f165a3 201
D/[Purchases] - DEBUG(22348): Sending latest purchaser info to listener
D/[Purchases] - DEBUG(22348): Purchaser info updated, sending to listener
I/System.out(22348): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(22348): (HTTPLog)-Static: isSBSettingEnabled false
D/[Purchases] - DEBUG(22348): No cached offerings, fetching
D/[Purchases] - DEBUG(22348): GET /subscribers/%24RCAnonymousID%3A26c252dd759a42899cbdaca5e8f165a3/offerings
D/[Purchases] - DEBUG(22348): GET /subscribers/%24RCAnonymousID%3A26c252dd759a42899cbdaca5e8f165a3/offerings 200
D/[Purchases] - DEBUG(22348): Requesting products with identifiers: onemonthathlete, lifetimeathlete
D/[Purchases] - DEBUG(22348): Requesting products with identifiers: onemonthathlete, lifetimeathlete
D/[Purchases] - DEBUG(22348): [QueryPurchases] Querying subs
D/[Purchases] - DEBUG(22348): [QueryPurchases] Querying inapp
D/[Purchases] - DEBUG(22348): [QueryPurchases] Cleaning previously sent tokens
D/[Purchases] - DEBUG(22348): [QueryPurchases] Tokens already posted: []
D/[Purchases] - DEBUG(22348): [QueryPurchases] Saving tokens []
D/[Purchases] - DEBUG(22348): [QueryPurchases] Tokens already posted: []
D/[Purchases] - DEBUG(22348): Products request finished for onemonthathlete, lifetimeathlete
D/[Purchases] - DEBUG(22348): Retrieved skuDetailsList: SkuDetails: {"skuDetailsToken":"AEuhp4JfHSozIDQz3ogqW5_NyfRhtNt-A-LcANvB3qrztlhuiwZwEfaGhutYbgPOxNY9","productId":"lifetimeathlete","type":"subs","price":"$126.92","price_amount_micros":126920000,"price_currency_code":"USD","subscriptionPeriod":"P1Y","freeTrialPeriod":"P1W","title":"Lifetime Access (Athlete.co)","description":"Lifetime Access"}, SkuDetails: {"skuDetailsToken":"AEuhp4KlDHUVcCC0ra-q73FjLFF_VHSYmVIGJshi8MT9ljIWGCLne_GojqWqwKqD-4T6","productId":"onemonthathlete","type":"subs","price":"$20.16","price_amount_micros":20160000,"price_currency_code":"USD","subscriptionPeriod":"P1M","freeTrialPeriod":"P1W","title":"One Month Access (Athlete.co)","description":"One Month access to all exercises with this subscription."}
D/[Purchases] - DEBUG(22348): lifetimeathlete - SkuDetails: {"skuDetailsToken":"AEuhp4JfHSozIDQz3ogqW5_NyfRhtNt-A-LcANvB3qrztlhuiwZwEfaGhutYbgPOxNY9","productId":"lifetimeathlete","type":"subs","price":"$126.92","price_amount_micros":126920000,"price_currency_code":"USD","subscriptionPeriod":"P1Y","freeTrialPeriod":"P1W","title":"Lifetime Access (Athlete.co)","description":"Lifetime Access"}
D/[Purchases] - DEBUG(22348): onemonthathlete - SkuDetails: {"skuDetailsToken":"AEuhp4KlDHUVcCC0ra-q73FjLFF_VHSYmVIGJshi8MT9ljIWGCLne_GojqWqwKqD-4T6","productId":"onemonthathlete","type":"subs","price":"$20.16","price_amount_micros":20160000,"price_currency_code":"USD","subscriptionPeriod":"P1M","freeTrialPeriod":"P1W","title":"One Month Access (Athlete.co)","description":"One Month access to all exercises with this subscription."}
D/[Purchases] - DEBUG(22348): Products request finished for onemonthathlete, lifetimeathlete
D/[Purchases] - DEBUG(22348): Retrieved skuDetailsList: SkuDetails: {"skuDetailsToken":"AEuhp4JfHSozIDQz3ogqW5_NyfRhtNt-A-LcANvB3qrztlhuiwZwEfaGhutYbgPOxNY9","productId":"lifetimeathlete","type":"subs","price":"$126.92","price_amount_micros":126920000,"price_currency_code":"USD","subscriptionPeriod":"P1Y","freeTrialPeriod":"P1W","title":"Lifetime Access (Athlete.co)","description":"Lifetime Access"}, SkuDetails: {"skuDetailsToken":"AEuhp4KlDHUVcCC0ra-q73FjLFF_VHSYmVIGJshi8MT9ljIWGCLne_GojqWqwKqD-4T6","productId":"onemonthathlete","type":"subs","price":"$20.16","price_amount_micros":20160000,"price_currency_code":"USD","subscriptionPeriod":"P1M","freeTrialPeriod":"P1W","title":"One Month Access (Athlete.co)","description":"One Month access to all exercises with this subscription."}
D/[Purchases] - DEBUG(22348): lifetimeathlete - SkuDetails: {"skuDetailsToken":"AEuhp4JfHSozIDQz3ogqW5_NyfRhtNt-A-LcANvB3qrztlhuiwZwEfaGhutYbgPOxNY9","productId":"lifetimeathlete","type":"subs","price":"$126.92","price_amount_micros":126920000,"price_currency_code":"USD","subscriptionPeriod":"P1Y","freeTrialPeriod":"P1W","title":"Lifetime Access (Athlete.co)","description":"Lifetime Access"}
D/[Purchases] - DEBUG(22348): onemonthathlete - SkuDetails: {"skuDetailsToken":"AEuhp4KlDHUVcCC0ra-q73FjLFF_VHSYmVIGJshi8MT9ljIWGCLne_GojqWqwKqD-4T6","productId":"onemonthathlete","type":"subs","price":"$20.16","price_amount_micros":20160000,"price_currency_code":"USD","subscriptionPeriod":"P1M","freeTrialPeriod":"P1W","title":"One Month Access (Athlete.co)","description":"One Month access to all exercises with this subscription."}
I/flutter (22348): Offering{identifier: default-monthly, serverDescription: Standard monthly set of packages, availablePackages: [Package{identifier: $rc_monthly, packageType: PackageType.monthly, product: Product{identifier: onemonthathlete, description: One Month access to all exercises with this subscription., title: One Month Access (Athlete.co), price: 20.16, priceString: $20.16, currencyCode: USD, introductoryPrice: IntroductoryPrice{introPrice: 0.0, introPriceString: $0.00, introPricePeriod: P1W, introPricePeriodUnit: DAY, introPricePeriodNumberOfUnits: 7, introPriceCycles: 1}}, offeringIdentifier: default-monthly}, Package{identifier: $rc_lifetime, packageType: PackageType.lifetime, product: Product{identifier: lifetimeathlete, description: Lifetime Access, title: Lifetime Access (Athlete.co), price: 126.92, priceString: $126.92, currencyCode: USD, introductoryPrice: IntroductoryPrice{introPrice: 0.0, introPriceString: $0.00, introPricePeriod: P1W, introPricePeriodUnit: DAY, introPricePeriodNumberOfUnits: 7, introPrice
I/flutter (22348): Package{identifier: $rc_monthly, packageType: PackageType.monthly, product: Product{identifier: onemonthathlete, description: One Month access to all exercises with this subscription., title: One Month Access (Athlete.co), price: 20.16, priceString: $20.16, currencyCode: USD, introductoryPrice: IntroductoryPrice{introPrice: 0.0, introPriceString: $0.00, introPricePeriod: P1W, introPricePeriodUnit: DAY, introPricePeriodNumberOfUnits: 7, introPriceCycles: 1}}, offeringIdentifier: default-monthly}OFFERING MONTHLY
D/ViewRootImpl#e0082f1[MainActivity](22348): ViewPostIme pointer 0
D/ViewRootImpl#e0082f1[MainActivity](22348): ViewPostIme pointer 1
I/flutter (22348): u try sam usao ++++++++++++++++++
D/[Purchases] - DEBUG(22348): Vending offerings from cache
D/[Purchases] - DEBUG(22348): purchase started - product: SkuDetails: {"skuDetailsToken":"AEuhp4KlDHUVcCC0ra-q73FjLFF_VHSYmVIGJshi8MT9ljIWGCLne_GojqWqwKqD-4T6","productId":"onemonthathlete","type":"subs","price":"$20.16","price_amount_micros":20160000,"price_currency_code":"USD","subscriptionPeriod":"P1M","freeTrialPeriod":"P1W","title":"One Month Access (Athlete.co)","description":"One Month access to all exercises with this subscription."} - offering: default-monthly
D/[Purchases] - DEBUG(22348): Making purchase for sku: onemonthathlete
W/ActivityThread(22348): handleWindowVisibility: no activity for token android.os.BinderProxy#826fc3b
D/PhoneWindow(22348): 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(22348): updateCaptionType >> DecorView#49ed196[], isFloating: false, isApplication: true, hasWindowDecorCaption: false, hasWindowControllerCallback: true
D/MultiWindowDecorSupport(22348): setCaptionType = 0, DecorView = DecorView#49ed196[]
D/ViewRootImpl#3767eed[ProxyBillingActivity](22348): setView = com.android.internal.policy.DecorView#49ed196 TM=true MM=false
D/ViewRootImpl#e0082f1[MainActivity](22348): MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager(22348): prepareNavigationBarInfo() DecorView#d561475[MainActivity]
D/InputMethodManager(22348): getNavigationBarColor() -855310
D/ViewRootImpl#3767eed[ProxyBillingActivity](22348): Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=7 res=0x7 s={true 499042742272} ch=true
D/OpenGLRenderer(22348): createReliableSurface : 0x7419580880, 0x743143f000
D/ViewRootImpl#3767eed[ProxyBillingActivity](22348): MSG_RESIZED: frame=(0,0,1080,2400) ci=(0,76,0,126) vi=(0,76,0,126) or=1
D/InputTransport(22348): Input channel destroyed: 'ClientS', fd=108
W/BillingHelper(22348): Couldn't find purchase lists, trying to find single data.
D/[Purchases] - DEBUG(22348): BillingWrapper purchases updated. onemonthathlete GPA.3330-8467-4550-90881 aolipdjnbkjdnnobnccokhod.AO-J1OyCPAYXPaGJFyTmE-RtgWe8vxA8qtRkQqQWGRbJdgifLL2ZgBWNP8YVMUr7ATFbPTMZYcdpNVGiQ66irN3cXqL-gOhpoIYMRYJcYdl-HzN-x8u1VsuOEE8VyNh5mOQphC15kdFK
I/System.out(22348): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(22348): (HTTPLog)-Static: isSBSettingEnabled false
D/ViewRootImpl#3767eed[ProxyBillingActivity](22348): MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager(22348): prepareNavigationBarInfo() DecorView#49ed196[ProxyBillingActivity]
D/InputMethodManager(22348): getNavigationBarColor() -855310
D/InputMethodManager(22348): prepareNavigationBarInfo() DecorView#49ed196[ProxyBillingActivity]
D/InputMethodManager(22348): getNavigationBarColor() -855310
V/InputMethodManager(22348): Starting input: tba=com.flutter.Athlete.co ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager(22348): startInputInner - Id : 0
I/InputMethodManager(22348): startInputInner - mService.startInputOrWindowGainedFocus
D/ViewRootImpl#e0082f1[MainActivity](22348): stopped(false) old=false
D/ViewRootImpl#3767eed[ProxyBillingActivity](22348): MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager(22348): prepareNavigationBarInfo() DecorView#49ed196[ProxyBillingActivity]
D/InputMethodManager(22348): getNavigationBarColor() -855310
D/ViewRootImpl#e0082f1[MainActivity](22348): MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager(22348): prepareNavigationBarInfo() DecorView#d561475[MainActivity]
D/InputMethodManager(22348): getNavigationBarColor() -855310
D/InputMethodManager(22348): prepareNavigationBarInfo() DecorView#d561475[MainActivity]
D/InputMethodManager(22348): getNavigationBarColor() -855310
V/InputMethodManager(22348): Starting input: tba=com.flutter.Athlete.co ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager(22348): startInputInner - Id : 0
I/InputMethodManager(22348): startInputInner - mService.startInputOrWindowGainedFocus
D/InputTransport(22348): Input channel destroyed: 'ClientS', fd=108
D/ViewRootImpl#3767eed[ProxyBillingActivity](22348): stopped(true) old=false
D/ViewRootImpl#3767eed[ProxyBillingActivity](22348): dispatchDetachedFromWindow
D/InputTransport(22348): Input channel destroyed: 'acb1706', fd=125
D/[Purchases] - DEBUG(22348): POST /receipts
D/[Purchases] - DEBUG(22348): POST /receipts 503
E/[Purchases] - ERROR(22348): There was a problem with the Play Store. | Problem communicating with the Store when trying to validate the receipt.
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've setup all the things that are needed, but still whenever I open the google place picker it closes immediately after get loaded. I also tried by restricting api with my project package and SHA-1 key.
I added this dependency
implementation 'com.google.android.gms:play-services-places:17.0.0'
In Manifest it has meta-data tag like
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
And permissions
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
In activity
if (hasPermissions()) {
PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();
try {
startActivityForResult(builder.build(this), PLACE_PICKER_REQUEST);
} catch (Exception e) {
Log.e("112233", e.getStackTrace().toString());
}
}
Log is printing.
2019-11-03 17:07:31.625 20912-20912/com.kashif.locationsample D/ViewRootImpl#57f08c4[MainActivity]: ViewPostIme pointer 0
2019-11-03 17:07:31.721 20912-20912/com.kashif.locationsample D/ViewRootImpl#57f08c4[MainActivity]: ViewPostIme pointer 1
2019-11-03 17:07:31.837 20912-20912/com.kashif.locationsample D/ViewRootImpl#57f08c4[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 0 1
2019-11-03 17:07:31.837 20912-20912/com.kashif.locationsample D/InputMethodManager: prepareNavigationBarInfo() DecorView#d20f601[MainActivity]
2019-11-03 17:07:31.837 20912-20912/com.kashif.locationsample D/InputMethodManager: getNavigationBarColor() -855310
2019-11-03 17:07:32.519 20912-20912/com.kashif.locationsample D/InputTransport: Input channel destroyed: fd=87
2019-11-03 17:07:33.149 20912-20912/com.kashif.locationsample D/ViewRootImpl#57f08c4[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
2019-11-03 17:07:33.150 20912-20912/com.kashif.locationsample D/InputMethodManager: prepareNavigationBarInfo() DecorView#d20f601[MainActivity]
2019-11-03 17:07:33.150 20912-20912/com.kashif.locationsample D/InputMethodManager: getNavigationBarColor() -855310
2019-11-03 17:07:33.151 20912-20912/com.kashif.locationsample D/InputMethodManager: prepareNavigationBarInfo() DecorView#d20f601[MainActivity]
2019-11-03 17:07:33.151 20912-20912/com.kashif.locationsample D/InputMethodManager: getNavigationBarColor() -855310
2019-11-03 17:07:33.151 20912-20912/com.kashif.locationsample V/InputMethodManager: Starting input: tba=com.kashif.locationsample ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
2019-11-03 17:07:33.151 20912-20912/com.kashif.locationsample D/InputMethodManager: startInputInner - Id : 0
2019-11-03 17:07:33.152 20912-20912/com.kashif.locationsample I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
2019-11-03 17:07:33.154 20912-20912/com.kashif.locationsample D/InputTransport: Input channel constructed: fd=87
2019-11-03 17:07:33.155 20912-20912/com.kashif.locationsample D/ViewRootImpl#57f08c4[MainActivity]: setWindowStopped(false) old=false
Place picker is turned off by google on July 29, 2019.
Place Picker is no longer available
My gradle
implementation "com.google.android.gms:play-services-places:16.0.0"
My manifest
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/map_api_key" />
My activity calling the map
PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();
startActivityForResult(builder.build(this), PLACE_PICKER_REQUEST);
This is my logcat while running the place picker
2019-01-01 11:57:58.771 24597-24597/com.labeyh.labeyh D/ViewRootImpl#924c3c7[AddressActivity]: ViewPostIme pointer 0
--------- beginning of system
2019-01-01 11:57:58.853 24597-24597/com.labeyh.labeyh D/ViewRootImpl#924c3c7[AddressActivity]: ViewPostIme pointer 1
2019-01-01 11:57:58.889 24597-24631/com.labeyh.labeyh V/FA: Recording user engagement, ms: 3006
2019-01-01 11:57:58.892 24597-24631/com.labeyh.labeyh V/FA: Activity paused, time: 433188100
2019-01-01 11:57:58.899 24597-24631/com.labeyh.labeyh D/FA: Logging event (FE): user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=3006, firebase_screen_class(_sc)=AddressActivity, firebase_screen_id(_si)=-2529808333680378203}]
2019-01-01 11:57:58.908 24597-24597/com.labeyh.labeyh D/ViewRootImpl#924c3c7[AddressActivity]: MSG_WINDOW_FOCUS_CHANGED 0
2019-01-01 11:57:59.289 24597-24597/com.labeyh.labeyh D/InputTransport: Input channel destroyed: fd=71
2019-01-01 11:57:59.476 24597-24597/com.labeyh.labeyh D/ViewRootImpl#924c3c7[AddressActivity]: MSG_WINDOW_FOCUS_CHANGED 1
2019-01-01 11:57:59.478 24597-24597/com.labeyh.labeyh V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo#c8743f1 nm : com.labeyh.labeyh ic=null
2019-01-01 11:57:59.478 24597-24597/com.labeyh.labeyh I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
2019-01-01 11:57:59.483 24597-24597/com.labeyh.labeyh D/InputTransport: Input channel constructed: fd=71
2019-01-01 11:57:59.486 24597-24631/com.labeyh.labeyh V/FA: Activity resumed, time: 433188696
2019-01-01 11:58:04.489 24597-24631/com.labeyh.labeyh V/FA: Inactivity, disconnecting from the service
This issue will be come if your api key is incorrect or you have not enable the place api over google console.