-
Dear Friends, Iam new here, iam creating an elearning app with kotlin native android, iam using OKHTTP and connecitng my API and login and then fetching the course details. its working fine. But once i click login button, it goes to next activity, i want to go to next activity once i got all the course details. Pls help me. Find below my codes: LoginActivity.kt ` package com.example.a139_sample1 import android.annotation.SuppressLint import kotlinx.android.synthetic.main.activity_login.* class LoginActivity : AppCompatActivity() { `override fun onCreate(savedInstanceState: Bundle?) { hellolog() } fun hellolog():Unit{ }else{
} } fun showinfo(msg:String){ Apiservice.kt `package com.example.a139_sample1.services import android.app.Activity import okhttp3.* class Apiservice { `fun authenticate(urlpara:String,url:String){ }
}) } fun getAllCourses(deviceId:String,accessToken:String){ val request = Request.Builder()
}catch (e: Exception){ }` iam getting output, but it goes to next activity immediatelky after click on login button, i want to move the control to course screen after login authenticated and fetch all the course details and then it has to move next screen(course screen). i want to call the function (fun showinfo(msg:String)) available in in LoginActivity.kt from other classes or activities. pls help me to achieve this. i want to fetch details from api and store it in the local data classs. i can store it. but i dont know how to show and use that data’s in other activity screens. pls help me iam in urgent need… Thanks in Advance, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I don't see how this has anything to do with nvim-jdtls? |
Beta Was this translation helpful? Give feedback.
-
Man, better to ask it on |
Beta Was this translation helpful? Give feedback.
Man, better to ask it on
StackOverflow
orKotlin discord
. Also, format all your code with `.