Problem with Tutorial Task Tracker app

Hi, I am doing the android SDK tutorial and I have gone through all steps for creating the Task Tracker app

When I create a user and login successfully, I cannot see anything in the list of projects just an empty screen

I pinpointed the problem in the following two lines in the ProjectActivity.kt in private function setUpRecyclerView(realm: Realm)

val syncedUsers : RealmResults<User> = realm.where<User>().sort("_id").findAll()
        val syncedUser : User? = syncedUsers.getOrNull(0) // since there might be no user objects in the results, default to "null"

the query results return an empty list, so it cannot find any user in my user realm, therefore the recyclerView cannot be populated. I also downloaded the final branch of the task tracker app in case I did a mistake with the tutorial, as suggested and the same issue occurs. Any ideas?

Thank you in advance.

Hi Konstantinos!

Sorry that I missed this before. Did you follow the full “Set up the Task Tracker Tutorial Backend” instructions before you started the Android Tutorial? There are a number of rules, functions, and triggers that are required for the Android app to work, and the Backend tutorial helps set all of those up. Specifically it sounds like you might be lacking the triggers that instantiate the custom user data for new users, which is used to control which projects they can access.

Even if you did follow the backend tutorial already, it might be easiest for you to try re-importing (you can just follow the same instructions as before after deleting your existing Realm app) the tasktracker backend app with realm-cli because it’s possible that something went wrong the first time when you tried importing the backend settings.

1 Like