Git Product home page Git Product logo

android's Introduction

io7m.com

Hello!

You probably want the io7m-com organization. This io7m account is my personal account, and mostly has artistic works and experimental repositories.

android's People

Contributors

aferditamuriqi avatar benanderman avatar datalogics-cgreen avatar datalogics-dans avatar datalogics-tarar avatar datalogics-tsmith avatar gioneill avatar io7m avatar mattniehoff avatar skullbonez avatar winniequinn avatar

Watchers

 avatar  avatar  avatar  avatar

android's Issues

Determine if the cardcreator is to survive

It has some dependencies on some code that needs to be removed and/or modified. The card creator appears to be disabled in the code currently, so if it's not going to be used, I'll delete it (that way I don't need to update it to accomodate the account changes).

DRMLicensors overwritten in feeds

The current code scans OPDS feeds one entry at a time and ends up using whichever DRM licensor it encounters last. The code should instead be storing a list of the licensors it encounters: A silent assumption that all DRM licensors in a feed are the same licensor sounds like an incredibly nasty bug to track down when that assumption later turns out to be incorrect.

Upgrade simplified-books to understand multiple accounts and profiles

The current application abuses the books API by simply deleting and recreating the book controller every time an account changes. This has the side effect of leaking a couple of thread pools in the process.

The right way to do this from the start would have been to change the books API to make it understand the concept of multiple accounts and profiles.

This is the bulk of the work required to get the application to work with profiles. Need to document the way that data is currently stored on the device, the way that it will be stored with multiple accounts and profiles, and write a basic migration strategy to update the stores of existing users.

Replace org.nypl.simplified.app.reader.ReaderBookmarks

The org.nypl.simplified.app.reader.ReaderBookmarks type uses Android's SharedPreferences to store bookmarks. This was fine for the old single-account no-profiles case, but bookmarks now need to be stored in a profile-specific persistent store.

Adobe credentials are a mess

The previously immutable AccountCredentials type has been transformed into a mutable type with six Option fields. Those fields have causal relationships between each other; when you have one of them, you must also have at least two more, but as they're encoded as a pile of unrelated optional fields, the type system can't tell you this and can't enforce that fact. This leads to a lot of unpleasant checks throughout the code, and it's unclear without a detailed study of the execution path of the program when some fields can be set and not others. I've managed to work out the relationships, so this type needs to be completely replaced with an immutable credentials type as part of the accounts/profiles update.

Set LFA logo

A logo is needed for the app and the splash screen.

Split `books-core` into separate packages

The org.nypl.simplified.books.core package is rather large. It would be better to split the core package into multiple subpackages to make it slightly easier to digest.

Update unit tests for OPDS availability

Someone changed how OPDS availability is calculated and didn't bother to update any of the unit tests. Now, all of the OPDS availability-related unit tests fail and it's not clear if it's because the code is wrong, or because the OPDS entry specimens need to be changed to match what's actually served now.

Publish book states instantly

Right now if a book operation (borrowing, for example) is in progress, clicking another book button in the UI will enqueue an operation but this won't be reflected in the UI right away. The reason for this is that state changes are published when the background task starts, and the task may not start for a while if another task is already in progress.

Easy fix: Publish book state changes to the registry immediately (such as setting the state of a book to "download requested") and then let the background tasks update those states when the tasks start running.

Replace all startActivity calls with a better API

Right now, all over the project, activities are starting new activities by calling startActivity on themselves. Need to replace all startActivity calls with a call to a method defined in the project so that we can be confident that activities are being started with the right flags (such as the flag that prevents the user going back to previous activities with the back button).

Remove last traces of account-specific branding

It no longer makes sense for different accounts to get different action bar and text colors. Any reference to mainColor from the account provider configuration should be audited and most likely removed.

Handle failures to open the profiles database more gracefully

Right now, if an account/profile exists with an account provider that has been removed, any attempt to open the profiles database will result in an exception. This exception is propagated to the main thread and as such the app will crash.

I'm not exactly sure what would be a reasonable way to handle a failure here; not being able to open the profiles database is not something that the app can recover from, but at the same time, perhaps the above shouldn't be a fatal error. Removing an account provider is something that can only occur by modifying the app and recompiling it, so it's hardly urgent, but it is something that will need to be handled in future once the account providers come from a remote server.

Bring unit tests back to life, modernize tests

Currently, many tests fail. Many tests aren't run as part of the build.

Additionally, the tests are structured such that the junit4 and android frontends for each set of tests both delegate to implementations that don't refer to junit at all. This used to be necessary because there was no way to write tests such that they could be executed both locally (for quick testing) and/or on a real device (for testing in an Android environment). This is no longer necessary: Android can now run JUnit 4 tests and the code required to support both can be essentially thrown away.

Remove action bars from activities that shouldn't have them

Ripping out the existing account handling with regards to branding also removed the logic that picks an ActionBar or NoActionBar theme variant. Putting that back in is trivial, but the original sources need to be inspected to determine which activities had action bars and which didn't.

HTTP auth copy/paste

This same bit of code has been copied and pasted repeatedly throughout the codebase:

    final AccountAuthenticationCredentials credentials = this.getAccountCredentials();
    final AccountBarcode barcode = credentials.getBarcode();
    final AccountPIN pin = credentials.getPin();

    HTTPAuthType auth = HTTPAuthBasic.create(barcode.toString(), pin.toString());
    if (credentials.getOAuthToken().isSome()) {
      final HTTPOAuthToken token = ((Some<HTTPOAuthToken>) credentials.getOAuthToken()).get();
      if (token != null) {
        auth = HTTPAuthOAuth.create(token);
      }
    }

    return auth;

This needs to go in a method somewhere instead of being endlessly replicated.

Replace splash screen

The current splash screen needs replacing with one that leads to the profile selection screen (or straight to the catalog if the anonymous profile is enabled).

Make activity animations consistent

Some activities use the default animation, some use no animation. Most use no animation on creation but then use the default animation on closing.

Make this consistent!

Related to #16

Set Demarque Logo

A logo is needed for the navigation drawer and for the account settings.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.