Prior to the date listed in the title, my app was able to advertise and discover other devices without a problem. However, I now have this error popping up when attempting to advertise/discover:

Getting service failed
                                                                                                    

java.lang.IllegalStateException at agjh.l(:com.google.android.gms@[email protected] (190400-560151436):6) at com.google.android.gms.nearby.connection.service.NearbyConnectionsChimeraService.a(:com.google.android.gms@[email protected] (190400-560151436):151) at bbks.a(:com.google.android.gms@[email protected] (190400-560151436):3) at bblq.a(:com.google.android.gms@[email protected] (190400-560151436):10) at bblt.gT(:com.google.android.gms@[email protected] (190400-560151436):840) at agie.onTransact(:com.google.android.gms@[email protected] (190400-560151436):70) at android.os.Binder.transact(Binder.java:1100) at atdw.onTransact(:com.google.android.gms@[email protected] (190400-560151436):147) at android.os.Binder.transact(Binder.java:1100) at aznn.onTransact(:com.google.android.gms@[email protected] (190400-560151436):10) at android.os.Binder.execTransactInternal(Binder.java:1215) at android.os.Binder.execTransact(Binder.java:1179)

I Then also noticed this error when attempting to discover and after the Getting service failed error:

Unable to start advertising. Report: com.google.android.gms.common.api.ApiException: 17: API: Nearby.CONNECTIONS_API is not available on this device. Connection failed with: ConnectionResult{statusCode=INTERNAL_ERROR, resolution=null, message=null}

I tried reverting my save in github to a point where it was working with Nearby Connections, but my app still has the same problem. I also tried my app on other devices and it still doesn't work.

I looked into the issue with the error saying that Nearby.CONNECTIONS_API is not available on this device, but only found solutions if my device happened to not have Google Play, which my device does have. I am currently trying to run it on a Samsung Galaxy Note10+ 5G. I'm connected to the my Wifi, bluetooth is turned on, and location is turned on and it still doesn't fix anything. I also tried restarting my device, turning airplane mode on and off, updating Android Studios and looked for any updates for my dependencies but have a hard time finding it and as far as I can see, my dependencies are up to date but I may be wrong. My current dependencies that include Google play services are as followed:

implementation 'com.google.android.gms:play-services-location:21.0.1'
implementation 'com.google.android.gms:play-services-nearby:18.7.0'
0

There are 0 best solutions below