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

ParseQueryAdapter #126

Open
amebrahimi opened this issue Jan 24, 2016 · 4 comments
Open

ParseQueryAdapter #126

amebrahimi opened this issue Jan 24, 2016 · 4 comments
Labels

Comments

@amebrahimi
Copy link

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;
    }
@amebrahimi
Copy link
Author

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));
}

@amebrahimi amebrahimi changed the title isLocalDatastoreEnabled ParseQueryAdapter Jan 25, 2016
@wangmengyan95
Copy link
Contributor

Hi @amebrahimi, not 100% sure what you try to achieve but if you just want the className you can do clazz.getClassName() instead.

@grantland
Copy link
Contributor

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.

@jbardeleben
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants