Skip to content
Advertisement

Android: Redirect to another Activity after delay

So I am developing a simple app for a college project, And I have been able to integrate a Facebook login using fragments.

But I now am stuck trying to redirect the user after they login. I simply want to redirect them to the second activity page

Here is my code for the Facebook login success

JavaScript

Advertisement

Answer

To make a delayed transition use Handler class’s postDelayed(Runnable r, long delayMillis) method, for example:

Java

JavaScript

Kotlin with Anko

JavaScript
User contributions licensed under: CC BY-SA
11 People found this is helpful
Advertisement