I started to learn MVP but I have a few questions related the communication between the Model and the Presenter, for example a login feature Activity will get all the fields, send to the presenter, the presenter will validate and if it’s everything as expected the presenter will call the model to send t…
Tag: android
How can i make the app work offline with Firebase database
My app gets the data while its connected to internet but I want the app to get the data offline from cache. Please help I’m new to Firebase.
How to update array elements in Firestore with Android?
I read this post and this post of the same guy saying that you cannot update array elements. I also read a recent article, where is says that this can be done somehow with arrayUnion or something like that but I cannot get any informations on stackoverflow either in the docs. Is there any way I can solve this…
MediaPlayer to stop current song when new song is selected in ListView
I am writing a music player app using ListView. When i click a song on the MainActivity, it opens a nowplaying activity and a song starts to play, but if i go back to the ListView and click a new song, the new songs starts to play while the previous song is still playing so both songs play at the
WebView scroll up automatically when scrolling it down little
In web view when I scroll the page little bit down then it scroll up automatically on some pages not all pages but on some pages.Why this happen and what is it solution Here is xml code Here is my code you can check this Here is my java code I set the cookie also to web view and I
Garbage Collector not freeing “trash memory” as it should in an Android application
Hello! I’m a beginner Java and Android developer and I’ve been having trouble lately dealing with my app’s memory management. I will break this text into sections, in order to make it clearer and readable. A brief description of my app It’s a game that consists of several stages (level…
How to get the BigDemical in SQLite?
I’m grabbing the data of the database. If integer I can use getInt, If String I can use getString. But BigDecimal I don’t know what to use… Please Help. Thanks in advance! Answer Use BigDecimal.valueOf(double val):
Error “227 Entering Passive Mode”/”Connection refused” when downloading from local FTP server in Android emulator
I am trying to download a file from my local FileZilla Server with Java FTPSClient running in Android emulator. I’ve written this helpercode to download one File: I call this function like this: But I keep getting this error: I already tried to use enterLocalActivemode() instead of enterLocalPassivmode(…
android studio ‘javah’ is not recognized as an internal or external command
Following this tutorial to use Opencv Face Detection. At 4:00 he wrote on terminal: C:UserscvlabDesktopMyApplicationappsrcmain>javah -d jni -classpath ../../build/intermediate/classes/debug com.example.cvlab.myapplication.OpencvClass I’m trying to wrote the same path on my code but I’m running …
android.view.ContextThemeWrapper cannot be cast to android.app.Activity
I’m not a designer but when i got this project i can`t open specifically some screens, i think that they are screens and we only reuse some of the layouts have been created. Anyway can somebody help me? @Override public void onBindViewHolder(@NonNull final ProductsAdapter.ViewHolder holder, final int po…