📲 Communicate with nearby devices using Bluetooth, BLE, WiFi and near-ultrasonic audio. Broadcast and receive small payloads (like strings) using the easy-to-use React Native API!
Describe the bug
When calling connect, I get this Exception in the Logs and the Nearby API is not working:
GMS core API Availability. ConnectionResult=2802, tag=null
java.lang.IllegalArgumentException
at com.google.android.gms.common.GoogleApiAvailability.zae(com.google.android.gms:play-services-base@@18.0.1:2)
at com.google.android.gms.common.GoogleApiAvailability.zah(com.google.android.gms:play-services-base@@18.0.1:6)
at com.google.android.gms.common.api.internal.GoogleApiManager.zaG(com.google.android.gms:play-services-base@@18.0.1:1)
at com.google.android.gms.common.api.internal.zabq.zar(com.google.android.gms:play-services-base@@18.0.1:21)
at com.google.android.gms.common.api.internal.zabq.onConnectionFailed(com.google.android.gms:play-services-base@@18.0.1:1)
at com.google.android.gms.common.internal.zai.onConnectionFailed(com.google.android.gms:play-services-base@@18.0.1:1)
at com.google.android.gms.common.internal.zzf.zzb(com.google.android.gms:play-services-basement@@18.1.0:2)
at com.google.android.gms.common.internal.zza.zza(com.google.android.gms:play-services-basement@@18.1.0:3)
at com.google.android.gms.common.internal.zzc.zze(com.google.android.gms:play-services-basement@@18.1.0:3)
at com.google.android.gms.common.internal.zzb.handleMessage(com.google.android.gms:play-services-basement@@18.1.0:31)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.os.HandlerThread.run(HandlerThread.java:67)
public static final int APP_NOT_OPTED_IN
Status code indicating that the User has not granted the calling application permission to use Nearby.Messages.
Resolution: The application can use the returned PendingIntent to request user consent.
Constant Value: 2802
Environment
Additional context
I changed the kotlin version in build.gradle to "1.6.0" as the app wouldn't build otherwise.
I tried all kinds of combinations of permissions in AndroidManifest and requesting these with react-native-permissions:
IllegalArgumentException on Android [ConnectionResult=APP_NOT_OPTED_IN]
Describe the bug When calling connect, I get this Exception in the Logs and the Nearby API is not working:
According to NearbyMessagesStatusCodes the error code 2802 refers to
Environment
Additional context I changed the kotlin version in build.gradle to "1.6.0" as the app wouldn't build otherwise. I tried all kinds of combinations of permissions in AndroidManifest and requesting these with react-native-permissions:
I hope you have an idea to solve this issue. It's working fine on iOS. Thanks!