-
Notifications
You must be signed in to change notification settings - Fork 270
[Major Refactor] Need to split geofire-android and geofire-java into two repos #28
Comments
@jdimond @AbeHaskins I am seeing this as well when trying to use the geofire-2 branch in an Android app. The problem is this block in GeoFire.java
Specifically the crash is at this line:
Full error is:
|
Fixed be #34 |
any fix yet? |
hi, so it appears that this bug only manifests itself when we call setLocation without the GeoFire.CompletionListener(). If you call geoFire.setLocation("X marks the spot", new GeoLocation(x, y), new GeoFire.CompletionListener() { } then it works. (Im using geofire 2.3.0) |
@orzsikodon Hi, i added the Completion listener but i still run into the same bug. |
any update on this? Version 2.1.1 works fine. |
com.firebase:geofire-android:2.3.0' have this problem |
@DongNH4 @habeebrahmanpt can you show me your |
Please see the dependencies list:
|
@umarhussain15 looks like you updated to |
Yes still the issue is present with 2.3.1. proguard is set to true in debug |
@umarhussain15 can you try disabling proguard and seeing if the issue persists? |
It still persist. I manually tried the functionality of setLocation that is working fine here is the code snippet:
I used the firebase reference from geofire just to test if that was the issue but it works when tried manually. |
@umarhussain15 damn ok well thank you for trying! I will have to think about what could be the root cause here. |
Today is 4/19/2018 but it has the same problem. geoFire.setLocation(userId, new GeoLocation(location.getLatitude(), location.getLongitude()), new GeoFire.CompletionListener() {
|
21/04/2018 |
I change it from |
This issue is only arising with proguard. But i need to keep proguard to safeguard (somewhat) other logic inside. Please help its very urgent. Also, by downgrading dependency to 2.1.1, geoquery seems to be not working. I am not explicitly using setLocation etc, i am only using geofire to query location. Please help! |
@ashu-mkb Perhaps it is related to Proguard removing firebase classes?
|
@ZEZI Thank you so much! Though i tried earlier to add exception in proguard, i failed to achieve the desired result. This fixed my problem. Thank you again!!! |
…ad of keyRef.setValue also fixes a huge amount of unnecessary 'onDataExited(DataSnapshot dataSnapshot)' events which has not been reported yet. keyRef.updateChildren understands if the data needs to be inserted or updated. No need to use setValue here. Since priorities are not relevant anymore (https://stackoverflow.com/questions/31577915/what-does-priority-mean-in-firebase) i decided to not consider them anymore.
The problem here is the way GeoFire declares |
Yeah it's works for me :-) Thank you |
Thanks @abelthefirst for laying it out so clearly. This seems to be a fundamental issue with how this library is structured and published. IMO the only way forward would be to make separate geofire-java and geofire-android libraries (no shared source, maybe a shared published dependency) but that's more effort than I can spare right now :-/ |
@samtstern I have extracted the geofire library as library module for android. Its working correctly but I am having difficulty in making test cases successful. My understanding is that you have written test with admin sdk for java. In case of Android I was looking for using android test so that the context is available. |
It still doesn't work in 2019.Without the listeners. |
@umarhussain15 wow geofire-android is really cool! Sorry I missed this in my inbox the first time. I think splitting this up into Android and Java libraries with separate repos is the only way forward, but unfortunately I don't have the time to handle such a big project right now. As for the test cases I suspect we will have to do something different on Android. Maybe use the regular Android SDK but sign in with a custom token? |
What are you talking about? Is there still not a solution for this. I keep getting this error from time to time. This can't happen in an app! |
@emailsubjekt please have a look at https://github.com/umarhussain15/geofire-android. I have extracted the library specifically as android module to avoid the issues mention in this thread. It in working state and can be easily plugged in place of geofire-java. |
Is this official or a workaround? |
@emailsubjekt it's a workaround but I officially recommend it for now! @umarhussain15 has done the right thing. |
I have finally gotten the time to take this on. I am going to:
|
Thanks! |
When trying to set the setLocation on the GeoFire object runs into following issue at run time
Using the GeoFire 2.0.0 SNAPSHOT version.
Firebase version: com.google.firebase:firebase-database:9.0.2
The text was updated successfully, but these errors were encountered: