Skip to content

SubscriptionHandling handleEvents not being invoked for _User table #97

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

Closed
developer-- opened this issue Feb 7, 2019 · 2 comments
Closed

Comments

@developer--
Copy link

developer-- commented Feb 7, 2019

I'm trying to subscribe changes in _User table, but when I'm changing somethings in _User table handleEvents not invoked,here is how I'm doing that:

  private var parseLiveQueryClient: ParseLiveQueryClient? = ParseLiveQueryClient.Factory.getClient()
  private var subscriptionHandling: SubscriptionHandling<ParseUser>? = null
  private val livePointQuery = ParseUser.getQuery()`

  init {
      subscriptionHandling = parseLiveQueryClient?.subscribe(livePointQuery)
      subscriptionHandling?.handleSubscribe {
        if (it != null){
          Log.e("LIVE_QUERY","success") // invoked successfully 
        }else{
          Log.e("LIVE_QUERY","null")
        }

      subscriptionHandling?.handleEvents { _, event, parseUser ->
        Log.e("LIVE_QUERY_EVENT","${event.name}")
        if(parseUser != null){
          Log.e("LIVE_QUERY",parseUser.objectId)
        }else{
          Log.e("LIVE_QUERY","user null")
        }
      }
    }
  }

P.S, I'm successfully subscribing other table data updates

@developer-- developer-- changed the title LiveQuery for _User table doesn't work SubscriptionHandling handleEvents not being invoked for _User Feb 7, 2019
@developer-- developer-- changed the title SubscriptionHandling handleEvents not being invoked for _User SubscriptionHandling handleEvents not being invoked for _User table Feb 7, 2019
@developer--
Copy link
Author

Solved! The problem were not in client side code, that was on server side configuration, _User class didn't have LiveQuery enabled, after enabling I got updates:)

@mmimeault
Copy link
Contributor

Awesome, thanks for the update

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

No branches or pull requests

2 participants