Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Can we remove the Loading Screen when we start the Auth flow in android kotlin (compose)

Can we remove the Loading Screen when we start the Auth flow in android kotlin (compose)

When the native App written in kotlin starts I call this method always :- 

 

private fun sendAuthRequest() {

val request = AuthorizationRequest.Builder(
SpotifyConstants.SPOTIFY_CLIENT_ID,
AuthorizationResponse.Type.TOKEN,
SpotifyConstants.SPOTIFY_REDIRECT_URI
)
.setShowDialog(true)
.setScopes(arrayOf(SpotifyConstants.SPOTIFY_SCOPES))
.build()

// Starting the authorization window or intent
AuthorizationClient.openLoginActivity(
this,
SpotifyConstants.SPOTIFY_AUTH_REQUEST_CODE,
request
)
}

This grants me the accessToken for the user.

 

Need Help with :-

1. If this is the best practice to follow this flow or shall I use a layer of backend since the client id is stored in the app.

 

2. The loading screen of Spotify intent shows everytime I open the app which I want to avoid. I will attach a screenshot of the screen which I am trying to avoid.

loading screen.jpg
Reply
0 Replies

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random