ParseUI-Android
ParseUI-Android copied to clipboard
ParseQueryAdapter
Hi, i'm new to coding and i'm trying to build an app that contains a parse adapter , but there is no method such as isLocalDatastoreEnabled() in Parse library that you used in you're code can you please help me to understand the code when it uses isLocalDatastoreEnabled().
if (Parse.isLocalDatastoreEnabled() ||
(query.getCachePolicy() != CachePolicy.CACHE_THEN_NETWORK) ||
(query.getCachePolicy() == CachePolicy.CACHE_THEN_NETWORK && !firstCallBack.get())) {
runningQueries.remove(query);
}
if ((!Parse.isLocalDatastoreEnabled() &&
query.getCachePolicy() == CachePolicy.CACHE_ONLY) &&
(e != null) && e.getCode() == ParseException.CACHE_MISS) {
// no-op on cache miss
return;
}
I have imported your dependencies and that problem is gone , but there is a another problem that when i open the ParseQueryAdapter library there there is one issue ParseObject.getClassName(clazz) is Non-Static method. how can i solve this one.
public ParseQueryAdapter(Context context, Class<? extends ParseObject> clazz) {
this(context, ParseObject.getClassName(clazz));
}
Hi @amebrahimi, not 100% sure what you try to achieve but if you just want the className you can do clazz.getClassName()
instead.
These are package private methods which you shouldn't need to call on your own. You should be referencing the code in this repository as a compile library rather than copying the sources into your project.
I had this problem as well and I was using "com.parse:parse-android:1.13.1" but when I went back to "com.parse:parse-android:1.10.0" it worked fine.