GithubHelp home page GithubHelp logo

android-login-signup-tutorial's Introduction

Hi ๐Ÿ‘‹, I'm Belal Khan

I'm a highly skilled Android Developer with a proven track record of delivering exceptional projects and optimizing app performance.

probelalkhan

probelalkhan

probelalkhan

Connect with me:

probelalkhan probelalkhan probelalkhan probelalkhan probelalkhan probelalkhan simplifiedcoding

Languages and Tools:

android dart express firebase flutter git java javascript kotlin mongodb mysql nestjs nodejs postgresql pytorch sqlite tensorflow unity

Support:

probelalkhan



probelalkhan

ย probelalkhan

probelalkhan

android-login-signup-tutorial's People

Contributors

probelalkhan 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

android-login-signup-tutorial's Issues

I just update the Api URL and I'm getting null reference error

Hello bro!
I just update the URL of the datasource:

class RemoteDataSource {
    companion object {
        private const val BASE_URL = "http://192.168.0.4:5000/api/user/"
    }

This my AuthApi:


 @POST("login")
    suspend fun login(
        @Field("email") email: String,
        @Field("password") password: String
    ) : LoginResponse

Therefore to test this endpoit it should be: http://192.168.0.4:5000/api/user/login
ok this works using Posman and this is my output:

{
    "user": {
        "id": "60760126e34a1d3668a264ac",
        "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2MDc2MDEyNmUzNGExZDM2NjhhMjY0YWMiLCJpYXQiOjE2MTgzNTQ1MzV9.VPRoCntI6uC4bOmaB9A9mVvzY8CSUxxS7VVB1W91KUI",
        "name": "Freddy Aal",
        "phone": "942912222",
        "email": "[email protected]",
        "created_at": "2021-04-13T20:37:58.123Z"
    }
}

I updated the class User according to my Output:

data class User(
    val id: String,
    val access_token: String?,
    val name: String,
    val phone: String,
    val email: String,
    val created_at: String
)

But when I run the project and test it.. always with a correct credentials or wrong credentials it always throw this error:

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String net.simplifiedcoding.data.responses.User.getAccess_token()' on a null object reference
        at net.simplifiedcoding.ui.auth.LoginFragment$onActivityCreated$1$1.invokeSuspend(LoginFragment.kt:34)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:330)
        at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:26)
        at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:109)
        at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:158)
        at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
        at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
        at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:49)
        at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source)
        at net.simplifiedcoding.ui.auth.LoginFragment$onActivityCreated$1.onChanged(LoginFragment.kt:33)
        at net.simplifiedcoding.ui.auth.LoginFragment$onActivityCreated$1.onChanged(LoginFragment.kt:21)
        at androidx.lifecycle.LiveData.considerNotify(LiveData.java:131)
        at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:149)
        at androidx.lifecycle.LiveData.setValue(LiveData.java:307)
        at androidx.lifecycle.MutableLiveData.setValue(MutableLiveData.java:50)
        at net.simplifiedcoding.ui.auth.AuthViewModel$login$1.invokeSuspend(AuthViewModel.kt:24)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
        at android.os.Handler.handleCallback(Handler.java:836)
        at android.os.Handler.dispatchMessage(Handler.java:103)
        at android.os.Looper.loop(Looper.java:203)
        at android.app.ActivityThread.main(ActivityThread.java:6253)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)

There is a but because of it: User.getAccess_token()' on a null object reference this code is in (LoginFragment.kt:34)
Here is a picture: https://imgur.com/a/kIPtBnQ
Please bro if you have any idea about this issue I will apreciate it to fix this problem

Thanks for the videos.

fail

Crash

override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
}

onActivityCreated is Deprecated, can someone suggest some alternative.

crash

why when im compile on emulator api level 19, there was an a error like this
"Caused by: java.lang.IllegalStateException: Expected Android API level 21+ but was 19".

Login

What is username and password to go inside the app

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.