Android library that manages your app's cached data with ease.

Overview

Download Build GitHub license Awesome

Teller

Android library that makes your apps faster.

Teller facilitates the downloading, saving, and reading of the cached data of your app. Keep your user's data fresh and remove those annoying loading screens!

project logo

Read the official announcement of Teller to learn more about what it does and why to use it.

iOS developer? Check out the iOS version of Teller.

Announcement - version 1.0

Version 1.0 has been announced and is in development. Check out the issue to learn more. The pre-1.0 code will be in maintenance mode until v1.0 is complete. Pre-1.0 is used by myself in production apps today, but you have been warned that there will more then likely be large breaking changes when 1.0 comes out.

What is Teller?

The data used in your mobile app: user profiles, a collection of photos, list of friends, etc. all have state. Your data is in 1 of many different states:

  • Being fetched for the first time (if it comes from an async network call).
  • Data has been fetched before.
  • Data has been fetched before, but is empty.
  • Data has been fetched before but it's too old. It should be updated to show the user fresh data in the app.

Determining what state your data is in, keeping it up-to-date, and displaying this information to the user in the UI is a big pain. That is where Teller comes in. All you need to do is show Teller how your app's cached data is saved, queried, and fetched and Teller facilities everything else for you.

Teller will query your cached data, parse the cache to determine it's state, fetch fresh data if the cache is too old, and deliver the results to listeners so you can update the UI to your users.

Are you building an offline-first mobile app?

Teller is designed for developers building offline-first mobile apps. If you want to build fast apps without loading screens, check out another great Android library, Wendy-Android (there is an iOS version too). Wendy is designed to sync your device's cached data with a remote API. Think of it like this: Teller is really good at GET calls for your network API, Wendy is really good at PUT, POST, DELETE network API calls. Teller pulls data, Wendy pushes data.

Why use Teller?

The use of a cache in your Android app delivers a better app experience where you can...

  • Remove annoying loading screens from your app.
  • Not worry about your user having a spotty Internet connection.
  • Allow your users to complete tasks in your app, faster.
  • Teller has performance improvements built-in to save your user's battery life.

As app developers, we all understand that the fetching, saving, loading, and maintaining of cache data is a pain. When something is a pain to do, we often ignore that task and move on with building our app.

However, with Teller this pain goes away. By using Teller you will get the benefits of using a cache while not having to maintain that cache.

Here are some more benefits of Teller:

  • Small - The only dependency at this time is RxJava2 (this issue is working to make it optional)
  • Built in Kotlin, for Kotlin
  • Not opinionated. Use any storage method you wish
  • Paging just works
  • Full test suite, full documentation

What are you waiting for? Let's install Teller!

Documentation

The very detailed documentation for Teller can be found here. Go on, check them out!

Author

Levi Bostian image

Contribute

Do you think Teller is cool? Want to help make it more cool? Great! We can use your help.

Open source isn't just writing code. Teller could use your help with any of the following:

  • Finding (and reporting!) bugs.
  • New feature suggestions.
  • Answering questions on issues.
  • Documentation improvements.
  • Reviewing pull requests.
  • Helping to manage issue priorities.
  • Fixing bugs/new features.

The Teller community is a very positive one, and the maintainers are committed to keeping things awesome. Like in over 230,000+ other communities, always assume positive intent; even if a comment sounds mean-spirited, give the person the benefit of the doubt.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Comments
  • Fix/improve the callbacks for DataState especially with errors.

    Fix/improve the callbacks for DataState especially with errors.

    Let's say you are observing (via rxjava) a DataState object in your UI of your Android app. You probably have code that looks something like this:

            reposViewModel.observeRepos()
                    .observe(this, Observer { reposState ->
                        reposState?.deliver(object : OnlineDataStateListener<List<RepoModel>> {
                            override fun firstFetchOfData() {
                                 // handle me
                            }
                            override fun isEmpty() {
                                 // handle me
                            }
                            override fun data(data: List<RepoModel>, fetched: Date) {
                                 // handle me
                            }
                            override fun error(error: Throwable) {
                                // handle me
                            }
                            override fun fetchingFreshData() {
                               // handle me
                            }
                            override fun finishedFetchingFreshData(errorDuringFetch: Throwable?) {
                                // handle me
                            }
                        })
                    })
    

    Here is the current state of this code as of this commit:

    This code above does work as expected (all callbacks are called as you want them to. Callbacks get called when changes happen. It's dependable) but only on one condition: For the error state, you are showing the user the error message of the error using something like a dialog. An independent UI that is not shared between any of the other states.

    That last part is very important and it explains the issue here. As long as you are handling the error in an independent UI, you will not see a problem in your app's code. This code above works and it works well.

    However, what if you want to share a UI with all of the states of your data? What if you have a textview in your UI that will say, "Empty. No data here.", "Loading data for the first time", "You have an error", "Here is your data". This seems like a reasonable thing you may want to do. With the current state of this library, you cannot do this in a dependable way. Why? Because when an error occurs in an OnlineRepository subclass and there is an error that happens (tested in the fetch function) such as a 404 or something like that and you return a FetchResponse.fail() result for the fetch, error() will be called in the code pasted above, but empty() will also be called immediately after. So if you want to share a UI with all of the states of your data, you will show a message "You have an error" and then a split second later you will switch to "Empty. No data here."

    I want to improve this API. I want you to be able to know the exact state of your data and your UI can depend on Teller giving it the data it needs to show the state of that data to your user. It needs to be more dependable and not have any rules like I do here by saying error() needs to be handled in it's own UI.

    I believe to have this happen, I cannot simply edit the implementation of OnlineRepository. I believe it will take a refactor of the DataState deliver function as well. Perhaps a brand new set of callbacks, a brand new API to receive callbacks, I am not sure. Below I will share ideas and progress on this.

    opened by levibostian 4
  • Include sources in aar relase package

    Include sources in aar relase package

    I want to package the source code .jar with the Teller package so that users of the library can browse the source inside of Android Studio.

    After some research, I am still not quite sure how to do this. However, from this SO question, I have an idea of the configuration to use. I have used this configuration in the past before, but I had no luck. I believe that is because of one of the comments someone mentioned, "it works for tagged releases for us". I did not tag a release.

    In the teller/build.gradle file, include this code at the base of the file:

    task sourcesJar(type: Jar, dependsOn: classes) {
        classifier = 'sources'
        from sourceSets.main.allSource
    }
    
    task javadocJar(type: Jar, dependsOn: javadoc) {
        classifier = 'javadoc'
        from javadoc.destinationDir
    }
    
    artifacts {
        archives sourcesJar
        archives javadocJar
    }
    

    I learned, also from that SO question, on how to view the directory of built artifacts for JitPack. Go to this link and it shows all the index of the tagged releases for that project. Append a tagged release to the URL of the browser to view the contents of that release. You will notice for 0.0.1 release of Teller, you do not see a -sources.jar resource.

    opened by levibostian 2
  • Allow repository to have a null data requirement.

    Allow repository to have a null data requirement.

    Sometimes repositories don't need parameters to fetch data.Allow null.

    Also, when repository loads, check if load data requirements data type is null and if so, begin observing data right away.

    opened by levibostian 2
  • Make sure some functions run on the background thread.

    Make sure some functions run on the background thread.

    I was creating integration tests the other day and when I tried to test observe() in an OnlineRepository subclass of mine, I was having a lot of exceptions.

    Here is a gist of my test:

        @Test
        fun observeCachedData_data() {
            val foo = listOf(
                    FooModel(id = 1)
            )
            insertFoo(foo)
    
            val body = GetFooResponse("", listOf())
            val result = Result.response(Response.success(body))
            `when`(service.getFoo(null)).thenReturn(
                    Single.just(result).subscribeOn(Schedulers.io()) // Run on background thread as a DB save is triggered.
            )
            `when`(responseProcessor.process(result)).thenReturn(ResponseProcessor.ProcessedResult<GetFooResponse>(null, "", body))
    
            repository.loadDataRequirements = FooRepository.GetRequirements(null)
            repository.observe()
                    .subscribeOn(Schedulers.io())
                    .test()
                    .awaitDone(500, TimeUnit.MILLISECONDS)
                    .assertValue {
                        it.data!!.size == 1
                    }
        }
    

    Looking above, I was able to fix my test with the line: Single.just(result).subscribeOn(Schedulers.io()) // Run on background thread as a DB save is triggered. from my mock. I had to make sure that fetchFreshData() was called on a background thread. Why? Because in the OnlineRepository source code I notice that the thread that is subscribed on in fetchFreshData() determines what thread saveData() is called on.

    This is not right. A subclass of OnlineRepository should always know what thread something is executed on.

    enhancement 
    opened by levibostian 2
  • Improved delivery of `DataState` to the UI.

    Improved delivery of `DataState` to the UI.

    Right now, if you want to parse the DataState object so that you can easily get the status of your data and show it in the UI, it is somewhat messy and boilerplate. This is because of using all of the OnlineDataStateListener functions.

    What if I have a custom view that only cares about the fetching? What if I have a fragment that only cares about the errors? What if I have a RecyclerView that only cares about the empty data or not empty data?

    I don't have many ideas at this time, but I do want to improve the API for DataState.

    opened by levibostian 2
  • Bump prismjs from 1.21.0 to 1.25.0

    Bump prismjs from 1.21.0 to 1.25.0

    Bumps prismjs from 1.21.0 to 1.25.0.

    Release notes

    Sourced from prismjs's releases.

    v1.25.0

    Release 1.25.0

    v1.24.1

    Release 1.24.1

    v1.24.0

    Release 1.24.0

    v1.23.0

    Release 1.23.0

    v1.22.0

    Release 1.22.0

    Changelog

    Sourced from prismjs's changelog.

    1.25.0 (2021-09-16)

    New components

    Updated components

    ... (truncated)

    Commits
    Maintainer changes

    This version was pushed to npm by rundevelopment, a new releaser for prismjs since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies javascript 
    opened by dependabot[bot] 1
  • Bump path-parse from 1.0.6 to 1.0.7

    Bump path-parse from 1.0.6 to 1.0.7

    Bumps path-parse from 1.0.6 to 1.0.7.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies javascript 
    opened by dependabot[bot] 1
  • Bump addressable from 2.5.2 to 2.8.0

    Bump addressable from 2.5.2 to 2.8.0

    Bumps addressable from 2.5.2 to 2.8.0.

    Changelog

    Sourced from addressable's changelog.

    Addressable 2.8.0

    • fixes ReDoS vulnerability in Addressable::Template#match
    • no longer replaces + with spaces in queries for non-http(s) schemes
    • fixed encoding ipv6 literals
    • the :compacted flag for normalized_query now dedupes parameters
    • fix broken escape_component alias
    • dropping support for Ruby 2.0 and 2.1
    • adding Ruby 3.0 compatibility for development tasks
    • drop support for rack-mount and remove Addressable::Template#generate
    • performance improvements
    • switch CI/CD to GitHub Actions

    Addressable 2.7.0

    • added :compacted flag to normalized_query
    • heuristic_parse handles mailto: more intuitively
    • dropped explicit support for JRuby 9.0.5.0
    • compatibility w/ public_suffix 4.x
    • performance improvements

    Addressable 2.6.0

    • added tld= method to allow assignment to the public suffix
    • most heuristic_parse patterns are now case-insensitive
    • heuristic_parse handles more file:// URI variations
    • fixes bug in heuristic_parse when uri starts with digit
    • fixes bug in request_uri= with query strings
    • fixes template issues with nil and ? operator
    • frozen_string_literal pragmas added
    • minor performance improvements in regexps
    • fixes to eliminate warnings
    Commits
    • 6469a23 Updating gemspec again
    • 2433638 Merge branch 'main' of github.com:sporkmonger/addressable into main
    • e9c76b8 Merge pull request #378 from ashmaroli/flat-map
    • 56c5cf7 Update the gemspec
    • c1fed1c Require a non-vulnerable rake
    • 0d8a312 Adding note about ReDoS vulnerability
    • 89c7613 Merge branch 'template-regexp' into main
    • cf8884f Note about alias fix
    • bb03f71 Merge pull request #371 from charleystran/add_missing_encode_component_doc_entry
    • 6d1d809 Adding note about :compacted normalization
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies ruby 
    opened by dependabot[bot] 1
  • Bump prismjs from 1.21.0 to 1.24.0

    Bump prismjs from 1.21.0 to 1.24.0

    Bumps prismjs from 1.21.0 to 1.24.0.

    Release notes

    Sourced from prismjs's releases.

    v1.24.0

    Release 1.24.0

    v1.23.0

    Release 1.23.0

    v1.22.0

    Release 1.22.0

    Changelog

    Sourced from prismjs's changelog.

    1.24.0 (2021-06-27)

    New components

    Updated components

    ... (truncated)

    Commits
    Maintainer changes

    This version was pushed to npm by rundevelopment, a new releaser for prismjs since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies javascript 
    opened by dependabot[bot] 1
  • Bump hosted-git-info from 2.7.1 to 2.8.9

    Bump hosted-git-info from 2.7.1 to 2.8.9

    Bumps hosted-git-info from 2.7.1 to 2.8.9.

    Changelog

    Sourced from hosted-git-info's changelog.

    2.8.9 (2021-04-07)

    Bug Fixes

    2.8.8 (2020-02-29)

    Bug Fixes

    • #61 & #65 addressing issues w/ url.URL implmentation which regressed node 6 support (5038b18), closes #66

    2.8.7 (2020-02-26)

    Bug Fixes

    • Do not attempt to use url.URL when unavailable (2d0bb66), closes #61 #62
    • Do not pass scp-style URLs to the WhatWG url.URL (f2cdfcf), closes #60

    2.8.6 (2020-02-25)

    2.8.5 (2019-10-07)

    Bug Fixes

    • updated pathmatch for gitlab (e8325b5), closes #51
    • updated pathmatch for gitlab (ffe056f)

    2.8.4 (2019-08-12)

    ... (truncated)

    Commits
    • 8d4b369 chore(release): 2.8.9
    • 29adfe5 fix: backport regex fix from #76
    • afeaefd chore(release): 2.8.8
    • 5038b18 fix: #61 & #65 addressing issues w/ url.URL implmentation which regressed nod...
    • 7440afa chore(release): 2.8.7
    • 2d0bb66 fix: Do not attempt to use url.URL when unavailable
    • f2cdfcf fix: Do not pass scp-style URLs to the WhatWG url.URL
    • e1b83df chore(release): 2.8.6
    • ff259a6 Ensure passwords in hosted Git URLs are correctly escaped
    • 624fd6f chore(release): 2.8.5
    • Additional commits viewable in compare view
    Maintainer changes

    This version was pushed to npm by nlf, a new releaser for hosted-git-info since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies javascript 
    opened by dependabot[bot] 1
  • Bump lodash from 4.17.19 to 4.17.21

    Bump lodash from 4.17.19 to 4.17.21

    Bumps lodash from 4.17.19 to 4.17.21.

    Commits
    • f299b52 Bump to v4.17.21
    • c4847eb Improve performance of toNumber, trim and trimEnd on large input strings
    • 3469357 Prevent command injection through _.template's variable option
    • ded9bc6 Bump to v4.17.20.
    • 63150ef Documentation fixes.
    • 00f0f62 test.js: Remove trailing comma.
    • 846e434 Temporarily use a custom fork of lodash-cli.
    • 5d046f3 Re-enable Travis tests on 4.17 branch.
    • aa816b3 Remove /npm-package.
    • See full diff in compare view
    Maintainer changes

    This version was pushed to npm by bnjmnt4n, a new releaser for lodash since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies javascript 
    opened by dependabot[bot] 1
  • Update docs

    Update docs

    • [ ] #91
    • [ ] Try to see if we can have all the docs live in the README instead of an external site. I hope that the library is simple enough to learn that we don't need an external site anymore.
    • [ ] Update docs with new API.
    opened by levibostian 0
  • Test new API in an app

    Test new API in an app

    • [ ] #90

    Time to give this library a test in a real app! Let's see if we like the API!

    • [ ] Create a sample app module in this project. Make sure it's small so it's easy to maintain in the future.
    opened by levibostian 0
  • Implement new API for rest of code base

    Implement new API for rest of code base

    • [ ] #90
    • [ ] Finish new API implementation by implementing into rest of code (probably the testing portion and coroutine version). Right now would be a good time to look at why we originally created the testing functionality of the library. Do we need it anymore? Should we modify it?
    opened by levibostian 0
  • Implement new API for repository portion of code that's less boilerplate

    Implement new API for repository portion of code that's less boilerplate

    • [ ] Design new API for teller that's less boilerplate heavy.
    • [ ] Implement new API for teller with this new API.
    • [ ] Write automated tests as you go to make sure we are writing testable code.
    opened by levibostian 0
  • pull out coroutine specific code into it's own module

    pull out coroutine specific code into it's own module

    • [ ] #87
    • [ ] #88
    • [ ] Now, we are able to make this library have zero dependencies. Move the coroutine code into it's own module. This allows us to have the core module have zero dependencies.
    opened by levibostian 0
Releases(0.2.0-alpha)
  • 0.2.0-alpha(Mar 15, 2019)

    [0.2.0-alpha] - 2019-03-15

    Testing utilities and improved API for CacheState objects!

    Changed

    • Breaking Change The deliver_() functions in OnlineCacheState and LocalCacheState have been replaced with a more Kotlin like callback API with lambdas. 47
    • Remove Java close compatibility. Because Kotlin and Java work nicely together, Teller may still work nicely with Java, but Teller is no longer focusing on making sure that is the case. 46
    • Expose public properties to OnlineCacheState.

    Added

    • Create code of conduct and add to the docs.
    • Create set of utilities into Teller to assist in creating unit, integration, and instrumentation tests.
    • Create section in docs on how to test with Teller in your app.
    • Create tests in example to show examples on how to use Teller's testing utilities and to test the API as it's developed.

    Fixed

    • Fixed bug in OnlineCacheState where refresh calls may not call refreshComplete() after a fetch finished successfully.
    Source code(tar.gz)
    Source code(zip)
  • 0.1.0-alpha(Feb 22, 2019)

    [0.1.0-alpha] - 2019-02-21

    Changes to the API, docs, full test suite, thread safety and bug fixes.

    Changed

    • Breaking Change OnlineRepository's abstract functions have all been renamed. This is to try and be more descriptive of what Teller is doing to help developers implement faster.
    • Breaking Change OnlineDataState.deliver__() listeners has been renamed.
    • Breaking Change OnlineRepository.observeCachedData() and OnlineRepository.isDataEmpty() gets called on UI thread. OnlineRepository.saveData() gets called on background thread.
    • OnlineRepository.observe() and LocalRepository.observe() no longer throws. Observe anytime you wish and receive event updates through all changes of the repository.
    • OnlineRepository.refresh() calls are shared between all OnlineRepository instances. This saves on the amount of network calls performed. OnlineRepository.observe() observers are all notified when OnlineRepository.refresh() actions are performed.
    • OnlineRepository is thread safe.
    • Removed Teller.sync()

    Added

    • OnlineRepository now supports observing 2+ queries, as long as it's the same type of data.
    • Delete Teller data for development purposes or when someone logs out of your app and the data is cleared via Teller.clear().
    • Full test suite for unit testing and implementation testing!
    • Full documentation website!

    Contributors changelog

    Changed

    • OnlineDataState has been refactored to using a finite state machine implementation. See OnlineDataStateStateMachine. It's a immutable object that represents an immutable OnlineDataState instance.
    • Fetching fresh cache data and the state of the cache data have been decoupled in OnlineDataState. Each of these 2 different states (fetching and cache) are updated independently from each other in the OnlineRepository so decoupling them fixes bugs that have been reported.
    • OnlineRepository is designed to be "useless" after .dispose() is called. All aync tasks are cancelled or the results are ignored when they are complete. Calling any function on OnlineRepository after dispose() will throw an exception.
    Source code(tar.gz)
    Source code(zip)
  • 0.0.1(May 21, 2018)

    [0.0.1] - 2018-05-21

    First release of Teller!

    Added

    • LocalRepository for saving and querying locally cached data.
    • OnlineRepository for saving, querying, and fetching remote data that is cached locally.
    • Teller.shared.sync() to sync a list of OnlineRepository instances at once.
    • Example Android app to show how to use Teller and, for now until tests are written, to test Teller.
    • README.md documentation on status of project and how to use it.
    Source code(tar.gz)
    Source code(zip)
Owner
Levi Bostian
Android, iOS, node API developer. Senior dev @customerio. Hacker @curiosityio . Environmental activist, minimalist, organic gardener. they/he
Levi Bostian
Tired of manually setup test data of Kotlin data classes or POJOs? Instantiator creates Instances of any class for you so that you can focus on writing tests instead of spending time and effort to setup test data

Instantiator Tired of manually setup test data of Kotlin data classes or POJOs? Instantiator creates Instances of any class for you so that you can fo

Hannes Dorfmann 54 Dec 30, 2022
A boiler plate that can be re-used to start android apps

Agile Boiler Plate The main task at the innovation labs of Avast is to find new ideas to work on, prototype these ideas, and quickly implement them. A

Abed Almoradi 45 Sep 19, 2022
Over The Air Server for deployment of Android, iOS and macOS apps

Zealot 开源自部署 iOS、Android 及 macOS 应用分发平台,提供 iOS、Android SDK、fastlane 等丰富组件库,打包分发流程、上传应用竟然如此简单、独立部署解决企业使用的烦恼。 En Taro Adun! ?? 特性 支持 iOS、Android 和 macOS

Zealot 687 Dec 28, 2022
Bulletin helps you to "swipe" through your favorite events in the campus and gives you the perfect match for your better experience

Bulletin helps you to "swipe" through your favorite events in the campus and gives you the perfect match for your better experience. Right swipe to add event to your calendar and left swipe to view the next event.

GDSC Navrachana University 7 Feb 11, 2022
A comprehensive tutorial for Android Data Binding

精通 Android Data Binding 更多干货可移步至个人主页 QQ 交流群:324112728 ,或者点击链接加入QQ群 官方虽然已经给出了教程 - Data Binding Guide (中文版 - Data Binding(数据绑定)用户指南) ,但是实践之后发现槽点实在太多,于是就

Fei Liang 2.6k Dec 6, 2022
Android Library to help you with your runtime Permissions.

PermissionHelper Android Library to help you with your runtime Permissions. Demo Android M Watch it in action. Pre M Watch it in action. Nexus 6 (M) N

Kosh Sergani 1.2k Dec 14, 2022
Use your old Android device as an OctoPrint server.

Use your old Android device as an OctoPrint server.

Feelfree (Filip) 1k Dec 31, 2022
The BitbucketWatcher is a helpful tool to keep up to date with updates on your repo.

The BitbucketWatcher is a helpful tool to keep up to date with updates on your repo. The Watcher tracks new PullRequests, status changes on code reviews, merged branches and forgotten branches.

null 4 Jan 10, 2022
Make your IDE play Wilhelm Scream effect when you are using unsafe !! operator in Kotlin

Make your IDE play Wilhelm Scream effect when you are using unsafe !! operator in Kotlin

Mikhail Levchenko 78 Nov 15, 2022
An application for runners and cyclists. Allows you to monitor your physical activity, weight and receive reminders about workouts.

An application for runners and cyclists. Allows you to monitor your physical activity, weight and receive reminders about workouts.

Just_Amalll 3 Feb 7, 2022
A Utility to Add all of your installed steam games to the Start Launcher for Windows

Steam Start Launcher The Steam Start launcher is a small tool that will scan your computer for isntalled steam games and create a shortcut for each ga

null 1 Dec 1, 2021
Throw your friends out!

ThrowIt-Mirai 丢人插件 简单高效的 “丢人” 插件 把你的群友丢出去吧 使用方法: 将插件置于plugin目录下, 并安装chat-command插件 使用插件需要权限 pers.moe.throwit-mirai:command.丢 perm permit m* pers.moe.t

Moe 25 Oct 24, 2022
Starter-Android-Library - Starter Android Library is an Android Project with Modular Architecture.

Starter-Android-Library - Starter Android Library is an Android Project with Modular Architecture.

OpenBytes 1 Feb 18, 2022
****. Use the native and support library variants instead - https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml.html. An android library that makes it easy to add custom fonts to edittexts and textviews

Add to your project Add this line to your dependencies in build.gradle compile 'in.workarounds.typography:typography:0.0.8' Using the views There are

Workarounds 43 Nov 6, 2021
ZXing ("Zebra Crossing") barcode scanning library for Java, Android

Project in Maintenance Mode Only The project is in maintenance mode, meaning, changes are driven by contributed patches. Only bug fixes and minor enha

ZXing Project 30.5k Dec 27, 2022
An android library for displaying fps from the choreographer and percentage of time with two or more frames dropped

DEPRECATED TinyDancer is deprecated. No more development will be taking place. Check out the Google Android developer documentation for UI performance

Friendly Robot 1.9k Jan 3, 2023
Android validation library which helps developer boil down the tedious work to three easy steps.

AwesomeValidation Introduction Implement validation for Android within only 3 steps. Developers should focus on their awesome code, and let the librar

Jing Li 1.1k Dec 17, 2022
A plug and play ;) android library for displaying a "rate this app" dialog

Easy Rating Dialog This lib provides a simple way to display an alert dialog for rating app. Default conditions to show: User opened the app more than

Fernando Martínez 111 Dec 30, 2022
Tutorial For openJDK 11 and AGP 7.0.0+ | Tutorial Multi Library Android in 1 Project | Groovy

jitpack-library-guide For openJDK 11 and AGP 7.0.0 + Please read every single note for detail Tutorial Click Here Kotlin DSL Click Here Repository for

Faisal Amir 7 Dec 10, 2022