Git Product home page Git Product logo

adva-materials's Introduction

Real-World Android by Tutorials: Materials

This repo contains all the downloadable materials and projects associated with the Real-World Android by Tutorials from raywenderlich.com.

Each edition has its own branch, named editions/[EDITION]. The default branch for this repo is for the most recent edition.

Forum

We’ve set up an official forum for the book at https://forums.raywenderlich.com/c/books/real-world-android-by-tutorials. This is a great place to ask questions about the book or to submit any errors you may find.

Release History

Branch Edition Release Date
editions/1.0 1.0 2021-03-21
editions/2.0 2.0 2022-08-31

adva-materials's People

Contributors

drofwarcs avatar gitdo-test avatar jellodiil avatar jhernandez80 avatar kolinsturt avatar manda94 avatar massimocarli avatar narko avatar rcosteira79 avatar subhrajyotisen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adva-materials's Issues

Tools versions are outdated

The version of gradle used in this project is out-of-date, recommend to upgrade.

classpath 'com.android.tools.build:gradle:4.1.2'

Current recommended version is 7.0.0.

The Kotlin version is pretty old too.

Variable 'interceptedRequest' must be initialized

I'm working through real-world-android-by-tutorials Chapter 4.4 Interceptors, Im following the code as far as I can see and am getting an error "Variable 'interceptedRequest' must be initialized " adding in the code block from "Handling valid tokens"

this is the function

override fun intercept(chain: Interceptor.Chain): Response {
  // Replace with your code
    val token = preferences.getToken()
    val tokenExpirationTime =
        Instant.ofEpochSecond(preferences.getTokenExpirationTime())
    val request = chain.request()
//      if(chain.request().headers[NO_AUTH_HEADER] != null) return
//      chain.proceed()
    val interceptedRequest: Request

    if(tokenExpirationTime.isAfter(Instant.now())){
        interceptedRequest =
            chain.createAuthenticatedRequest(token)
    }else{

    }
    return chain.proceedDeletingTokenIfUnauthorized(interceptedRequest)
  //return chain.proceed(chain.request())
}

on the 17th line the method being called "chain.proceedDeletingTokenIfUnauthorized" and being passed "interceptedRequest", its throwing that error 'Variable 'interceptedRequest' must be initialized' but not sure why, the code is exactly what it appears as in the instruction. Maybe Im just getting poor vision, but I've tried invoking the "val" interceptedRequest(), but it doesnt like that, "initialized" seems like it is expecting to be assigned...

any help is greatly appreciated, I'll keep looking at it, I hope I do not need glasses. TIA

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.