Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Location collection disabled keeps disable #45

Open
carlosgorillalogic opened this issue Oct 25, 2024 · 1 comment
Open

[Bug]: Location collection disabled keeps disable #45

carlosgorillalogic opened this issue Oct 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@carlosgorillalogic
Copy link

Braze Android SDK Version

33.0.0

Steps To Reproduce

Hi Team.
I'm experience a odd behaviour.
I am using the following dependencies:
com.braze:android-sdk-ui:33.0.0
com.braze:android-sdk-location:33.0.0

Also, I am trying to set up Location and geofences, enabling it at runtime, like
val brazeConfigBuilder = BrazeConfig.Builder() .setAutomaticGeofenceRequestsEnabled(true) Braze.configure(applicationContext, brazeConfigBuilder.build())

But it does not work. I see in the logcat the message :
""Location collection disabled via sdk configuration.""
Then I saw, this message is at BrazeInternalLocationApi class, through the property appConfigurationProvider: BrazeConfigurationProvider. In addition, I suspect the implementation use some type of caché.

So, In my locatl test, I clear the app's cache, restarted the app, the geolocation started working.
I could confirm I have the permissions, and calling Braze.configure just one, from my Application instance, during the onCreate. Also, I am not using the braze.xml file.

I tested this on my Google Pixel 6a, Android 15.

Any ideas ?

Thanks,

Expected Behavior

Enable Location collection via sdk configuration.

Actual Incorrect Behavior

Not able to enable location collection via sdk configuration, by calling
Braze.configure( context.applicationContext, BrazeConfig.Builder().setApiKey(XXXX) .setCustomEndpoint(XXXX) .setIsFirebaseCloudMessagingRegistrationEnabled(true) .setFirebaseCloudMessagingSenderIdKey(XXXX) .setHandlePushDeepLinksAutomatically(true) .setGeofencesEnabled(true) .setIsLocationCollectionEnabled(true) .setAutomaticGeofenceRequestsEnabled(true) .build() )

Verbose Logs

No response

Additional Information

No response

@carlosgorillalogic carlosgorillalogic added the bug Something isn't working label Oct 25, 2024
@carlosgorillalogic
Copy link
Author

Hi, Due the fact I do not have braze.xml, I got the following log:

14:37:09.085 E Caught exception while retrieving API key. (Ask Gemini) java.lang.RuntimeException: Unable to read the Braze API key from the res/values/braze.xml file or from runtime configuration via BrazeConfig. See log for more details. at com.braze.configuration.BrazeConfigurationProvider.getBrazeApiKey(SourceFile:41) at com.braze.Braze$Companion.getConfiguredApiKey(SourceFile:1) at com.braze.Braze$d.a(SourceFile:3) at com.braze.Braze$d.invoke(SourceFile:1) at com.braze.Braze$h3$a.invokeSuspend(SourceFile:2) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280) at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85) at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59) at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1) at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38) at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1) at com.braze.Braze$h3.invokeSuspend(SourceFile:2) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at java.lang.Thread.run(Thread.java:1012)
Then the process ends, a new process starts.
So. It is required to have a braze.xml file ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant