2

I have been following this this guide.

However I always end up with the initialisation status of COMPLETED_WITH_DEGRADED_FUNCTIONALITY:

InitializationStatus{status=COMPLETED_WITH_DEGRADED_FUNCTIONALITY, unrecoverableException=null, locationsError=true, playServicesStatus=-1, playServicesMessage=null, encryptionChanged=false, storageError=false, proximityError=false, messagingPermissionError=false, sslProviderEnablementError=false, initializedComponents=[BehaviorManager, LifecycleManager, RequestManager, ControlChannel, AlarmScheduler, LocationManager, ProximityManager, AnalyticsManager, InboxMessageManager, NotificationManager, RegionMessageManager, PushMessageManager, RegistrationManager]}

When I run the following code from the learning app:

if (status.locationsError()) {
    final GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();
    Log.i(TAG, String.format(Locale.ENGLISH, "Google Play Services Availability: %s", googleApiAvailability.getErrorString(status.playServicesStatus())));
    if (googleApiAvailability.isUserResolvableError(status.playServicesStatus())) {
        googleApiAvailability.showErrorNotification(LearningAppApplication.this, status.playServicesStatus());
    }
}

I get the following errors:

I/MainActivity: Google Play Services Availability: UNKNOWN

However GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(this) is true ...

Do I need to be implementing a RegionMessageManager.GeofenceMessageResponseListener? What am I missing?

In the SDK state I get:

  ...
  "LocationManager": {
    "geofencingEnabled": true,
    "proximityEnabled": false,
    "gmsLocationDependencyAvailable": false
  },
  "ProximityManager": {
    "proximityEnabled": false
  },
  ...

1 Answer 1

3

Based on the information output in SDK State; please ensure you've added the dependency to your project: http://salesforce-marketingcloud.github.io/JB4A-SDK-Android/location/geolocation.html

1
  • 1
    This was actually the cause. This happened because the SDK was in a module that didn't have access to the Google Play Services which was included in the main module. Google Play Services were correctly included in the main module, hence why GMS in the main module was okay, but not from the SDK. Mar 8, 2019 at 16:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .