Android Studio – can i save context in a variable?
how can I save the main activity context in a variable to use it in a function of another class? is there a specific method i can use? I have a class that contains the functions that I would like…
how can I save the main activity context in a variable to use it in a function of another class? is there a specific method i can use? I have a class that contains the functions that I would like…
When I'm pressing the back button on phone or the support action bar, it's exiting the application. How can I fix it to return to the main activity In login code: override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_login) supportActionBar?.setDisplayShowHomeEnabled(true) ....…
I have added JAVA 11 to android studio to Build Tools -> Gradle like below: app/build.gradle: SDK: Still when checking source it still shows JAVA 8: and also when app runs, the features on Java 11 which don't exist on…
How to retrieve data from API and store it in a mobile database? Java is preferred. I just started into this, and consider me a beginner.
I am getting the list of the pdfs from the firebase storage. I am using advance_pdf_viewer to view the pdf but as soon as the file is passed to the pdf reader, my emulator crashes with following error.E/AndroidRuntime(31096): java.lang.IllegalStateException: Reply…
My app got published on Google Play recently and I am happy about that. But when the app is installed on phone the phone's antivirus detetcs trojan in it. I mean I don't even access any kind of permissions in…
I have a problem with displaying my RecyclerView. As far as i can see it seems like i didn't ommit any important part of the setup. Could you help me with finding the issue? Model - the class where i…
In my code i want to execute holder.task.setChecked() command with item.getStatus()) as a parameter. override fun onBindViewHolder(holder: ViewHolder, position: Int) { val item = data[position] holder.task.text = item.getTask() holder.task.setChecked(item.getStatus()) } The problem is that setChecked requires type Boolean, but from…
Element receiver#nl.xservices.plugins.ShareChooserPendingIntent at AndroidManifest.xml:36:9-40:20 duplicated with element declared at AndroidManifest.xml:12:9-16:20 When I'm generating the Signed Bundle in Android Studio, Please help me with this, any one.....
I have been tyring to execute API has two parameters as I said in title here is my API configure //region SignUp String SIGN_UP_USER = "User/SignUp"; @POST(SIGN_UP_USER) @Multipart @Headers("Content-Type: application/json") Call<SignUpResponse> signUp( @Part MultipartBody.Part profilePicture, @Query("email") String email, @Query("password") String…